|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.curre.prefcount.util.LocaleExt
public class LocaleExt
Object of this class represents locale with extended functionality/properties.
Created date: Jun 2, 2007
| Nested Class Summary | |
|---|---|
static interface |
LocaleExt.LocaleExec
Helper interface to assist with changing locale-sensitive messages. |
static class |
LocaleExt.Triple
Class to represent a "locale-sensitive" component with its key. |
| Constructor Summary | |
|---|---|
LocaleExt(java.lang.String language,
java.lang.String country,
java.lang.String displayLanguage)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
static void |
fireLocaleChangeEvent()
Updates the text/label/title on all registered components when the application locale changes. |
java.lang.String |
getDisplayLanguage()
Getter for the language display name. |
java.util.Locale |
getLocale()
Getter for the reference to the locale object. |
javax.swing.ImageIcon |
getLocaleIcon()
Gets the icon that represents this locale. |
static java.lang.String |
getString(java.lang.String key,
java.lang.String... keyArgs)
Gets the string resource for the given key. |
int |
hashCode()
|
static void |
registerComponent(java.lang.Object component,
java.lang.String key,
java.lang.String... keyArgs)
Registers a "locale-sensitive" component so it's label is updated when the application locale changes. |
static void |
registerComponent(java.lang.Object component,
WindowComponent keyEnum,
java.lang.String... keyArgs)
Registers a "locale-sensitive" component so it's label is updated when the application locale changes. |
static void |
registerShortcuts(javax.swing.InputMap map,
java.lang.String... shortcutKeys)
This method will register shortcuts with the given input map. |
static void |
reregisterComponent(java.lang.Object component,
java.lang.String key,
java.lang.String... keyArgs)
Reregisters a "locale-sensitive" component so it's label is updated when the application locale changes. |
java.lang.String |
toString()
|
static void |
unregisterAllComponents()
Unregisters all currently registered components. |
static void |
unregisterComponent(java.awt.Component component)
Unregisters locale sensitive component. |
static void |
unregisterComponents(java.util.Collection<java.awt.Component> components)
Unregisters locale sensitive components. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LocaleExt(java.lang.String language,
java.lang.String country,
java.lang.String displayLanguage)
language - Locale language.country - Locale country.displayLanguage - Language display name.| Method Detail |
|---|
public java.util.Locale getLocale()
public java.lang.String getDisplayLanguage()
public javax.swing.ImageIcon getLocaleIcon()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
public static java.lang.String getString(java.lang.String key,
java.lang.String... keyArgs)
key - key for a resource to fetch.keyArgs - array of arguments for the resource key (optional).
public static void registerComponent(java.lang.Object component,
WindowComponent keyEnum,
java.lang.String... keyArgs)
component - reference to the component.keyEnum - WindowComponent enum that represents the component.keyArgs - array of arguments for the resource key (optional).
public static void registerComponent(java.lang.Object component,
java.lang.String key,
java.lang.String... keyArgs)
component - reference to the component.key - string resource key for the component.keyArgs - array of arguments for the resource key (optional).
public static void reregisterComponent(java.lang.Object component,
java.lang.String key,
java.lang.String... keyArgs)
component - reference to the component.key - string resource key for the component.keyArgs - array of arguments for the resource key (optional).public static void unregisterAllComponents()
public static void unregisterComponents(java.util.Collection<java.awt.Component> components)
components - components to unregister.public static void unregisterComponent(java.awt.Component component)
component - component to unregister.public static void fireLocaleChangeEvent()
public static void registerShortcuts(javax.swing.InputMap map,
java.lang.String... shortcutKeys)
map - component's input map to add shortcuts to.shortcutKeys - array of shortcuts' resource keys.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||