|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jomic.tools.LocaleTools
public final class LocaleTools
Tools for localization.
Field Summary | |
---|---|
static java.lang.String |
MENU_EDIT
|
static java.lang.String |
MENU_FILE
|
static java.lang.String |
MENU_GO
|
static java.lang.String |
MENU_HELP
|
static java.lang.String |
MENU_VIEW
|
Method Summary | |
---|---|
java.lang.String |
asByteText(long amount)
|
javax.swing.JButton |
createButton(java.lang.String buttonKey)
|
javax.swing.JButton |
createCancelButton()
|
javax.swing.JMenu |
createMenu(java.lang.String menuKey)
|
javax.swing.JMenuItem |
createMenuItem(java.lang.String subMenu,
java.lang.String itemKey)
|
javax.swing.JRadioButtonMenuItem |
createRadioButtonMenuItem(java.lang.String subMenu,
javax.swing.ButtonGroup group,
java.lang.String itemKey)
|
java.util.ResourceBundle |
getBundle()
Get ResourceBundle for localization. |
java.lang.String |
getCancelText()
Get text to be used for "Cancel" buttons. |
java.util.Locale |
getLocale()
|
java.util.Locale |
getLocaleForLanguageCountryVariant(java.lang.String languageCountryVariant)
Get locale specified by languageCountryVariant . |
java.lang.String |
getMenuItemLabel(java.lang.String subMenu,
java.lang.String itemKey)
|
java.lang.String |
getMenuLabel(java.lang.String menuKey)
|
java.lang.String |
getMessage(java.lang.String key)
Get localized message (without options). |
java.lang.String |
getMessage(java.lang.String key,
java.lang.Object option)
Get localized message with one option referred to as {0}. |
java.lang.String |
getMessage(java.lang.String key,
java.lang.Object[] options)
Get localized message with several options referred to as {0}, {1}, and so on. |
java.lang.String |
getOkText()
Get text to be used for "OK" buttons. |
static LocaleTools |
instance()
|
java.lang.String[] |
parseLanguageCountryVariant(java.lang.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(java.beans.PropertyChangeEvent event)
|
void |
setLocale(java.util.Locale newLocale)
Set Locale to use with Jomic. |
void |
setLocale(java.lang.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 java.lang.String MENU_EDIT
public static final java.lang.String MENU_FILE
public static final java.lang.String MENU_GO
public static final java.lang.String MENU_HELP
public static final java.lang.String MENU_VIEW
Method Detail |
---|
public void setLocale(java.util.Locale newLocale)
public void setLocale(java.lang.String displayName)
public java.util.ResourceBundle getBundle()
public java.lang.String getCancelText()
public java.util.Locale getLocale()
public java.util.Locale getLocaleForLanguageCountryVariant(java.lang.String languageCountryVariant)
languageCountryVariant
.
languageCountryVariant
- text of the form "language_region_variant", for example "en"
or "de_AT"public java.lang.String getMenuItemLabel(java.lang.String subMenu, java.lang.String itemKey)
public java.lang.String getMenuLabel(java.lang.String menuKey)
public java.lang.String getMessage(java.lang.String key)
public java.lang.String getMessage(java.lang.String key, java.lang.Object[] options)
public java.lang.String getMessage(java.lang.String key, java.lang.Object option)
public java.lang.String getOkText()
public static LocaleTools instance()
public java.lang.String asByteText(long amount)
public javax.swing.JButton createButton(java.lang.String buttonKey)
public javax.swing.JButton createCancelButton()
public javax.swing.JMenu createMenu(java.lang.String menuKey)
public javax.swing.JMenuItem createMenuItem(java.lang.String subMenu, java.lang.String itemKey)
public javax.swing.JRadioButtonMenuItem createRadioButtonMenuItem(java.lang.String subMenu, javax.swing.ButtonGroup group, java.lang.String itemKey)
public java.lang.String[] parseLanguageCountryVariant(java.lang.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(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |