net.sourceforge.openstego.util
Class LabelUtil

java.lang.Object
  extended by net.sourceforge.openstego.util.LabelUtil

public class LabelUtil
extends java.lang.Object

Localized label handler for OpenStego


Constructor Summary
protected LabelUtil(java.lang.String namespace)
          Constructor is protected
 
Method Summary
static void addNamespace(java.lang.String namespace, java.lang.String bundle)
          Method to add new namespace using resource bundle
static LabelUtil getInstance(java.lang.String namespace)
          Method to get instance of LabelUtil based on the namespace
 java.lang.String getString(java.lang.String key)
          Method to get label value for the given label key
 java.lang.String getString(java.lang.String key, java.lang.Object[] parameters)
          Method to get label value for the given label key (using optional parameters)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelUtil

protected LabelUtil(java.lang.String namespace)
Constructor is protected

Parameters:
namespace - Namespace for the label
Method Detail

addNamespace

public static void addNamespace(java.lang.String namespace,
                                java.lang.String bundle)
Method to add new namespace using resource bundle

Parameters:
namespace - Namespace for the labels
bundle - Resource bundle name

getInstance

public static LabelUtil getInstance(java.lang.String namespace)
Method to get instance of LabelUtil based on the namespace

Parameters:
namespace - Namespace for the labels
Returns:
Instance of LabelUtil

getString

public java.lang.String getString(java.lang.String key)
Method to get label value for the given label key

Parameters:
key - Key for the label
Returns:
Display value for the label

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.Object[] parameters)
Method to get label value for the given label key (using optional parameters)

Parameters:
key - Key for the label
parameters - Parameters to pass for a parameterized label
Returns:
Display value for the label


Copyright © 2007-2009 Samir Vaidya. All Rights Reserved.