public class ResourceBundleUtil extends Object
Constructor | Description |
---|---|
ResourceBundleUtil(ResourceBundle r) |
Creates a new ResouceBundleUtil which wraps
the provided resource bundle.
|
Modifier and Type | Method | Description |
---|---|---|
KeyStroke |
getAcc(String key) |
Get a KeyStroke from the ResourceBundle.
|
static ResourceBundleUtil |
getBundle(String baseName) |
Get the appropriate ResourceBundle subclass.
|
String |
getFormatted(String key,
Object argument) |
|
String |
getFormatted(String key,
Object[] arguments) |
|
ImageIcon |
getImageIcon(String key,
Class baseClass) |
Get an image icon from the ResourceBundle.
|
KeyStroke |
getKeyStroke(String key) |
Get a KeyStroke from the ResourceBundle.
|
static ResourceBundleUtil |
getLAFBundle(String baseName) |
Get the appropriate ResourceBundle subclass.
|
static ResourceBundleUtil |
getLAFBundle(String baseName,
Locale locale) |
Get the appropriate ResourceBundle subclass.
|
Locale |
getLocale() |
|
char |
getMnem(String key) |
Get a Mnemonic from the ResourceBundle.
|
char |
getMnemonic(String key) |
Get a Mnemonic from the ResourceBundle.
|
String |
getString(String key) |
Get a String from the ResourceBundle.
|
public ResourceBundleUtil(ResourceBundle r)
public String getString(String key)
key
- The key of the property.public ImageIcon getImageIcon(String key, Class baseClass)
key
- The key of the property.public char getMnemonic(String key)
key
- The key of the property.public char getMnem(String key)
key
- The key of the property. This method appends "Mnem" to the key.public KeyStroke getKeyStroke(String key)
key
- The key of the property.javax.swing.KeyStroke.getKeyStroke(value)
.
Returns null if the property is missing.public KeyStroke getAcc(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 Locale getLocale()
public static ResourceBundleUtil getBundle(String baseName) throws MissingResourceException
MissingResourceException
ResourceBundle
public static ResourceBundleUtil getLAFBundle(String baseName) throws MissingResourceException
MissingResourceException
ResourceBundle
public static ResourceBundleUtil getLAFBundle(String baseName, Locale locale) throws MissingResourceException
MissingResourceException
ResourceBundle