org.walluck.oscar.components
Class IconManager

java.lang.Object
  extended by org.walluck.oscar.components.IconManager

public class IconManager
extends Object

Class IconManager This class manages the icons loaded by DAIM. It ensures that icons are loaded only once, and in the future can manage icon themes. It operates as a singleton, providing an icon cache.

Author:
Alain Penders

Constructor Summary
IconManager()
           
 
Method Summary
 ImageIcon getIcon(String name)
          Get an icon identified by name.
static IconManager getInstance()
          Singleton instantiator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IconManager

public IconManager()
Method Detail

getInstance

public static IconManager getInstance()
Singleton instantiator.

Returns:
Instance of this class

getIcon

public ImageIcon getIcon(String name)
Get an icon identified by name. The name should not start with "img/", as it's assumed that all icons reside under that directory. The name should not include the file type (e.g. ".gif"). Once an icon has been loaded, it is cached for future use.

Parameters:
name - Name of the icon to load.
Returns:
ImageIcon on success, null on failure.