drawables
Class DrawableRectangle

java.lang.Object
  |
  +--drawables.Drawable
        |
        +--drawables.FilledDrawable
              |
              +--drawables.DrawableRectangle
All Implemented Interfaces:
EntryReadable, java.io.Serializable
Direct Known Subclasses:
DrawableCircle

public class DrawableRectangle
extends FilledDrawable

Class for drawable rectangles.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class drawables.FilledDrawable
filled
 
Fields inherited from class drawables.Drawable
AREALAYER, BITMAPLAYER, container, DEFMAXSCALE, DEFMINSCALE, layer, LINELAYER, maxScale, mbr, minScale, nextOfLayer, obj, POINTLAYER, pres, selected, TEXTLAYER
 
Constructor Summary
DrawableRectangle()
          Konstruktor.
DrawableRectangle(int x1, int y1, int x2, int y2)
          Konstruktor für nicht-gefülltes Rechteck.
DrawableRectangle(int x1, int y1, int x2, int y2, boolean pFilled, java.lang.String presName)
          Konstruktor für Rechtecke.
DrawableRectangle(int x1, int y1, int x2, int y2, boolean pFilled, java.lang.String presName, int pMinScale, int pMaxScale)
          Konstruktor für Rechtecke.
DrawableRectangle(java.awt.Rectangle rect)
          Konstruktor für nicht-gefülltes Rechteck.
 
Method Summary
protected  void drawProtected(java.awt.Graphics g, int scale, int mode, int value)
          Zeichnet das Rechteck im Graphic Context g.
 EntryReadable read(EntryInput r)
          Liest das Rechteck vom Entry-Input ein.
protected  void writeProtected(EntryWriter out, int type)
          Writes the rectangle.
 
Methods inherited from class drawables.FilledDrawable
isFilled, setFilling
 
Methods inherited from class drawables.Drawable
computeDistance, computeDistanceTo, contains, draw, draw, draw, draw, getContainer, getId, getLayer, getMaxScale, getMBR, getMinScale, getNextOfLayer, getObject, getPresentation, getPresentation, getType, interacts, intersects, intersects, intersects, isContainedBy, isVisible, readCoord, readCoord, readDrawable, readDrawable, setContainer, setLayer, setMaxScale, setMBR, setMinScale, setNextOfLayer, setObject, setPresentation, setSelection, toString, write, writeCoord, writeCoord, writeGML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DrawableRectangle

public DrawableRectangle()
Konstruktor.


DrawableRectangle

public DrawableRectangle(int x1,
                         int y1,
                         int x2,
                         int y2)
Konstruktor für nicht-gefülltes Rechteck.

Parameters:
x1 - x-Koordinate eines Eckpunktes
y1 - y-Koordinate eines Eckpunktes
x2 - x-Koordinate des gegenüberliegenden Eckpunktes
y2 - y-Koordinate des gegenüberliegenden Eckpunktes

DrawableRectangle

public DrawableRectangle(int x1,
                         int y1,
                         int x2,
                         int y2,
                         boolean pFilled,
                         java.lang.String presName)
Konstruktor für Rechtecke.

Parameters:
x1 - x-Koordinate eines Eckpunktes
y1 - y-Koordinate eines Eckpunktes
x2 - x-Koordinate des gegenüberliegenden Eckpunktes
y2 - y-Koordinate des gegenüberliegenden Eckpunktes
pFilled - gefüllt?
presName - Name des Darstellungsobjekts

DrawableRectangle

public DrawableRectangle(int x1,
                         int y1,
                         int x2,
                         int y2,
                         boolean pFilled,
                         java.lang.String presName,
                         int pMinScale,
                         int pMaxScale)
Konstruktor für Rechtecke.

Parameters:
x1 - x-Koordinate eines Eckpunktes
y1 - y-Koordinate eines Eckpunktes
x2 - x-Koordinate des gegenüberliegenden Eckpunktes
y2 - y-Koordinate des gegenüberliegenden Eckpunktes
pFilled - gefüllt?
presName - Name des Darstellungsobjekts
pMinScale - Mindest-Maßstab zum Zeichnen
pMaxScale - Maximal-Maßstab zum Zeichnen

DrawableRectangle

public DrawableRectangle(java.awt.Rectangle rect)
Konstruktor für nicht-gefülltes Rechteck.

Parameters:
rect - Rechteck
Method Detail

drawProtected

protected void drawProtected(java.awt.Graphics g,
                             int scale,
                             int mode,
                             int value)
Zeichnet das Rechteck im Graphic Context g.

Specified by:
drawProtected in class Drawable
Parameters:
g - aktueller Graphic Context
scale - aktueller Maßstab
mode - aktueller Darstellungsmodus
value - Darstellungswert

read

public EntryReadable read(EntryInput r)
Liest das Rechteck vom Entry-Input ein. Erster Eintrag "type".
type == 0: x1,y1,x2,y2
type == 1: filled,presName
type == 2: minScale,maxScale

Parameters:
r - Entry-Input
Returns:
this

writeProtected

protected void writeProtected(EntryWriter out,
                              int type)
Writes the rectangle.

Specified by:
writeProtected in class Drawable
Parameters:
out - entry writer
type - type of the output; meaning see read