rcf.system.gui.icons
Class IconsHelpers

java.lang.Object
  extended by rcf.system.gui.icons.IconsHelpers

@Revision(value="$Revision: 1.3 $",
          date="$Date: 2006/12/16 17:51:52 $",
          tag="$Name:  $")
public abstract class IconsHelpers
extends Object

A series of helper methods which abstract simple operations that are frequently used by a wide variety of code. This class exists for no other reason than Java insists that all functions be class methods.

TODO: Unit tests, Code review, Javadoc review, Seal/Finalize

Version:
$Revision: 1.3 $
Author:
Greg Gibeling

Field Summary
protected static rcf.core.util.map.HashSetMap<Icon,String> iconCache
          A cache of the icons which have been loaded by getIcon(String) used to avoid disc accesses on every call.
 
Constructor Summary
private IconsHelpers()
          Dummy constructor to ensure that this class is never instantiated.
 
Method Summary
static Icon getIcon(String name)
          Get the icon, which is located in this package, from it's filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iconCache

protected static rcf.core.util.map.HashSetMap<Icon,String> iconCache
A cache of the icons which have been loaded by getIcon(String) used to avoid disc accesses on every call. Note that this cache is indexed by the full filename of the icon, including it's extension.

Constructor Detail

IconsHelpers

private IconsHelpers()
Dummy constructor to ensure that this class is never instantiated.

Method Detail

getIcon

public static final Icon getIcon(String name)
Get the icon, which is located in this package, from it's filename. Note that the filename need not include any extension, but must be the correct case.

Returns:
An Icon loaded from the specified filename in this package.