|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--drawables.Drawable
|
+--drawables.DrawableLine
Drawable class for line segments.
| Field Summary | |
static int |
BACKWARDS
in Rückrichtung. |
static int |
BOTHDIRECTIONS
in beide Richtungen. |
static int |
FORWARDS
in Hinrichtung. |
static int |
NORMALTYPE
normaler Linientyp. |
static int |
SPLITTED
gesplittete Linie. |
static int |
UNDIRECTED
ungerichtet. |
| Fields inherited from class drawables.Drawable |
AREALAYER, BITMAPLAYER, container, DEFMAXSCALE, DEFMINSCALE, layer, LINELAYER, maxScale, mbr, minScale, nextOfLayer, obj, POINTLAYER, pres, selected, TEXTLAYER |
| Constructor Summary | |
protected |
DrawableLine()
Konstruktor. |
|
DrawableLine(int px1,
int py1,
int px2,
int py2)
Konstruktor. |
|
DrawableLine(int px1,
int py1,
int px2,
int py2,
java.lang.String presName)
Konstruktor. |
|
DrawableLine(int px1,
int py1,
int px2,
int py2,
java.lang.String presName,
int pMinScale,
int pMaxScale)
Konstruktor. |
| Method Summary | |
void |
changePoint1(int x,
int y)
Changes the first point of the line. |
void |
changePoint2(int x,
int y)
Changes the second point of the line. |
void |
deselect(int direction)
Deselektiert die Linie richtungsbezogen. |
static void |
drawProtected(java.awt.Graphics g,
DrawablePresentation ap,
java.awt.Color forwardsColor,
java.awt.Color backwardsColor,
int cx1,
int cy1,
int cx2,
int cy2)
Zeichnet die Linie im Graphic Context g, |
protected void |
drawProtected(java.awt.Graphics g,
int scale,
int mode,
int value)
Zeichnet die Linie im Graphic Context g, |
int |
getX1()
Returns the x-coordinate of the first point. |
int |
getX2()
Returns the x-coordinate of the second point. |
int |
getY1()
Returns the y-coordinate of the first point. |
int |
getY2()
Returns the y-coordinate of the second point. |
boolean |
interacts(int x,
int y,
int scale)
Tests whether the primitive is selected by a given point or not. |
static boolean |
interacts(int x,
int y,
int x1,
int y1,
int x2,
int y2,
int mx1,
int my1,
int mx2,
int my2,
int scale)
|
java.awt.Point |
intersects(DrawableLine line)
Tests if the lines intersect. |
boolean |
isSelected()
Gibt zurück, ob die Linie selektiert ist. |
boolean |
isSelected(int direction)
Gibt zurück, ob die Linie richtungsbezogen selektiert ist. |
EntryReadable |
read(EntryInput r)
Liest die Linie vom Entry-Input ein. |
void |
select(int direction)
Selektiert die Linie richtungsbezogen. |
void |
setSelection(boolean on)
(De-)Selektiert die Linie. |
java.awt.Point |
touches(int x,
int y,
int tolerance)
Testet, ob der angegebene Punkt mit einer Toleranz auf der Linie liegt. |
void |
writeGML(EntryWriter out)
Writes the primitive as GML tag. |
protected void |
writeProtected(EntryWriter out,
int type)
Writes the line. |
| Methods inherited from class drawables.Drawable |
computeDistance, computeDistanceTo, contains, draw, draw, draw, draw, getContainer, getId, getLayer, getMaxScale, getMBR, getMinScale, getNextOfLayer, getObject, getPresentation, getPresentation, getType, intersects, intersects, intersects, isContainedBy, isVisible, readCoord, readCoord, readDrawable, readDrawable, setContainer, setLayer, setMaxScale, setMBR, setMinScale, setNextOfLayer, setObject, setPresentation, toString, write, writeCoord, writeCoord |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int UNDIRECTED
public static final int FORWARDS
public static final int BACKWARDS
public static final int BOTHDIRECTIONS
public static final int NORMALTYPE
public static final int SPLITTED
| Constructor Detail |
protected DrawableLine()
public DrawableLine(int px1,
int py1,
int px2,
int py2)
px1 - x-Koordinate des Startpunktspy1 - y-Koordinate des Startpunktspx2 - x-Koordinate des Endpunktspy2 - y-Koordinate des Endpunkts
public DrawableLine(int px1,
int py1,
int px2,
int py2,
java.lang.String presName)
px1 - x-Koordinate des Startpunktspy1 - y-Koordinate des Startpunktspx2 - x-Koordinate des Endpunktspy2 - y-Koordinate des EndpunktspresName - Name des Darstellungsobjekts
public DrawableLine(int px1,
int py1,
int px2,
int py2,
java.lang.String presName,
int pMinScale,
int pMaxScale)
px1 - x-Koordinate des Startpunktspy1 - y-Koordinate des Startpunktspx2 - x-Koordinate des Endpunktspy2 - y-Koordinate des EndpunktspresName - Name des DarstellungsobjektspMinScale - Mindest-Maßstab zum ZeichnenpMaxScale - Maximal-Maßstab zum Zeichnen| Method Detail |
public void changePoint1(int x,
int y)
x - x-coordinatey - y-coordinate
public void changePoint2(int x,
int y)
x - x-coordinatey - y-coordinatepublic void deselect(int direction)
protected void drawProtected(java.awt.Graphics g,
int scale,
int mode,
int value)
drawProtected in class Drawableg - aktueller Graphic Contextscale - aktueller Maßstabmode - aktueller Darstellungsmodusvalue - Darstellungswert
public static void drawProtected(java.awt.Graphics g,
DrawablePresentation ap,
java.awt.Color forwardsColor,
java.awt.Color backwardsColor,
int cx1,
int cy1,
int cx2,
int cy2)
g - aktueller Graphic Contextap - aktuelle Darstellungseigenschaftencx1 - 1. x-Pixel-Koordinatecy1 - 1. y-Pixel-Koordinatecx2 - 2. x-Pixel-Koordinatecy2 - 2. y-Pixel-Koordinatepublic int getX1()
public int getX2()
public int getY1()
public int getY2()
public boolean interacts(int x,
int y,
int scale)
Drawable
interacts in class Drawablex - x-coordinate of the pointy - y-coordinate of the pointscale - actuals scale
public static boolean interacts(int x,
int y,
int x1,
int y1,
int x2,
int y2,
int mx1,
int my1,
int mx2,
int my2,
int scale)
public java.awt.Point intersects(DrawableLine line)
line - line to be tested
public boolean isSelected()
public boolean isSelected(int direction)
public EntryReadable read(EntryInput r)
r - this
public void select(int direction)
public void setSelection(boolean on)
setSelection in class Drawableon - selektieren?
public java.awt.Point touches(int x,
int y,
int tolerance)
x - x-Koordinatey - y-Koordinatetolerance - Toleranzwert
public void writeGML(EntryWriter out)
writeGML in class Drawableout - entry writer
protected void writeProtected(EntryWriter out,
int type)
writeProtected in class Drawableout - entry writertype - type of the output; meaning see read
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||