systeminformationmonitor.swing
Class ShapeIcon

java.lang.Object
  extended by systeminformationmonitor.swing.ShapeIcon
All Implemented Interfaces:
javax.swing.Icon

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

ShapeIcon


Constructor Summary
ShapeIcon()
           
 
Method Summary
 int getIconHeight()
          Returns the shape's height.
 int getIconWidth()
          Returns the shape's width.
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Draws the icon at the x,y using the Graphis object passed.
 void setColor(java.awt.Color color)
          Set the color of the icon.
 void setShape(java.awt.Shape shape)
          Set the scape of the icon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeIcon

public ShapeIcon()
Method Detail

setShape

public void setShape(java.awt.Shape shape)
Set the scape of the icon.

Parameters:
shape - Shape to set.

setColor

public void setColor(java.awt.Color color)
Set the color of the icon.

Parameters:
color - Color to set.

getIconHeight

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

Specified by:
getIconHeight in interface javax.swing.Icon
Returns:
Height of the Icon.

getIconWidth

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

Specified by:
getIconWidth in interface javax.swing.Icon
Returns:
Width of the Icon.

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Draws the icon at the x,y using the Graphis object passed.

Specified by:
paintIcon in interface javax.swing.Icon
Parameters:
c - Component which is not used.
g - Graphics Object used to draw the icon.
x - X position to draw the shape.
y - Y position to draw the shape.