com.dlsc.flexgantt.icons
Class IconRegistry

java.lang.Object
  extended by com.dlsc.flexgantt.icons.IconRegistry

public class IconRegistry
extends java.lang.Object

The icon registry provides access to the icon set used by the framework. An internal icon map manages the icons. The map is pluggable in order to support the easy replacement of the entire icon set. The registry is for internal use only. It can not be used to store and retrieve application-specific icons.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
Gif16IconMap

Method Summary
static javax.swing.Icon getIcon(IconId id)
          Returns the icon specified by the given ID.
static IIconMap getIconMap()
          Returns the icon map that is currently being used by the registry to lookup and store icons.
static java.awt.Image getImage(IconId id)
          Returns the image specified by the given ID.
static void setIcon(IconId id, javax.swing.Icon icon)
          Specifies a new icon for the given ID.
static void setIconMap(IIconMap iconMap)
          Sets the icon map used by the registry to lookup and store icons.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getIcon

public static javax.swing.Icon getIcon(IconId id)
Returns the icon specified by the given ID.

Parameters:
id - the icon ID
Returns:
the icon that is mapped to the given ID
Since:
1.0

getImage

public static java.awt.Image getImage(IconId id)
Returns the image specified by the given ID.

Parameters:
id - the image ID
Returns:
the image that is mapped to the given ID
Since:
1.0

setIcon

public static void setIcon(IconId id,
                           javax.swing.Icon icon)
Specifies a new icon for the given ID. This method will allow the easy exchange of framework icons with product- or company-specific icons.

Parameters:
id - the ID of the icon that will be replaced
icon - the new icon to use for the given ID
Since:
1.0

getIconMap

public static IIconMap getIconMap()
Returns the icon map that is currently being used by the registry to lookup and store icons.

Returns:
the registry's icon map
Since:
1.0

setIconMap

public static void setIconMap(IIconMap iconMap)
Sets the icon map used by the registry to lookup and store icons.

Parameters:
iconMap -
Since:
1.0