view
Class EditToolbar.ColorIcon
java.lang.Object
view.EditToolbar.ColorIcon
- All Implemented Interfaces:
- javax.swing.Icon
- Enclosing class:
- EditToolbar
private static class EditToolbar.ColorIcon
- extends java.lang.Object
- implements javax.swing.Icon
Nested class used to drawFish the color swatch icon used for color choice entries in the color combo box. This
simple class just draws a rectangle filled with the color and edged with a black border.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RANDOM_COLOR
public static final java.awt.Color RANDOM_COLOR
MARGIN
private static final int MARGIN
- See Also:
- Constant Field Values
_color
private java.awt.Color _color
_width
private int _width
_height
private int _height
EditToolbar.ColorIcon
public EditToolbar.ColorIcon(java.awt.Color c,
int w,
int h)
setColor
public void setColor(java.awt.Color c)
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interface javax.swing.Icon
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interface javax.swing.Icon
paintIcon
public void paintIcon(java.awt.Component comp,
java.awt.Graphics g,
int x,
int y)
- Specified by:
paintIcon
in interface javax.swing.Icon