net.sf.ecl.datepicker
Class UIMessages

java.lang.Object
  extended by net.sf.ecl.datepicker.UIMessages

public final class UIMessages
extends Object

is a collection of messages used by the controls mostly for tips as locale specific names of weekdays and monthes are got from the locale.

Author:
Alexey Afanasyev, Alexey Kharlamov

Method Summary
static String format(String key, Object arg)
          Returns the formatted message for the given key in the resource bundle.
static String format(String key, Object[] args)
          Returns the formatted message for the given key in the resource bundle.
static ResourceBundle getBundle()
          Returns the resource bundle that contains locale-specific messages for the UI library.
static String getString(String key)
          Returns the resource object with the given key in the resource bundle.
static String getString(String key, String defaultValue)
          Returns the resource object with the given key in the resource bundle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

format

public static String format(String key,
                            Object arg)
Returns the formatted message for the given key in the resource bundle.

Parameters:
key - the resource name
arg - the message argument
Returns:
the string

format

public static String format(String key,
                            Object[] args)
Returns the formatted message for the given key in the resource bundle.

Parameters:
key - the resource name
args - the message arguments
Returns:
the string

getBundle

public static ResourceBundle getBundle()
Returns the resource bundle that contains locale-specific messages for the UI library.

Returns:
the resource bundle that contains locale-specific messages

getString

public static String getString(String key)
Returns the resource object with the given key in the resource bundle. If there isn't any value under the given key, the key is returned.

Parameters:
key - the resource name
Returns:
the string

getString

public static String getString(String key,
                               String defaultValue)
Returns the resource object with the given key in the resource bundle. If there isn't any value under the given key, the default value is returned.

Parameters:
key - the resource name
defaultValue - the default value
Returns:
the string