|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--drawables.Drawable
|
+--routing.Edge
Class representing edges.
| Field Summary | |
protected Node |
node1
Starting node. |
protected Node |
node2
End node. |
| 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 |
Edge(long id)
Constructor. |
|
Edge(long id,
int edgeClass,
Node node1,
Node node2,
java.lang.String name)
Constructor. |
|
Edge(long id,
int edgeClass,
Node node1,
Node node2,
java.lang.String name,
Edges edges)
Constructor. |
| Method Summary | |
void |
announceMove(Node node)
Announces to the edge that the node has moved to a new position. |
void |
clearMark()
Clears the mark. |
int |
compareTo(java.lang.Object edge)
Comparing function concerning the edge names. |
void |
debugPrint()
Ausgabe der Kante zu Debugging-Zwecken. |
void |
decUsage()
Decrements the usage of the edge. |
protected void |
drawProtected(java.awt.Graphics g,
int scale,
int mode,
int value)
Draws the edge if it is visible according to the given scale. |
boolean |
equals(java.lang.Object edge)
Vergleich von zwei Kanten auf Gleichheit über die ID. |
int |
getEdgeClass()
Gibt Kantenklasse zurück. |
Edges |
getEdgeContainer()
Returns the container 'Edges'. |
long |
getID()
Gibt die ID der Kante zurück. |
double |
getLength()
Gibt die Länge der Kante zurück. |
java.awt.Rectangle |
getMBR()
Returns the minimum bounding rectangle of the primitive. |
java.lang.String |
getName()
Returns the name of the edge. |
Node |
getNode1()
Gibt den Startknoten der Kante zurück. |
Node |
getNode2()
Gibt den Endknoten der Kante zurück. |
Node |
getOneNode()
Gibt einen Knoten der Kante zurück. |
Node |
getOppositeNode(Node oneNode)
Gibt den Knoten der Kante zurück, der nicht dem übergebenden Knoten entspricht. |
int |
getUsage()
Returns the usage of the edge. |
double |
getWeight()
Gibt das (gemittelte) Gewicht der Kante (in Hin- und Rückrichtung) mittels des WeightManagers zurück. |
double |
getWeight(boolean forwards)
Gibt das gerichte Kantengewicht mittels des WeightManagers zurück. |
double |
getWeight(Node from)
Gibt das Kantengewicht aus Richtung des übergebenen Knotens mittels des WeightManagers zurück. |
boolean |
hasAsNode(Node node)
Testet, ob die Kante den übergebenen Knoten als Start- oder Endknoten besitzt. |
int |
hashCode()
Gibt Hashcode für die Kante zurück. |
void |
incUsage()
Increments the usage of the edge. |
boolean |
interacts(int x,
int y,
int scale)
Tests whether the primitive is selected by a given point or not. |
boolean |
isDirectedTo(Node pNode2)
Testet, ob die Kante den übergebenen Vergleichsknoten als Zielknoten besitzt. |
boolean |
isMarked()
Is the edge marked? |
boolean |
isStartingFrom(Node pNode1)
Testet, ob die Kante den übergebenen Vergleichsknoten als Anfangsknoten besitzt. |
void |
mark()
Marks the edges. |
EntryReadable |
read(EntryInput r)
Not implemented. |
void |
replaceNode(Node oldNode,
Node newNode)
Replaces one node of the edge by another node. |
void |
setEdgeClass(short edgeClass)
Setzt die Klasse der Kante neu. |
protected void |
setID(long newID)
Set a new ID. |
void |
setName(java.lang.String name)
Sets the name of the edge. |
void |
setStandardAppearance()
Färbt die Kante gemäß der Standardfarbe ihrer Klasse ein. |
void |
setUsage(short usage)
Setzt die Benutzung der Kante neu. |
boolean |
write(java.io.DataOutput out)
Schreibt die Kante in den DataOutput. |
void |
write(EntryWriter out)
Schreibt die Kante in den EntryWriter. |
protected void |
writeProtected(EntryWriter out,
int type)
Not implemented. |
| Methods inherited from class drawables.Drawable |
computeDistance, computeDistanceTo, 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 Node node1
protected Node node2
| Constructor Detail |
protected Edge(long id)
id - ID
public Edge(long id,
int edgeClass,
Node node1,
Node node2,
java.lang.String name)
id - IDedgeClass - class of the edgenode1 - first nodenode2 - second nodename - name of the node (may be null)
public Edge(long id,
int edgeClass,
Node node1,
Node node2,
java.lang.String name,
Edges edges)
id - IDedgeClass - class of the edgenode1 - first nodenode2 - second nodename - name of the node (may be null)edges - the container of the edges| Method Detail |
public void announceMove(Node node)
node - one node of the edgepublic void clearMark()
public int compareTo(java.lang.Object edge)
compareTo in interface java.lang.Comparablepublic void debugPrint()
public void decUsage()
protected void drawProtected(java.awt.Graphics g,
int scale,
int mode,
int value)
drawProtected in class Drawableg - graphic contextscale - current scalemode - draw modevalue - valuepublic boolean equals(java.lang.Object edge)
equals in class java.lang.Objectedge - zu vergleichende Kante
public int getEdgeClass()
public Edges getEdgeContainer()
public long getID()
public double getLength()
public java.awt.Rectangle getMBR()
getMBR in class Drawablepublic java.lang.String getName()
public Node getNode1()
public Node getNode2()
public Node getOneNode()
public Node getOppositeNode(Node oneNode)
oneNode - Vergleichsknoten
public int getUsage()
public double getWeight()
public double getWeight(Node from)
from - Ausgangsknoten
public double getWeight(boolean forwards)
forwards - Kante vorwärts gerichtet?
public boolean hasAsNode(Node node)
node - Vergleichsknoten
public int hashCode()
hashCode in class java.lang.Objectpublic void incUsage()
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 boolean isDirectedTo(Node pNode2)
pNode2 - Vergleichsknoten
public boolean isMarked()
public boolean isStartingFrom(Node pNode1)
pNode1 - Vergleichsknoten
public void mark()
public EntryReadable read(EntryInput r)
read in interface EntryReadabler - Entry-Input
public void replaceNode(Node oldNode,
Node newNode)
oldNode - old nodenewNode - new nodepublic void setEdgeClass(short edgeClass)
edgeClass - Kantenklasseprotected void setID(long newID)
newID - the new IDpublic void setName(java.lang.String name)
name - new namepublic void setStandardAppearance()
public void setUsage(short usage)
usage - Benutzungpublic 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 | |||||||||