edu.kzoo.grid.gui
Class ColorChoiceDDMenu.ColorIcon

java.lang.Object
  |
  +--edu.kzoo.grid.gui.ColorChoiceDDMenu.ColorIcon
All Implemented Interfaces:
javax.swing.Icon
Enclosing class:
ColorChoiceDDMenu

protected static class ColorChoiceDDMenu.ColorIcon
extends java.lang.Object
implements javax.swing.Icon

Nested class used to draw 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.


Constructor Summary
ColorChoiceDDMenu.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
 

Constructor Detail

ColorChoiceDDMenu.ColorIcon

public ColorChoiceDDMenu.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