com.lavantech.gui.comp
Class LocaleSpecificResources

java.lang.Object
  extended bycom.lavantech.gui.comp.LocaleSpecificResources

public class LocaleSpecificResources
extends java.lang.Object

LocaleSpecificResources class provides language specific string and other preferences for the Date Time Picker components. If string used for "OK", "Cancel", "Hour", "Min"... needs to be changed to a language other than english, this is the class that needs to be customized. The class also sets the preferences for displaying hour in 12 hour or 24 hour format. This hour preference is used in Time Panel.


Field Summary
static int HOUR_FORMAT_12
          Value of Hour format indicating 12 hour format.
static int HOUR_FORMAT_24
          Value of Hour format indicating 24 hour format.
 
Constructor Summary
LocaleSpecificResources()
           
 
Method Summary
static int getHourFormat()
          Returns the hour format preference.
static java.lang.String getLabelString(java.lang.String key)
          Returns the language specific string for a given key string.
static void setHourFormat(int format)
          Sets the hour format preference.
static void setLabelString(java.lang.String key, java.lang.String value)
          Sets the language specific string for given key string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HOUR_FORMAT_12

public static final int HOUR_FORMAT_12
Value of Hour format indicating 12 hour format.

See Also:
Constant Field Values

HOUR_FORMAT_24

public static final int HOUR_FORMAT_24
Value of Hour format indicating 24 hour format.

See Also:
Constant Field Values
Constructor Detail

LocaleSpecificResources

public LocaleSpecificResources()
Method Detail

setLabelString

public static void setLabelString(java.lang.String key,
                                  java.lang.String value)
Sets the language specific string for given key string. If there is no match for the key string, a new key is added to the resource list. The following key are predefined and set with english string.
Key StringPredefined value
okayOK
cancelCancel
hourHour
minuteMin
secondsSec
todayToday
nowNow
clearClear


getLabelString

public static java.lang.String getLabelString(java.lang.String key)
Returns the language specific string for a given key string. See setLabelString method for a list of predefined keys.

Parameters:
key - Key string for which the value will be returned.
Returns:
Language specific string for the given key string, or null if key is not defined.

setHourFormat

public static void setHourFormat(int format)
Sets the hour format preference. The hour format can either be HOUR_FORMAT_12 or HOUR_FORMAT_24. This format is used in TimePanel.


getHourFormat

public static int getHourFormat()
Returns the hour format preference. This format is used in TimePanel.