public class ResourceBundleUtil
extends java.lang.Object
| Constructor and Description |
|---|
ResourceBundleUtil(java.util.ResourceBundle r)
Creates a new ResouceBundleUtil which wraps
the provided resource bundle.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public ResourceBundleUtil(java.util.ResourceBundle r)
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.MissingResourceExceptionResourceBundlepublic static ResourceBundleUtil getLAFBundle(java.lang.String baseName) throws java.util.MissingResourceException
java.util.MissingResourceExceptionResourceBundlepublic static ResourceBundleUtil getLAFBundle(java.lang.String baseName, java.util.Locale locale) throws java.util.MissingResourceException
java.util.MissingResourceExceptionResourceBundle