|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sciapp.common.gui.TableResourceManager
public class TableResourceManager
TableResourceManager is used to add internationalization support. A ResourceBundle instance is used which contains the String key/value pairs. By default, a resource bundle is created with the default locale, which looks for a file with the name TableLibraryBundle.properties. By modifying the contents of this file, or by creating a new one in the format TableLibraryBundle_[locale].properties, you can customize the look of the gui components of Table Library.
Field Summary | |
---|---|
static String |
RESOURCE_NAME
The default resource name for Table Library. |
Method Summary | |
---|---|
static ResourceBundle |
getResourceBundle()
Retrieves the assigned resource bundle. |
static String |
getString(String resourceKey)
Retrieves the assigned string for the given key. |
static TableResourceManager |
instance()
Retrieves the TableResourceManager instance. |
static void |
setResourceBundle(ResourceBundle resource)
Assigns a new resource bundle. |
static void |
setResourceBundle(String resource)
Assigns the resource bundle given by resource with the default locale. |
static void |
setResourceBundle(String resource,
Locale locale)
Assigns the resource bundle given by resource with the specified locale. |
static void |
setUpdateComponents(boolean update)
Determines whether the components that make use of the Table Library resource bundle will re-initialize themselves with the new property values, when their UI is updated. |
static boolean |
updateComponents()
Determines whether the components that make use of the Table Library resource bundle will re-initialize themselves with the new property values, when their UI is updated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RESOURCE_NAME
Method Detail |
---|
public static ResourceBundle getResourceBundle()
public static final String getString(String resourceKey)
resourceKey
- the key to which a value from the resource bundle corresponds.
public static TableResourceManager instance()
public static void setResourceBundle(String resource)
resource
- the resource's namepublic static void setResourceBundle(String resource, Locale locale)
resource
- the resource's namelocale
- the locale to usepublic static void setResourceBundle(ResourceBundle resource)
resource
- the resource bundle to assign.public static void setUpdateComponents(boolean update)
To update the UI of an entire component or even frame, you can use the Swing utility
method SwingUtilities.updateComponentTreeUI(Component c)
.
update
- true, if the components will be reinitialized once their UI is updated, false otherwise.public static boolean updateComponents()
To update the UI of an entire component or even frame, you can use the Swing utility
method SwingUtilities.updateComponentTreeUI(Component c)
.
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |