drawables
Class DrawablePresentation

java.lang.Object
  |
  +--drawables.DrawablePresentation

public class DrawablePresentation
extends java.lang.Object

Class for defining the graphical presentation of drawable primitives.


Field Summary
static int ALLMODES
          All modes.
protected  java.awt.Color color
          Color of the border.
protected  java.awt.Color fillColor
          Fill color.
protected  int maxScale
          The most detailed scale where the object is visible.
protected  int minScale
          The at least detailed scale where the object is visible.
protected  int mode
          The mode.
static int NOVALUE
          Flag for the case where no value exists.
protected  int offset
          Offset in pixel or point.
protected  boolean selectable
          Is the object selectable?
protected  java.awt.Color selectionColor
          Color of the border of selected primitives.
protected  java.awt.Color selectionFillColor
          Fill color of selected primitives.
protected  int size
          Size in pixel or point.
protected  int type
          The type of the primitive.
protected  int value
          The value.
protected  boolean visible
          Is the object visible?
 
Constructor Summary
DrawablePresentation()
           
 
Method Summary
 DrawablePresentation get(int scale, int mode, int value)
          Returns the presentation object, which has the same name as this and which fits for the given scale, the given mode and the given value.
static DrawablePresentation get(java.lang.String name)
          Returns the first presentation object with the given name.
 java.awt.Color getColor()
          Gibt die Randfarbe zurück.
 java.awt.Color getFillColor()
          Gibt die Füllfarbe zurück.
 java.lang.String getName()
          Gibt den Namen zurück.
 DrawablePresentation getNext()
          Gibt das nächste Darstellungsobjekt zurück, das den gleichen Namen hat.
 int getOffset()
          Gibt den Offset zurück.
 boolean getSelectability()
          Gibt die Selektierbarkeit zurück.
 java.awt.Color getSelectionColor()
          Gibt die Selektionsrandfarbe zurück.
 java.awt.Color getSelectionFillColor()
          Gibt die Selektionsfüllfarbe zurück.
 int getSize()
          Gibt die Größe zurück.
 int getType()
          Gibt den Typ zurück.
 boolean getVisibility()
          Gibt die grundsätzliche Sichtbarkeit zurück.
static void init()
          Inits the object: all presentations are removed.
static DrawablePresentation newDrawablePresentation(java.lang.String name)
          Creates a new presentation object.
static DrawablePresentation newDrawablePresentation(java.lang.String name, boolean selectable, java.awt.Color color, java.awt.Color selectionColor)
          Erzeugt neues Darstellungsobjekt.
static DrawablePresentation newDrawablePresentation(java.lang.String name, boolean selectable, java.awt.Color color, java.awt.Color fillColor, java.awt.Color selectionColor, java.awt.Color selectionFillColor)
          Erzeugt neues Darstellungsobjekt.
static DrawablePresentation newDrawablePresentation(java.lang.String name, boolean selectable, java.awt.Color color, java.awt.Color fillColor, java.awt.Color selectionColor, java.awt.Color selectionFillColor, int type, int size)
          Erzeugt neues Darstellungsobjekt.
static DrawablePresentation newDrawablePresentation(java.lang.String name, boolean selectable, java.awt.Color color, java.awt.Color fillColor, java.awt.Color selectionColor, java.awt.Color selectionFillColor, int type, int size, int offset, int minScale, int maxScale)
          Erzeugt neues Darstellungsobjekt.
static DrawablePresentation newDrawablePresentation(java.lang.String name, boolean selectable, java.awt.Color color, java.awt.Color selectionColor, int type, int size)
          Erzeugt neues Darstellungsobjekt.
static DrawablePresentation newDrawablePresentation(java.lang.String name, boolean selectable, java.awt.Color color, java.awt.Color selectionColor, int type, int size, int offset, int minScale, int maxScale)
          Erzeugt neues Darstellungsobjekt.
static DrawablePresentation newDrawablePresentation(java.lang.String name, int mode, int value, boolean selectable, java.awt.Color color, java.awt.Color selectionColor)
          Erzeugt neues Darstellungsobjekt.
static DrawablePresentation newDrawablePresentation(java.lang.String name, int mode, int value, boolean selectable, java.awt.Color color, java.awt.Color fillColor, java.awt.Color selectionColor, java.awt.Color selectionFillColor)
          Erzeugt neues Darstellungsobjekt.
static DrawablePresentation newDrawablePresentation(java.lang.String name, int mode, int value, boolean selectable, java.awt.Color color, java.awt.Color fillColor, java.awt.Color selectionColor, java.awt.Color selectionFillColor, int type, int size)
          Erzeugt neues Darstellungsobjekt.
static DrawablePresentation newDrawablePresentation(java.lang.String name, int mode, int value, boolean selectable, java.awt.Color color, java.awt.Color fillColor, java.awt.Color selectionColor, java.awt.Color selectionFillColor, int type, int size, int offset, int minScale, int maxScale)
          Erzeugt neues Darstellungsobjekt.
static DrawablePresentation newDrawablePresentation(java.lang.String name, int mode, int value, boolean selectable, java.awt.Color color, java.awt.Color selectionColor, int type, int size)
          Erzeugt neues Darstellungsobjekt.
static DrawablePresentation newDrawablePresentation(java.lang.String name, int mode, int value, boolean selectable, java.awt.Color color, java.awt.Color selectionColor, int type, int size, int offset, int minScale, int maxScale)
          Erzeugt neues Darstellungsobjekt.
 DrawablePresentation setColor(java.awt.Color pColor)
          Setzt die Randfarbe.
 DrawablePresentation setFillColor(java.awt.Color pColor)
          Setzt die Füllfarbe.
 DrawablePresentation setOffset(int pOffset)
          Setzt den Offset.
 DrawablePresentation setSelectability(boolean s)
          Schaltet die Selektierbarkeit.
 DrawablePresentation setSelectionColor(java.awt.Color pColor)
          Setzt die Selektionsrandfarbe.
 DrawablePresentation setSelectionFillColor(java.awt.Color pColor)
          Setzt die Selektionsfüllfarbe.
 DrawablePresentation setSize(int pSize)
          Setzt die Größe.
 DrawablePresentation setType(int pType)
          Setzt den Typ.
 DrawablePresentation setVisibility(boolean on)
          Schaltet die grundsätzliche Sichtbarkeit an bzw. aus.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

minScale

protected int minScale
The at least detailed scale where the object is visible.


maxScale

protected int maxScale
The most detailed scale where the object is visible.


ALLMODES

public static final int ALLMODES
All modes.

See Also:
Constant Field Values

mode

protected int mode
The mode.


NOVALUE

public static final int NOVALUE
Flag for the case where no value exists.

See Also:
Constant Field Values

value

protected int value
The value.


selectable

protected boolean selectable
Is the object selectable?


visible

protected boolean visible
Is the object visible?


color

protected java.awt.Color color
Color of the border.


fillColor

protected java.awt.Color fillColor
Fill color.


selectionColor

protected java.awt.Color selectionColor
Color of the border of selected primitives.


selectionFillColor

protected java.awt.Color selectionFillColor
Fill color of selected primitives.


type

protected int type
The type of the primitive.


size

protected int size
Size in pixel or point.


offset

protected int offset
Offset in pixel or point.

Constructor Detail

DrawablePresentation

public DrawablePresentation()
Method Detail

get

public DrawablePresentation get(int scale,
                                int mode,
                                int value)
Returns the presentation object, which has the same name as this and which fits for the given scale, the given mode and the given value.

Parameters:
scale - actual scale
mode - actual mode
value - required value
Returns:
the presentation object

get

public static DrawablePresentation get(java.lang.String name)
Returns the first presentation object with the given name.

Parameters:
name - the name
Returns:
the object found (or the default object)

getColor

public java.awt.Color getColor()
Gibt die Randfarbe zurück.

Returns:
Farbe

getFillColor

public java.awt.Color getFillColor()
Gibt die Füllfarbe zurück.

Returns:
Farbe

getName

public java.lang.String getName()
Gibt den Namen zurück.

Returns:
Name

getNext

public DrawablePresentation getNext()
Gibt das nächste Darstellungsobjekt zurück, das den gleichen Namen hat.

Returns:
gefundenes DrawablePresentation-Objekt (oder null)

getOffset

public int getOffset()
Gibt den Offset zurück.

Returns:
Offset

getSelectability

public boolean getSelectability()
Gibt die Selektierbarkeit zurück.

Returns:
selektierbar?

getSelectionColor

public java.awt.Color getSelectionColor()
Gibt die Selektionsrandfarbe zurück.

Returns:
Farbe

getSelectionFillColor

public java.awt.Color getSelectionFillColor()
Gibt die Selektionsfüllfarbe zurück.

Returns:
Farbe

getSize

public int getSize()
Gibt die Größe zurück.

Returns:
Größe

getType

public int getType()
Gibt den Typ zurück.

Returns:
Typ

getVisibility

public boolean getVisibility()
Gibt die grundsätzliche Sichtbarkeit zurück.

Returns:
sichtbar?

init

public static void init()
Inits the object: all presentations are removed.


newDrawablePresentation

public static DrawablePresentation newDrawablePresentation(java.lang.String name)
Creates a new presentation object.

Parameters:
name - Name
Returns:
the object

newDrawablePresentation

public static DrawablePresentation newDrawablePresentation(java.lang.String name,
                                                           int mode,
                                                           int value,
                                                           boolean selectable,
                                                           java.awt.Color color,
                                                           java.awt.Color selectionColor)
Erzeugt neues Darstellungsobjekt.

Parameters:
name - Name
mode - Darstellungsmodus
value - Wert
selectable - selektierbar?
color - Farbe
selectionColor - Selektionsfarbe
Returns:
erzeugtes DrawablePresentation-Objekt

newDrawablePresentation

public static DrawablePresentation newDrawablePresentation(java.lang.String name,
                                                           int mode,
                                                           int value,
                                                           boolean selectable,
                                                           java.awt.Color color,
                                                           java.awt.Color selectionColor,
                                                           int type,
                                                           int size)
Erzeugt neues Darstellungsobjekt.

Parameters:
name - Name
mode - Darstellungsmodus
value - Wert
selectable - selektierbar?
color - Randfarbe
selectionColor - Selektionsrandfarbe
type - Typ
size - Größe in Pixel/Punkt
Returns:
erzeugtes DrawablePresentation-Objekt

newDrawablePresentation

public static DrawablePresentation newDrawablePresentation(java.lang.String name,
                                                           int mode,
                                                           int value,
                                                           boolean selectable,
                                                           java.awt.Color color,
                                                           java.awt.Color selectionColor,
                                                           int type,
                                                           int size,
                                                           int offset,
                                                           int minScale,
                                                           int maxScale)
Erzeugt neues Darstellungsobjekt.

Parameters:
name - Name
mode - Darstellungsmodus
value - Wert
selectable - selektierbar?
color - Randfarbe
selectionColor - Selektionsrandfarbe
type - Typ
size - Größe in Pixel/Punkt
offset - Offset in Pixel
minScale - (eingeschlossener) Minimal-Maßstab
maxScale - (nicht mehr eingeschlossener) Maximal-Maßstab
Returns:
erzeugtes DrawablePresentation-Objekt

newDrawablePresentation

public static DrawablePresentation newDrawablePresentation(java.lang.String name,
                                                           int mode,
                                                           int value,
                                                           boolean selectable,
                                                           java.awt.Color color,
                                                           java.awt.Color fillColor,
                                                           java.awt.Color selectionColor,
                                                           java.awt.Color selectionFillColor)
Erzeugt neues Darstellungsobjekt.

Parameters:
name - Name
mode - Darstellungsmodus
value - Wert
selectable - selektierbar?
color - Randfarbe
fillColor - Füllfarbe
selectionColor - Selektionsrandfarbe
selectionFillColor - Selektionsfüllfarbe
Returns:
erzeugtes DrawablePresentation-Objekt

newDrawablePresentation

public static DrawablePresentation newDrawablePresentation(java.lang.String name,
                                                           int mode,
                                                           int value,
                                                           boolean selectable,
                                                           java.awt.Color color,
                                                           java.awt.Color fillColor,
                                                           java.awt.Color selectionColor,
                                                           java.awt.Color selectionFillColor,
                                                           int type,
                                                           int size)
Erzeugt neues Darstellungsobjekt.

Parameters:
name - Name
mode - Darstellungsmodus
value - Wert
selectable - selektierbar?
color - Randfarbe
fillColor - Füllfarbe
selectionColor - Selektionsrandfarbe
selectionFillColor - Selektionsfüllfarbe
type - Typ
size - Größe in Pixel/Punkt
Returns:
erzeugtes DrawablePresentation-Objekt

newDrawablePresentation

public static DrawablePresentation newDrawablePresentation(java.lang.String name,
                                                           int mode,
                                                           int value,
                                                           boolean selectable,
                                                           java.awt.Color color,
                                                           java.awt.Color fillColor,
                                                           java.awt.Color selectionColor,
                                                           java.awt.Color selectionFillColor,
                                                           int type,
                                                           int size,
                                                           int offset,
                                                           int minScale,
                                                           int maxScale)
Erzeugt neues Darstellungsobjekt.

Parameters:
name - Name
mode - Darstellungsmodus
value - Wert
selectable - selektierbar?
color - Randfarbe
fillColor - Füllfarbe
selectionColor - Selektionsrandfarbe
selectionFillColor - Selektionsfüllfarbe
type - Typ
size - Größe in Pixel/Punkt
offset - Offset in Pixel
minScale - (eingeschlossener) Minimal-Maßstab
maxScale - (nicht mehr eingeschlossener) Maximal-Maßstab
Returns:
erzeugtes DrawablePresentation-Objekt

newDrawablePresentation

public static DrawablePresentation newDrawablePresentation(java.lang.String name,
                                                           boolean selectable,
                                                           java.awt.Color color,
                                                           java.awt.Color selectionColor)
Erzeugt neues Darstellungsobjekt.

Parameters:
name - Name
selectable - selektierbar?
color - Farbe
selectionColor - Selektionsfarbe
Returns:
erzeugtes DrawablePresentation-Objekt

newDrawablePresentation

public static DrawablePresentation newDrawablePresentation(java.lang.String name,
                                                           boolean selectable,
                                                           java.awt.Color color,
                                                           java.awt.Color selectionColor,
                                                           int type,
                                                           int size)
Erzeugt neues Darstellungsobjekt.

Parameters:
name - Name
selectable - selektierbar?
color - Randfarbe
selectionColor - Selektionsrandfarbe
type - Typ
size - Größe in Pixel/Punkt
Returns:
erzeugtes DrawablePresentation-Objekt

newDrawablePresentation

public static DrawablePresentation newDrawablePresentation(java.lang.String name,
                                                           boolean selectable,
                                                           java.awt.Color color,
                                                           java.awt.Color selectionColor,
                                                           int type,
                                                           int size,
                                                           int offset,
                                                           int minScale,
                                                           int maxScale)
Erzeugt neues Darstellungsobjekt.

Parameters:
name - Name
selectable - selektierbar?
color - Randfarbe
selectionColor - Selektionsrandfarbe
type - Typ
size - Größe in Pixel/Punkt
offset - Offset in Pixel
minScale - (eingeschlossener) Minimal-Maßstab
maxScale - (nicht mehr eingeschlossener) Maximal-Maßstab
Returns:
erzeugtes DrawablePresentation-Objekt

newDrawablePresentation

public static DrawablePresentation newDrawablePresentation(java.lang.String name,
                                                           boolean selectable,
                                                           java.awt.Color color,
                                                           java.awt.Color fillColor,
                                                           java.awt.Color selectionColor,
                                                           java.awt.Color selectionFillColor)
Erzeugt neues Darstellungsobjekt.

Parameters:
name - Name
selectable - selektierbar?
color - Randfarbe
fillColor - Füllfarbe
selectionColor - Selektionsrandfarbe
selectionFillColor - Selektionsfüllfarbe
Returns:
erzeugtes DrawablePresentation-Objekt

newDrawablePresentation

public static DrawablePresentation newDrawablePresentation(java.lang.String name,
                                                           boolean selectable,
                                                           java.awt.Color color,
                                                           java.awt.Color fillColor,
                                                           java.awt.Color selectionColor,
                                                           java.awt.Color selectionFillColor,
                                                           int type,
                                                           int size)
Erzeugt neues Darstellungsobjekt.

Parameters:
name - Name
selectable - selektierbar?
color - Randfarbe
fillColor - Füllfarbe
selectionColor - Selektionsrandfarbe
selectionFillColor - Selektionsfüllfarbe
type - Typ
size - Größe in Pixel/Punkt
Returns:
erzeugtes DrawablePresentation-Objekt

newDrawablePresentation

public static DrawablePresentation newDrawablePresentation(java.lang.String name,
                                                           boolean selectable,
                                                           java.awt.Color color,
                                                           java.awt.Color fillColor,
                                                           java.awt.Color selectionColor,
                                                           java.awt.Color selectionFillColor,
                                                           int type,
                                                           int size,
                                                           int offset,
                                                           int minScale,
                                                           int maxScale)
Erzeugt neues Darstellungsobjekt.

Parameters:
name - Name
selectable - selektierbar?
color - Randfarbe
fillColor - Füllfarbe
selectionColor - Selektionsrandfarbe
selectionFillColor - Selektionsfüllfarbe
type - Typ
size - Größe in Pixel/Punkt
offset - Offset in Pixel
minScale - (eingeschlossener) Minimal-Maßstab
maxScale - (nicht mehr eingeschlossener) Maximal-Maßstab
Returns:
erzeugtes DrawablePresentation-Objekt

setColor

public DrawablePresentation setColor(java.awt.Color pColor)
Setzt die Randfarbe.

Parameters:
pColor - Farbe
Returns:
this

setFillColor

public DrawablePresentation setFillColor(java.awt.Color pColor)
Setzt die Füllfarbe.

Parameters:
pColor - Farbe
Returns:
this

setOffset

public DrawablePresentation setOffset(int pOffset)
Setzt den Offset.

Parameters:
pOffset - Offset
Returns:
this

setSelectability

public DrawablePresentation setSelectability(boolean s)
Schaltet die Selektierbarkeit.

Parameters:
s - Selektivität
Returns:
this

setSelectionColor

public DrawablePresentation setSelectionColor(java.awt.Color pColor)
Setzt die Selektionsrandfarbe.

Parameters:
pColor - Farbe
Returns:
this

setSelectionFillColor

public DrawablePresentation setSelectionFillColor(java.awt.Color pColor)
Setzt die Selektionsfüllfarbe.

Parameters:
pColor - Farbe
Returns:
this

setSize

public DrawablePresentation setSize(int pSize)
Setzt die Größe.

Parameters:
pSize - Größe
Returns:
this

setType

public DrawablePresentation setType(int pType)
Setzt den Typ.

Parameters:
pType - Typ
Returns:
this

setVisibility

public DrawablePresentation setVisibility(boolean on)
Schaltet die grundsätzliche Sichtbarkeit an bzw. aus.

Parameters:
on - sichtbar?
Returns:
this