|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pfsw.nls.ResourceBundleTextProvider
public class ResourceBundleTextProvider
This is a simple wrapper around a resource bundle to give it the same interface ITextProvider as available for a TextContainer.
Constructor Summary | |
---|---|
ResourceBundleTextProvider(java.util.ResourceBundle bundle)
Initialize the new instance with default values. |
Method Summary | |
---|---|
boolean |
containsNothing()
Returns true if this text provider holds no text and also its default text provider contains nothing. |
java.util.Locale |
getLocale()
Returns the locale the underlying resource bundle was created |
java.util.Locale[] |
getLocales()
Returns the locales for which this text provider has text |
java.util.ResourceBundle |
getResourceBundle()
Returns the wrapped resource bundle |
java.lang.String |
getText(java.lang.String key)
Returns the text associated with the given key or null if the key cannot be found. |
void |
setResourceBundle(java.util.ResourceBundle newValue)
Set the wrapped resource bundle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceBundleTextProvider(java.util.ResourceBundle bundle)
Method Detail |
---|
public java.lang.String getText(java.lang.String key)
getText
in interface ITextProvider
key
- The identifier for the textpublic boolean containsNothing()
containsNothing
in interface IExtendedTextProvider
public java.util.Locale[] getLocales()
getLocales
in interface IExtendedTextProvider
public java.util.Locale getLocale()
public java.util.ResourceBundle getResourceBundle()
public void setResourceBundle(java.util.ResourceBundle newValue)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |