be.ac.ulg.montefiore.run.totem.visualtopo.graph
Class ColorSquare

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.visualtopo.graph.ColorSquare
All Implemented Interfaces:
javax.swing.Icon

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

This class implements a icon that display a simple colored square

Creation date: 16 mars 2006

Author:
Olivier Materne (O.Materne@student.ulg.ac.be)

Constructor Summary
ColorSquare(java.awt.Color color)
          Constructor.
 
Method Summary
 int getIconHeight()
          Return the icon height (allways 11 here)
 int getIconWidth()
          Return the icon width (allways 11 here)
 void paintIcon(java.awt.Component c, 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
 

Constructor Detail

ColorSquare

public ColorSquare(java.awt.Color color)
Constructor. A square of the given color

Parameters:
color - The color with which the square will be drawn
Method Detail

paintIcon

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

getIconWidth

public int getIconWidth()
Return the icon width (allways 11 here)

Specified by:
getIconWidth in interface javax.swing.Icon
Returns:
the icon width

getIconHeight

public int getIconHeight()
Return the icon height (allways 11 here)

Specified by:
getIconHeight in interface javax.swing.Icon
Returns:
the icon height


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.