net.agmodel.table
Class ColorFillIcon

java.lang.Object
  |
  +--net.agmodel.table.ColorFillIcon
All Implemented Interfaces:
Icon, Serializable

public class ColorFillIcon
extends Object
implements Icon, Serializable

Uses example from Chapter 4 of Core Java Foundation Classes

See Also:
Serialized Form

Field Summary
static int BORDER_SIZE
           
protected  int borderSize
           
static int DEFAULT_SIZE
           
protected  Color fillColor
           
protected  int fillHeight
           
protected  int fillWidth
           
protected  int height
           
protected  Color shadow
           
protected  int width
           
 
Constructor Summary
ColorFillIcon(Color fill)
           
ColorFillIcon(Color fill, int width, int height, int borderSize)
           
 
Method Summary
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(Component comp, Graphics g, int x, int y)
           
 void setBorderWidth(int b)
           
 void setFillColor(Color c)
           
 void setShadow(Color c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

protected int width

height

protected int height

fillColor

protected Color fillColor

shadow

protected Color shadow

borderSize

protected int borderSize

fillHeight

protected int fillHeight

fillWidth

protected int fillWidth

BORDER_SIZE

public static final int BORDER_SIZE
See Also:
Constant Field Values

DEFAULT_SIZE

public static final int DEFAULT_SIZE
See Also:
Constant Field Values
Constructor Detail

ColorFillIcon

public ColorFillIcon(Color fill,
                     int width,
                     int height,
                     int borderSize)

ColorFillIcon

public ColorFillIcon(Color fill)
Method Detail

setShadow

public void setShadow(Color c)

setFillColor

public void setFillColor(Color c)

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface Icon

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface Icon

setBorderWidth

public void setBorderWidth(int b)

paintIcon

public void paintIcon(Component comp,
                      Graphics g,
                      int x,
                      int y)
Specified by:
paintIcon in interface Icon