org.tigris.swidgets
Class DecoratedIcon
ImageIcon
org.tigris.swidgets.DecoratedIcon
public abstract class DecoratedIcon
extends ImageIcon
The base class for adding simple decorations to existing icons.
This should be extended for each decoration style.
static int | ROLLOVER - If the icon is for hoovering:
ROLLOVER
|
static int | STANDARD - If the icon is the normally shown one:
STANDARD
|
protected void | init(int[][] buffer) - Initialise the icon.
|
void | paintIcon(Component c, Graphics g, int x, int y) - Paints the icon.
|
ROLLOVER
public static final int ROLLOVER
If the icon is for hoovering: ROLLOVER
STANDARD
public static final int STANDARD
If the icon is the normally shown one: STANDARD
init
protected void init(int[][] buffer)
Initialise the icon.
buffer
- the buffer containing the icon definition (pixels)
paintIcon
public void paintIcon(Component c,
Graphics g,
int x,
int y)
Paints the icon. The top-left corner of the icon is drawn at
the point (x, y) in the coordinate space of the graphics
context g. If this icon has no image observer, this method uses
the c component as the observer.
c
- the component to be used as the observer if this icon
has no image observerg
- the graphics contextx
- the X coordinate of the icon's top-left cornery
- the Y coordinate of the icon's top-left corner