ConForM.CoopnTools.CoKer.Icons
Class CoopnIconFactory
java.lang.Object
|
+--ConForM.CoopnTools.CoKer.Icons.CoopnIconFactory
- Direct Known Subclasses:
- ButtonIconFactory, CoopnTools16IconFactory, CoopnTools32IconFactory
- public abstract class CoopnIconFactory
- extends java.lang.Object
Icon Factory for Coopn Tools. This class allows the creation of icons
from XPM (X PixMap) data. This is an abstract class, which must be
instantiated in concrete class for concrete icons.
Method Summary |
protected abstract java.awt.Color |
getColor(char pixel)
Return the color of a pixel. |
javax.swing.ImageIcon |
getIcon()
Get a shared instance of the icon. |
protected abstract java.lang.String[] |
getPixMap()
Return the pixmap as an array of String, each character representing
a color. |
javax.swing.ImageIcon |
getPrivateIcon()
Get a private instance of the icon. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
coopnTheme
protected CoopnMetalTheme coopnTheme
CoopnIconFactory
public CoopnIconFactory()
getIcon
public javax.swing.ImageIcon getIcon()
- Get a shared instance of the icon.
- Returns:
- an icon, shared among the clients of this method.
getPrivateIcon
public javax.swing.ImageIcon getPrivateIcon()
- Get a private instance of the icon.
- Returns:
- a new icon, never used before this call.
getPixMap
protected abstract java.lang.String[] getPixMap()
- Return the pixmap as an array of String, each character representing
a color. The conversion between characters and RGB colors is given
by the method pixColor. Each String in the array cannot be null,
and must have the same length; The array cannot be null, and its
length is at least 1.
getColor
protected abstract java.awt.Color getColor(char pixel)
- Return the color of a pixel.
- Returns:
- the color of a pixel, or null if transparent pixel.