com.dlsc.flexgantt.util
Class Messages

java.lang.Object
  extended by com.dlsc.flexgantt.util.Messages

public final class Messages
extends java.lang.Object

Part of the I18N support and used to return translations for a given key. The translations are looked up from a properties file. Translations can be overriden programatically.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
setString(String, String)

Method Summary
static java.lang.String getString(java.lang.String key)
          Helper method, which returns a value (a translation) for the given key.
static void setString(java.lang.String key, java.lang.String value)
          Overrides the translation for the given key with the given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getString

public static java.lang.String getString(java.lang.String key)
Helper method, which returns a value (a translation) for the given key. This method delegates its call to a resource bundle.

Parameters:
key - the key that needs to be translated
Returns:
a translation for the given key
Since:
1.0

setString

public static void setString(java.lang.String key,
                             java.lang.String value)
Overrides the translation for the given key with the given value. Usually the translation of a key is based on the value of the key as found in a resource bundle file / property file. However, some applications need to override translations based on information found in some other data source than a flat properties file. These applications can use this method to programatically change a translation.

Parameters:
key -
value -
Since:
1.0