com.sciapp.table
Class BlankIcon

java.lang.Object
  extended by com.sciapp.table.BlankIcon
All Implemented Interfaces:
Serializable, Icon

public class BlankIcon
extends Object
implements Icon, Serializable

A blank square icon filled with a color.

See Also:
Serialized Form

Constructor Summary
BlankIcon()
          Creates a BlankIcon object with no fill color and a dimension of 11x11.
BlankIcon(Color color, int size)
          Creates a BlankIcon object with color as the fill color and a dimension of size x size.
 
Method Summary
 int getIconHeight()
          Returns the icon's height.
 int getIconWidth()
          Returns the icon's width.
 void paintIcon(Component c, Graphics g, int x, int y)
          Draw the icon at the specified location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlankIcon

public BlankIcon()
Creates a BlankIcon object with no fill color and a dimension of 11x11.


BlankIcon

public BlankIcon(Color color,
                 int size)
Creates a BlankIcon object with color as the fill color and a dimension of size x size.

Method Detail

getIconHeight

public int getIconHeight()
Returns the icon's height.

Specified by:
getIconHeight in interface Icon
Returns:
the icon's height.

getIconWidth

public int getIconWidth()
Returns the icon's width.

Specified by:
getIconWidth in interface Icon
Returns:
the icon's width.

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.

Specified by:
paintIcon in interface Icon