org.jfree.util
public class ResourceBundleSupport extends Object
a.key.name=@referenced.keyA lookup to a key in an other resource bundle should be written by
a.key.name=@@resourcebundle_name@referenced.key
| Constructor Summary | |
|---|---|
| ResourceBundleSupport(Locale locale, String baseName)
Creates a new instance.
| |
| protected | ResourceBundleSupport(Locale locale, ResourceBundle resourceBundle, String baseName)
Creates a new instance.
|
| ResourceBundleSupport(Locale locale, ResourceBundle resourceBundle)
Creates a new instance.
| |
| ResourceBundleSupport(String baseName)
Creates a new instance.
| |
| protected | ResourceBundleSupport(ResourceBundle resourceBundle, String baseName)
Creates a new instance.
|
| ResourceBundleSupport(ResourceBundle resourceBundle)
Creates a new instance.
| |
| Method Summary | |
|---|---|
| JMenu | createMenu(String keyPrefix)
Returns a JMenu created from a resource bundle definition.
|
| Icon | createTransparentIcon(int width, int height)
Creates a transparent icon. |
| String | formatMessage(String key, Object parameter)
Formats the message stored in the resource bundle (using a
MessageFormat).
|
| String | formatMessage(String key, Object par1, Object par2)
Formats the message stored in the resource bundle (using a
MessageFormat).
|
| String | formatMessage(String key, Object[] parameters)
Formats the message stored in the resource bundle (using a
MessageFormat).
|
| Icon | getIcon(String key, boolean large)
Returns an scaled icon suitable for buttons or menus.
|
| Icon | getIcon(String key)
Returns an unscaled icon.
|
| KeyStroke | getKeyStroke(String key)
Returns the keystroke stored at the given resourcebundle key.
|
| KeyStroke | getKeyStroke(String key, int mask)
Returns the keystroke stored at the given resourcebundle key.
|
| Locale | getLocale()
Returns the current locale for this resource bundle.
|
| Integer | getMnemonic(String key)
Returns the mnemonic stored at the given resourcebundle key. |
| KeyStroke | getOptionalKeyStroke(String key)
Returns an optional key stroke.
|
| KeyStroke | getOptionalKeyStroke(String key, int mask)
Returns an optional key stroke.
|
| Integer | getOptionalMnemonic(String key)
Returns an optional mnemonic.
|
| protected String | getResourceBase()
The base name of the resource bundle.
|
| URL | getResourceURL(String key)
Returns a URL pointing to a resource located in the classpath. |
| String | getString(String key)
Gets a string for the given key from this resource bundle or one of its
parents. |
| protected String | internalGetString(String key)
Performs the lookup for the given key. |
Parameters: locale the locale. baseName the base name of the resource bundle, a fully qualified class name
Parameters: locale the locale for which this resource bundle is created. resourceBundle the resourcebundle baseName the base name of the resource bundle, a fully qualified class name
Parameters: locale the locale for which the resource bundle is created. resourceBundle the resourcebundle
Parameters: baseName the base name of the resource bundle, a fully qualified class name
Parameters: resourceBundle the resourcebundle baseName the base name of the resource bundle, a fully qualified class name
Parameters: resourceBundle the resourcebundle
# define the file menu menu.file.name=File menu.file.mnemonic=FThe menu definition above can be used to create the menu by calling
createMenu ("menu.file").
Parameters: keyPrefix the common prefix for that menu
Returns: the created menu
Parameters: width the width of the new icon height the height of the new icon
Returns: the created transparent icon.
Parameters: key the resourcebundle key parameter the parameter for the message
Returns: the formated string
Parameters: key the resourcebundle key par1 the first parameter for the message par2 the second parameter for the message
Returns: the formated string
Parameters: key the resourcebundle key parameters the parameter collection for the message
Returns: the formated string
Parameters: key the name of the resource bundle key large true, if the image should be scaled to 24x24, or false for 16x16
Returns: the icon.
Parameters: key the name of the resource bundle key
Returns: the icon.
a.resourcebundle.key=VK_A an.other.resourcebundle.key=a
Parameters: key the resourcebundle key
Returns: the mnemonic
See Also: Toolkit#getMenuShortcutKeyMask()
a.resourcebundle.key=VK_A an.other.resourcebundle.key=a
Parameters: key the resourcebundle key. mask the mask.
Returns: the mnemonic
See Also: Toolkit#getMenuShortcutKeyMask()
Returns: the locale.
a.resourcebundle.key=ENTER an.other.resourcebundle.key=\n
Parameters: key the resourcebundle key
Returns: the mnemonic
Parameters: key the key.
Returns: The key stroke.
Parameters: key the key. mask the mask.
Returns: The key stroke.
Parameters: key the key.
Returns: The mnemonic.
Returns: the resource bundle's name.
mainmenu.logo=org/jfree/resources/logo.gifThe URL for that file can be queried with:
getResource("mainmenu.logo");.
Parameters: key the key for the resource
Returns: the resource URL
Parameters: key the key for the desired string
Returns: the string for the given key
Throws: NullPointerException if key is null MissingResourceException if no object for the given key can be
found ClassCastException if the object found for the given key is
not a string
Parameters: key the key for the string
Returns: the string for the given key