|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttranslator.ExtendedResourceBundle
public class ExtendedResourceBundle
A special type of PropertyResourceBundle support
| Field Summary | |
|---|---|
static java.lang.String |
ASCII_FORMAT
|
(package private) java.util.PropertyResourceBundle |
bundle
The property resource bundle used for storing the current resources |
(package private) java.util.Vector<ExtendedResourceBundle> |
componentBundles
|
static java.lang.String |
PROPERTY_FORMAT
|
| Constructor Summary | |
|---|---|
ExtendedResourceBundle(java.lang.String filename)
Generate a new bundle from the given name and language code |
|
ExtendedResourceBundle(java.lang.String filename,
java.lang.String formatName)
Generate a new bundle from the given name and language code |
|
| Method Summary | |
|---|---|
java.lang.String[] |
getKeys()
Retrieve the keys of this resource |
java.lang.String |
getMessage(java.lang.String key)
Convenvience wrapper for retrieving the message for key 'key' Internally invokes getMessage(key, true) |
java.lang.String |
getMessage(java.lang.String key,
boolean warnOnError)
Method for retrieving the message for key 'key' |
Translator |
getTranslator()
retrieves the actual Translator instance to be used |
void |
printProperties()
Print the properties stored in the bundle to System.out |
void |
printProperties(java.io.PrintStream outputStream)
Print the properties stored in the bundle to System.out |
void |
setTranslator(Translator trans)
assigns the current Translator for this resource bundle |
| 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 ASCII_FORMAT
public static final java.lang.String PROPERTY_FORMAT
java.util.PropertyResourceBundle bundle
java.util.Vector<ExtendedResourceBundle> componentBundles
| Constructor Detail |
|---|
public ExtendedResourceBundle(java.lang.String filename)
filename - the file name
public ExtendedResourceBundle(java.lang.String filename,
java.lang.String formatName)
filename - the file nameformatName - the name of the chosen format| Method Detail |
|---|
public java.lang.String[] getKeys()
public java.lang.String getMessage(java.lang.String key)
key - the key of the message to retrieve
getMessage(String, boolean)
public java.lang.String getMessage(java.lang.String key,
boolean warnOnError)
key - the key of the message to retrievewarnOnError - if true, display a warning on System.out if no appropriate
resource was found.
public Translator getTranslator()
public void printProperties()
public void printProperties(java.io.PrintStream outputStream)
public void setTranslator(Translator trans)
trans - the translator to be used. If null, a default translator is used.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||