public class CloseIcon
extends java.lang.Object
implements javax.swing.Icon
CloseIcon
renders an icon for a close button in one of
three modes: NORMAL, HOVER, and PRESSED.Modifier and Type | Class and Description |
---|---|
static class |
CloseIcon.Mode
The mode constants for the icon rendering.
|
Constructor and Description |
---|
CloseIcon(CloseIcon.Mode mode,
int size)
Creates a new icon.
|
Modifier and Type | Method and Description |
---|---|
int |
getIconHeight() |
int |
getIconWidth() |
void |
paintIcon(java.awt.Component comp,
java.awt.Graphics g,
int x,
int y) |
public CloseIcon(CloseIcon.Mode mode, int size)
mode
- the mode for icon rendering.size
- the icon size in pixels.public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public void paintIcon(java.awt.Component comp, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon