view
Class EditToolbar.ColorIcon

java.lang.Object
  extended by 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.


Field Summary
private  java.awt.Color _color
           
private  int _height
           
private  int _width
           
private static int MARGIN
           
static java.awt.Color RANDOM_COLOR
           
 
Constructor Summary
EditToolbar.ColorIcon(java.awt.Color c, int w, int h)
           
 
Method Summary
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(java.awt.Component comp, java.awt.Graphics g, int x, int y)
           
 void setColor(java.awt.Color c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

EditToolbar.ColorIcon

public EditToolbar.ColorIcon(java.awt.Color c,
                             int w,
                             int h)
Method Detail

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