Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.batik.util.resources
Class ResourceManager

    java.lang.Object
      org.apache.batik.util.resources.ResourceManager

Direct Known Subclasses:
  ButtonFactory, MenuFactory, ToolBarFactory

    public class ResourceManager

extends Object

This class offers convenience methods to decode resource bundle entries

Field Summary
`protected ResourceBundle` | `bundle` The managed resource bundle

Constructor Summary
`ResourceManager(ResourceBundle rb)` Creates a new resource manager

Method Summary
`boolean` | `getBoolean(String key)` Returns the boolean mapped with the given key
`int` | `getCharacter(String key)`
`int` | `getInteger(String key)` Returns the integer mapped with the given string
`String` | `getString(String key)` Returns the string that is mapped with the given key
`List` | `getStringList(String key)` Returns the tokens that compose the string mapped with the given key.
`List` | `getStringList(String key, String delim)` Returns the tokens that compose the string mapped with the given key.
`List` | `getStringList(String key, String delim, boolean returnDelims)` Returns the tokens that compose the string mapped with the given key

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### bundle

    protected ResourceBundle bundle

  The managed resource bundle

Constructor Detail

### ResourceManager

    public ResourceManager(ResourceBundle rb)

  Creates a new resource manager

  Parameters:
    `rb` - a resource bundle

Method Detail

### getString

    public String getString(String key)
                     throws MissingResourceException

  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

    public List getStringList(String key)
                       throws MissingResourceException

  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

    public List getStringList(String key,
                              String delim)
                       throws MissingResourceException

  Returns the tokens that compose the string mapped with the given key. Delimiters are not returned.

  Parameters:
    `key` - a key of the resource bundle
    `delim` - 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 bundle
    `delim` - the delimiters of the tokens
    `returnDelims` - if true, the delimiters are returned in the list
  Throws:
    `MissingResourceException` - if key is not the name of a resource

### getBoolean

    public boolean getBoolean(String key)
                       throws MissingResourceException,
                              ResourceFormatException

  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 resource
    `ResourceFormatException` - if the resource is malformed

### getInteger

    public int getInteger(String key)
                   throws MissingResourceException,
                          ResourceFormatException

  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 resource
    `ResourceFormatException` - if the resource is malformed

### getCharacter

    public int getCharacter(String key)
                     throws MissingResourceException,
                            ResourceFormatException

  Throws:
    `MissingResourceException`
    `ResourceFormatException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Apache Software Foundation. All Rights Reserved.