org.tigris.swidgets
Class DecoratedIcon
java.lang.Object
javax.swing.ImageIcon
org.tigris.swidgets.DecoratedIcon
- All Implemented Interfaces:
- javax.accessibility.Accessible, javax.swing.Icon, java.io.Serializable
- Direct Known Subclasses:
- DropDownIcon
- public abstract class DecoratedIcon
- extends javax.swing.ImageIcon
The base class for adding simple decorations to existing icons.
This should be extended for each decoration style.
- See Also:
- Serialized Form
Nested classes inherited from class javax.swing.ImageIcon |
javax.swing.ImageIcon.AccessibleImageIcon |
Field Summary |
static int |
ROLLOVER
If the icon is for hoovering: ROLLOVER |
static int |
STANDARD
If the icon is the normally shown one: STANDARD |
Fields inherited from class javax.swing.ImageIcon |
component, tracker |
Method Summary |
protected void |
init(int[][] buffer)
Initialise the icon. |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Paints the icon. |
Methods inherited from class javax.swing.ImageIcon |
getAccessibleContext, getDescription, getIconHeight, getIconWidth, getImage, getImageLoadStatus, getImageObserver, loadImage, setDescription, setImage, setImageObserver, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ROLLOVER
public static final int ROLLOVER
- If the icon is for hoovering:
ROLLOVER
- See Also:
- Constant Field Values
STANDARD
public static final int STANDARD
- If the icon is the normally shown one:
STANDARD
- See Also:
- Constant Field Values
init
protected void init(int[][] buffer)
- Initialise the icon.
- Parameters:
buffer
- the buffer containing the icon definition (pixels)
paintIcon
public void paintIcon(java.awt.Component c,
java.awt.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.
- Parameters:
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