Prog1Tools
Class GraphicRectangle
java.lang.Object
Prog1Tools.GraphicItem
Prog1Tools.GraphicRectangle
- All Implemented Interfaces:
- GraphicItemSpec
public class GraphicRectangle
- extends GraphicItem
Implementierung des Grafikelements Rechteck.
- Version:
- 1.1
- Author:
- hagen.buchwald@kit.edu
Constructor Summary |
GraphicRectangle(int x,
int y,
int width,
int height,
java.awt.Color color,
boolean isFilled)
Konstruktor des Grafikelements Rechteck. |
Method Summary |
void |
move(int xDistance,
int yDistance)
Kommando, das Grafikelement zu verschieben. |
void |
paint(java.awt.Graphics graphics)
Kommando zum Zeichnen des Grafikelements. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GraphicRectangle
public GraphicRectangle(int x,
int y,
int width,
int height,
java.awt.Color color,
boolean isFilled)
- Konstruktor des Grafikelements Rechteck.
- Parameters:
x
- x-Koordinate der oberen linken Ecke des Rechtecksy
- y-Koordinate der oberen linken Ecke des Rechteckswidth
- Breite des Rechtecksheight
- Hoehe des Rechteckscolor
- Farbe, in der das Rechteck gezeichnet werden sollisFilled
- bei false wird nur der Linienzug des Rechtecks gezeichnet;
bei true wird die Flaeche des Rechtecks in der Zeichenfarbe eingefaerbt
paint
public void paint(java.awt.Graphics graphics)
- Description copied from interface:
GraphicItemSpec
- Kommando zum Zeichnen des Grafikelements.
- Parameters:
graphics
- Grafikkontext, auf den das Grafikelement gezeichnet werden soll
move
public void move(int xDistance,
int yDistance)
- Description copied from interface:
GraphicItemSpec
- Kommando, das Grafikelement zu verschieben.
- Parameters:
xDistance
- Anzahl der Pixel, um die das Grafikelement vertikal verschoben werden sollyDistance
- Anzahl der Pixel, um die das Grafikelement horizontal verschoben werden soll