|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--drawables.Drawable
|
+--routing.Node
Class for representing nodes.
| Field Summary | |
protected short[] |
heapPos
Positions in a heap depending of the path (1 and 2) |
protected int |
x
x-coordinate. |
protected int |
y
y-coordinate. |
| Fields inherited from class drawables.Drawable |
AREALAYER, BITMAPLAYER, container, DEFMAXSCALE, DEFMINSCALE, layer, LINELAYER, maxScale, mbr, minScale, nextOfLayer, obj, POINTLAYER, pres, selected, TEXTLAYER |
| Constructor Summary | |
Node(long id,
int x,
int y)
Constructor. |
|
Node(long id,
int x,
int y,
Nodes nodes)
Constructor. |
|
Node(long id,
int x,
int y,
java.lang.String name,
Nodes nodes)
Constructor. |
|
| Method Summary | |
protected void |
adaptClass(int newEdgeClass)
Passt die Knotenklasse an die neue Kantenklasse an. |
void |
addEdge(Edge newEdge)
Fügt eine neue Kante dem Knoten zu. |
void |
clearMark(int value)
Löscht die angegebene Markierung vom Knoten. |
void |
clearWays()
Löscht alle Wege, die vom Knoten ausgehen. |
double |
computeDistanceTo(int x,
int y)
Computes the distance of the drawing primitive to a point. |
void |
debugPrint(int way)
Ausgabe des Knotens zu Debugging-Zwecken. |
double |
distanceTo(Node node)
Berechnet den Abstand des Knotens zu dem angegebenen Knoten. |
protected void |
drawProtected(java.awt.Graphics g,
int scale,
int mode,
int pvalue)
Draws the node if it is visible according to the given scale. |
boolean |
equals(java.lang.Object node)
Vergleich von zwei Knoten auf Gleichheit über die ID. |
double |
getDistanceOfWay(int way)
Gibt die Distanz bei dem Knoten bezüglich des angegebenen Weges zurück. |
Edge |
getFirstEdge()
Gibt die erste Kante des Knotens zurück. |
long |
getID()
Gibt die ID des Knotens zurück. |
java.awt.Rectangle |
getMBR()
Returns the minimum bounding rectangle of the primitive. |
java.lang.String |
getName()
Returns the name of the node. |
Edge |
getNextEdge()
Gibt die nächste Kante des Knotens zurück, nachdem zuvor getFirstEdge und ggf. darauffolgend getNextEdge aufgerufen worden waren. |
int |
getNodeClass()
Gibt Knotenklasse zurück. |
Nodes |
getNodeContainer()
Returns the container 'Nodes'. |
int |
getNumOfEdges()
Gibt die Anzahl der anliegenden Kanten zurück. |
Edge |
getWayEdge(int way)
Gibt die Kante zurück, über die der angefragte Weg verläuft. |
int |
getX()
Returns the x-coordinate. |
int |
getY()
Returns the y-coordinate. |
int |
hashCode()
Gibt Hashcode für den Knoten zurück. |
void |
highlight(java.lang.String presName)
Färbt den Knoten in der Hervorhebungsfarbe ein. |
boolean |
interacts(int px,
int py,
int scale)
Testet, ob das Symbol durch den übergebenen Punkt ausgewählt wird. |
boolean |
isMarked(int value)
Gibt zurück, ob der Knoten mit dem angegebenen Wert markiert ist. |
void |
mark(int value)
Markiert den Knoten mit dem angegebenen Wert. |
void |
moveTo(int x,
int y)
Moves the node to a new position. |
EntryReadable |
read(EntryInput r)
Not implemented. |
void |
removeEdge(Edge oldEdge)
Entfernt Kante vom Knoten. |
void |
replaceBy(Node node)
Replaces the actual node by the parameter node. |
void |
setDistanceOfWay(int way,
double distance)
Setzt die Distanz bezüglich des angegebenen Weges. |
protected void |
setID(long newID)
Sets the ID of the node. |
void |
setName(java.lang.String name)
Sets the name of the node. |
void |
setStandardAppearance()
Färbt den Knoten in der Standardfarbe ein. |
void |
setWay(int way,
Edge e)
Merkt sich die angegebene Kante als weiteren Verlauf des angegebenen Weges. |
boolean |
write(java.io.DataOutput out)
Schreibt den Knoten in den DataOutput. |
void |
write(EntryWriter out)
Schreibt den Knoten in den EntryWriter. |
protected void |
writeProtected(EntryWriter out,
int type)
Not implemented. |
| Methods inherited from class drawables.Drawable |
computeDistance, contains, draw, draw, draw, draw, getContainer, getId, getLayer, getMaxScale, getMinScale, getNextOfLayer, getObject, getPresentation, getPresentation, getType, 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, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected int x
protected int y
protected short[] heapPos
| Constructor Detail |
public Node(long id,
int x,
int y)
id - id of the nodex - x-coordinatey - y-coordinate
public Node(long id,
int x,
int y,
java.lang.String name,
Nodes nodes)
id - id of the nodex - x-coordinatey - y-coordinatename - namenodes - container
public Node(long id,
int x,
int y,
Nodes nodes)
id - id of the nodex - x-coordinatey - y-coordinatenodes - container| Method Detail |
protected void adaptClass(int newEdgeClass)
newEdgeClass - neue Kantenklassepublic void addEdge(Edge newEdge)
newEdge - die neue Kantepublic void clearMark(int value)
value - Wert der Markierungpublic void clearWays()
public double computeDistanceTo(int x,
int y)
computeDistanceTo in class Drawablex - x-coordinate of the pointy - x-coordinate of the point
public void debugPrint(int way)
public double distanceTo(Node node)
node - Vergleichs-Knoten
protected void drawProtected(java.awt.Graphics g,
int scale,
int mode,
int pvalue)
drawProtected in class Drawableg - graphic contextscale - current scalemode - draw modepvalue - presentation valuepublic boolean equals(java.lang.Object node)
equals in class java.lang.Objectnode - zu vergleichender Knoten
public double getDistanceOfWay(int way)
public Edge getFirstEdge()
public long getID()
public java.awt.Rectangle getMBR()
getMBR in class Drawablepublic java.lang.String getName()
public Edge getNextEdge()
public int getNodeClass()
public Nodes getNodeContainer()
public int getNumOfEdges()
public Edge getWayEdge(int way)
way - Index des Weges
public int hashCode()
hashCode in class java.lang.Objectpublic int getX()
public int getY()
public void highlight(java.lang.String presName)
presName - Darstellungsname
public boolean interacts(int px,
int py,
int scale)
interacts in class Drawablepx - x-Koordinate in Basis-Koordinatenpy - y-Koordinate in Basis-Koordinatenscale - akt. Maßstab
public boolean isMarked(int value)
value - Markierungswert
public void mark(int value)
value - Markierunsgwert
public void moveTo(int x,
int y)
x - new x-coordinatey - new y-coordinatepublic EntryReadable read(EntryInput r)
r - Entry-Input
public void removeEdge(Edge oldEdge)
oldEdge - zu entfernende Kantepublic void replaceBy(Node node)
node - replacing node
public void setDistanceOfWay(int way,
double distance)
way - Index des Wegesdistance - Distanzprotected void setID(long newID)
newID - the new IDpublic void setName(java.lang.String name)
name - new namepublic void setStandardAppearance()
public void setWay(int way,
Edge e)
way - Index des Wegse - Kante, über der der Weg verläuftpublic boolean write(java.io.DataOutput out)
out - DataOutput
public void write(EntryWriter out)
out - EntryWriter
protected void writeProtected(EntryWriter out,
int type)
writeProtected in class Drawableout - entry writertype - type of the output (meaning depends on the concrete subclass)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||