anl.aida.palette
Class SquareIcon

java.lang.Object
  extended by anl.aida.palette.SquareIcon
All Implemented Interfaces:
javax.swing.Icon

public class SquareIcon
extends java.lang.Object
implements javax.swing.Icon

Implements icon as a colored square.


Field Summary
private  java.awt.Color color
           
private  int height
           
private  int width
           
 
Constructor Summary
SquareIcon(java.awt.Color color, int size)
           
 
Method Summary
 java.awt.Color getColor()
           
 int getIconHeight()
           
 int getIconWidth()
           
 void paintIcon(java.awt.Component comp, java.awt.Graphics g, int x, int y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

color

private java.awt.Color color

width

private int width

height

private int height
Constructor Detail

SquareIcon

public SquareIcon(java.awt.Color color,
                  int size)
Method Detail

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface javax.swing.Icon

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface javax.swing.Icon

getColor

public java.awt.Color getColor()

paintIcon

public void paintIcon(java.awt.Component comp,
                      java.awt.Graphics g,
                      int x,
                      int y)
Specified by:
paintIcon in interface javax.swing.Icon