cz.cmc.tcgui
Class ResourceManager

java.lang.Object
  extended bycz.cmc.tcgui.ResourceManager
Direct Known Subclasses:
DefaultResourceManager

public class ResourceManager
extends Object

Title: TCGui bundle wrapper

Description: Class Bundles provides internationalization and resource management support. It also contain support for images and icons.

Copyright: Copyright (c) 2003

Company: CMC Computers

See Also:
ResourceBundle

Nested Class Summary
 class ResourceManager.ResourceException
           
 
Constructor Summary
ResourceManager(ResourceBundle rb)
          Creates a new Bundle wrapper.
 
Method Summary
 Image getImage(String key)
          Get a resource as an image.
 ImageIcon getImageIcon(String key)
          Get a resource as an image icon.
 ResourceManager getNestedResourceManager(String key)
           
 Object getObject(String key)
           
 URL getResource(String key)
          Get a resource as an absolute URL.
 InputStream getResourceAsStream(String key)
          Get a resource as an input stream.
 String getString(String key)
          Returns the internationalized String
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResourceManager

public ResourceManager(ResourceBundle rb)
Creates a new Bundle wrapper.

Parameters:
rb - bundle to wrap
Method Detail

toString

public String toString()
Returns:
the wrapped bundle toString()

getString

public String getString(String key)
Returns the internationalized String

Parameters:
key - key to search for

getObject

public Object getObject(String key)
Parameters:
key - key to search for
Returns:
the internationalized Object

getResource

public URL getResource(String key)
Get a resource as an absolute URL.


getNestedResourceManager

public ResourceManager getNestedResourceManager(String key)

getResourceAsStream

public InputStream getResourceAsStream(String key)
Get a resource as an input stream.


getImageIcon

public ImageIcon getImageIcon(String key)
Get a resource as an image icon. Return null if not found.


getImage

public Image getImage(String key)
Get a resource as an image. Return null if not found.