|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcontrib.ch.randelshofer.quaqua.util.ResourceBundleUtil
public class ResourceBundleUtil
This is a convenience wrapper for accessing resources stored in a ResourceBundle.
Constructor Summary | |
---|---|
ResourceBundleUtil(java.util.ResourceBundle r)
Creates a new ResouceBundleUtil which wraps the provided resource bundle. |
Method Summary | |
---|---|
javax.swing.KeyStroke |
getAcc(java.lang.String key)
Get a KeyStroke from the ResourceBundle. |
static ResourceBundleUtil |
getBundle(java.lang.String baseName)
Get the appropriate ResourceBundle subclass. |
java.lang.String |
getFormatted(java.lang.String key,
java.lang.Object argument)
|
java.lang.String |
getFormatted(java.lang.String key,
java.lang.Object[] arguments)
|
javax.swing.ImageIcon |
getImageIcon(java.lang.String key,
java.lang.Class baseClass)
Get an image icon from the ResourceBundle. |
javax.swing.KeyStroke |
getKeyStroke(java.lang.String key)
Get a KeyStroke from the ResourceBundle. |
static ResourceBundleUtil |
getLAFBundle(java.lang.String baseName)
Get the appropriate ResourceBundle subclass. |
static ResourceBundleUtil |
getLAFBundle(java.lang.String baseName,
java.util.Locale locale)
Get the appropriate ResourceBundle subclass. |
java.util.Locale |
getLocale()
|
char |
getMnem(java.lang.String key)
Get a Mnemonic from the ResourceBundle. |
char |
getMnemonic(java.lang.String key)
Get a Mnemonic from the ResourceBundle. |
java.lang.String |
getString(java.lang.String key)
Get a String from the ResourceBundle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceBundleUtil(java.util.ResourceBundle r)
Method Detail |
---|
public java.lang.String getString(java.lang.String key)
key
- The key of the property.
public javax.swing.ImageIcon getImageIcon(java.lang.String key, java.lang.Class baseClass)
key
- The key of the property.
public char getMnemonic(java.lang.String key)
key
- The key of the property.
public char getMnem(java.lang.String key)
key
- The key of the property. This method appends "Mnem" to the key.
public javax.swing.KeyStroke getKeyStroke(java.lang.String key)
key
- The key of the property.
javax.swing.KeyStroke.getKeyStroke(value)
.
Returns null if the property is missing.public javax.swing.KeyStroke getAcc(java.lang.String key)
key
- The key of the property. This method adds "Acc" to the key.
javax.swing.KeyStroke.getKeyStroke(value)
.
Returns null if the property is missing.public java.lang.String getFormatted(java.lang.String key, java.lang.Object argument)
public java.lang.String getFormatted(java.lang.String key, java.lang.Object[] arguments)
public java.util.Locale getLocale()
public static ResourceBundleUtil getBundle(java.lang.String baseName) throws java.util.MissingResourceException
java.util.MissingResourceException
ResourceBundle
public static ResourceBundleUtil getLAFBundle(java.lang.String baseName) throws java.util.MissingResourceException
java.util.MissingResourceException
ResourceBundle
public static ResourceBundleUtil getLAFBundle(java.lang.String baseName, java.util.Locale locale) throws java.util.MissingResourceException
java.util.MissingResourceException
ResourceBundle
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |