Prog1Tools
Class GraphicRectangle

java.lang.Object
  extended by Prog1Tools.GraphicItem
      extended by 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 Prog1Tools.GraphicItem
hide, isVisible, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Rechtecks
y - y-Koordinate der oberen linken Ecke des Rechtecks
width - Breite des Rechtecks
height - Hoehe des Rechtecks
color - Farbe, in der das Rechteck gezeichnet werden soll
isFilled - bei false wird nur der Linienzug des Rechtecks gezeichnet; bei true wird die Flaeche des Rechtecks in der Zeichenfarbe eingefaerbt
Method Detail

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 soll
yDistance - Anzahl der Pixel, um die das Grafikelement horizontal verschoben werden soll