Package org.apache.batik.util.resources
Class ResourceManager
java.lang.Object
org.apache.batik.util.resources.ResourceManager
- Direct Known Subclasses:
ButtonFactory
,MenuFactory
,ToolBarFactory
This class offers convenience methods to decode
resource bundle entries
- Version:
- $Id: ResourceManager.java 1733416 2016-03-03 07:07:13Z gadams $
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getBoolean
(String key) Returns the boolean mapped with the given keyint
getCharacter
(String key) int
getInteger
(String key) Returns the integer mapped with the given stringReturns the string that is mapped with the given keygetStringList
(String key) Returns the tokens that compose the string mapped with the given key.getStringList
(String key, String delim) Returns the tokens that compose the string mapped with the given key.getStringList
(String key, String delim, boolean returnDelims) Returns the tokens that compose the string mapped with the given key
-
Field Details
-
bundle
The managed resource bundle
-
-
Constructor Details
-
ResourceManager
Creates a new resource manager- Parameters:
rb
- a resource bundle
-
-
Method Details
-
getString
Returns the string that is mapped with the given key- Parameters:
key
- a key in the resource bundle- Throws:
MissingResourceException
- if key is not the name of a resource
-
getStringList
Returns the tokens that compose the string mapped with the given key. Delimiters (" \t\n\r\f") are not returned.- Parameters:
key
- a key of the resource bundle- Throws:
MissingResourceException
- if key is not the name of a resource
-
getStringList
Returns the tokens that compose the string mapped with the given key. Delimiters are not returned.- Parameters:
key
- a key of the resource bundledelim
- the delimiters of the tokens- Throws:
MissingResourceException
- if key is not the name of a resource
-
getStringList
public List getStringList(String key, String delim, boolean returnDelims) throws MissingResourceException Returns the tokens that compose the string mapped with the given key- Parameters:
key
- a key of the resource bundledelim
- the delimiters of the tokensreturnDelims
- if true, the delimiters are returned in the list- Throws:
MissingResourceException
- if key is not the name of a resource
-
getBoolean
Returns the boolean mapped with the given key- Parameters:
key
- a key of the resource bundle- Throws:
MissingResourceException
- if key is not the name of a resourceResourceFormatException
- if the resource is malformed
-
getInteger
Returns the integer mapped with the given string- Parameters:
key
- a key of the resource bundle- Throws:
MissingResourceException
- if key is not the name of a resourceResourceFormatException
- if the resource is malformed
-
getCharacter
-