org.graffiti.core
Class Bundle

java.lang.Object
  extended by org.graffiti.core.Bundle

public final class Bundle
extends Object

A generalized localized resource bundle. This class replaces GenericBundle, ImageBundle and StringBundle.


Method Summary
 boolean containsKey(String key)
           
 String format(String key, Object... args)
           
static Bundle getBundle(Class<?> clazz)
          Returns the bundle of the specfied class.
static Bundle getCoreBundle()
           
 ImageIcon getIcon(String key)
          Returns the specified image icon or a blank icon, if the specified image icon could not be found.
 Image getImage(String key)
          Returns the specified image or a blank image, if the specified image could not be found.
 URL getResource(String key)
          Returns the relative location of the specified resource.
 String getString(String key)
          Returns the specified String from the properties, null if there is no such key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCoreBundle

public static Bundle getCoreBundle()

getBundle

public static Bundle getBundle(Class<?> clazz)
Returns the bundle of the specfied class.

Parameters:
clazz - the class identifying the bundle.
Returns:
the bundle of the specfied class.

format

public String format(String key,
                     Object... args)

getIcon

public ImageIcon getIcon(String key)
Returns the specified image icon or a blank icon, if the specified image icon could not be found.

Parameters:
key - the property name of the icon.
Returns:
the specified image icon.

getImage

public Image getImage(String key)
Returns the specified image or a blank image, if the specified image could not be found.

Parameters:
key - the property name of the image.
Returns:
the specified image.

getString

public String getString(String key)
Returns the specified String from the properties, null if there is no such key.

Parameters:
key - the key of the string to look up.
Returns:
the value of the looked up key.

getResource

public URL getResource(String key)
Returns the relative location of the specified resource.

Parameters:
key - the name of the resource.
Returns:
the relative location of the specified resource.

containsKey

public boolean containsKey(String key)


Generated at 2012-05-30 11:00:36 PM CEST