public class Localization
extends java.lang.Object
| Constructor and Description |
|---|
Localization()
Initializes a new instance of the Localization class.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(java.lang.String key)
Determines if localized text exists for specified key.
|
java.lang.String |
get(java.lang.String key)
Returns localized text for specified key.
|
void |
localize(javax.swing.JComponent control)
Localizes the specified UI component.
|
void |
setSource(java.io.InputStream stream)
Loads localized texts from specified stream.
|
void |
setSource(java.lang.String xmlFile)
Loads localized texts from specified file.
|
public Localization()
public void setSource(java.io.InputStream stream)
stream - A java.io.InputStream instance.public void setSource(java.lang.String xmlFile)
throws java.io.FileNotFoundException
xmlFile - Path to the XML file containing localized strings.java.io.FileNotFoundExceptionpublic void localize(javax.swing.JComponent control)
control - A javax.swing.JComponent instance.public boolean exists(java.lang.String key)
key - A String containing the UI element key.public java.lang.String get(java.lang.String key)
key - A String containing the UI element key.