schmitzm.swing
Class CircleIcon

java.lang.Object
  extended by schmitzm.swing.CircleIcon
All Implemented Interfaces:
Icon

public class CircleIcon
extends Object
implements Icon

Diese Klasse stellt ein Icon in Form eines ausgefuellten Kreises dar.

Version:
1.0
Author:
Martin Schmitz (University of Bonn/Germany)

Constructor Summary
CircleIcon(int width, int height, Color color)
          Erzeugt ein Icon mit einem ausgefuellten Kreis.
 
Method Summary
 int getIconHeight()
          Liefert die Hoehe des Kreises.
 int getIconWidth()
          Liefert die Breite des Kreises.
 void paintIcon(Component c, Graphics g, int x, int y)
          Malt den Kreis an die angegeben Stelle (x,y) in das Graphics- Objekt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CircleIcon

public CircleIcon(int width,
                  int height,
                  Color color)
Erzeugt ein Icon mit einem ausgefuellten Kreis.

Parameters:
width - Breite des Kreises
height - Hoehe des Kreises
color - Farbe des Kreises
Method Detail

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Malt den Kreis an die angegeben Stelle (x,y) in das Graphics- Objekt.

Specified by:
paintIcon in interface Icon

getIconHeight

public int getIconHeight()
Liefert die Hoehe des Kreises.

Specified by:
getIconHeight in interface Icon
Returns:
Hoehe des Kreises in Pixeln

getIconWidth

public int getIconWidth()
Liefert die Breite des Kreises.

Specified by:
getIconWidth in interface Icon
Returns:
Breite des Kreises in Pixeln