|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jomic.tools.LocaleTools
public final class LocaleTools
Tools for localization.
| Field Summary | |
|---|---|
static String |
MENU_EDIT
|
static String |
MENU_FILE
|
static String |
MENU_GO
|
static String |
MENU_HELP
|
static String |
MENU_VIEW
|
| Method Summary | |
|---|---|
String |
asByteText(long amount)
|
JButton |
createButton(String buttonKey)
|
JButton |
createCancelButton()
|
JMenu |
createMenu(String menuKey)
|
JMenuItem |
createMenuItem(String subMenu,
String itemKey)
|
JRadioButtonMenuItem |
createRadioButtonMenuItem(String subMenu,
ButtonGroup group,
String itemKey)
|
ResourceBundle |
getBundle()
Get ResourceBundle for localization. |
String |
getCancelText()
Get text to be used for "Cancel" buttons. |
Locale |
getLocale()
|
Locale |
getLocaleForLanguageCountryVariant(String languageCountryVariant)
Get locale specified by languageCountryVariant. |
String |
getMenuItemLabel(String subMenu,
String itemKey)
|
String |
getMenuLabel(String menuKey)
|
String |
getMessage(String key)
Get localized message (without options). |
String |
getMessage(String key,
Object option)
Get localized message with one option referred to as {0}. |
String |
getMessage(String key,
Object[] options)
Get localized message with several options referred to as {0}, {1}, and so on. |
String |
getOkText()
Get text to be used for "OK" buttons. |
static LocaleTools |
instance()
|
String[] |
parseLanguageCountryVariant(String languageCountryVariant)
Parse a string of the form "language_country_variant" (with any of the elements being optional), and return an array containing the elements. |
void |
propertyChange(PropertyChangeEvent event)
|
void |
setLocale(Locale newLocale)
Set Locale to use with Jomic. |
void |
setLocale(String displayName)
Set Locale to use with Jomic. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MENU_EDIT
public static final String MENU_FILE
public static final String MENU_GO
public static final String MENU_HELP
public static final String MENU_VIEW
| Method Detail |
|---|
public void setLocale(Locale newLocale)
public void setLocale(String displayName)
public ResourceBundle getBundle()
public String getCancelText()
public Locale getLocale()
public Locale getLocaleForLanguageCountryVariant(String languageCountryVariant)
languageCountryVariant.
languageCountryVariant - text of the form "language_region_variant", for example "en"
or "de_AT"
public String getMenuItemLabel(String subMenu,
String itemKey)
public String getMenuLabel(String menuKey)
public String getMessage(String key)
public String getMessage(String key,
Object[] options)
public String getMessage(String key,
Object option)
public String getOkText()
public static LocaleTools instance()
public String asByteText(long amount)
public JButton createButton(String buttonKey)
public JButton createCancelButton()
public JMenu createMenu(String menuKey)
public JMenuItem createMenuItem(String subMenu,
String itemKey)
public JRadioButtonMenuItem createRadioButtonMenuItem(String subMenu,
ButtonGroup group,
String itemKey)
public String[] parseLanguageCountryVariant(String languageCountryVariant)
"").
languageCountryVariant - of the form "language_region_variant", for example "en" or
"de_AT", or null to indicate the default Locale.public void propertyChange(PropertyChangeEvent event)
propertyChange in interface PropertyChangeListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||