|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.wilmascope.graph.GraphElement
org.wilmascope.graph.Edge
public class Edge
An Edge links two nodes
Field Summary |
---|
Fields inherited from class org.wilmascope.graph.GraphElement |
---|
layout, owner, view, visible |
Constructor Summary | |
---|---|
Edge()
|
|
Edge(Node start,
Node end)
Creates an edge between two nodes |
|
Edge(Node start,
Node end,
EdgeView view)
Creates an edge between two nodes, and sets the view |
Method Summary | |
---|---|
void |
collapse(Cluster cluster,
Node node)
used to temporarily change the edge to point to cluster instead of node (assuming node is one of the edge's nodes). |
void |
delete()
Delete all references to this edge... |
void |
expand(Cluster cluster)
undoes the effect of collapse(org.wilmascope.graph.Cluster, org.wilmascope.graph.Node) for a given cluster |
Node |
getEnd()
|
EdgeLayout |
getLayout()
|
float |
getLength()
|
Node |
getNeighbour(Node node)
If node is one of the nodes connected by the edge, this method returns it's partner. |
java.util.Properties |
getProperties()
Any properties loaded or saved in files con be stored in a Properties object. |
Node |
getStart()
|
javax.vecmath.Vector3f |
getVector()
|
EdgeView |
getView()
|
float |
getWeight()
|
boolean |
hasVertices(Node u,
Node v)
Undirected comparison of the ends of this edge against the specified nodes |
boolean |
isDirected()
|
void |
recalculate()
|
void |
recalculateMultiEdgeOffsets()
When multiple edges exist between a pair of nodes we want them offset from each other by a small amount so that they are both visible. |
void |
reverseDirection()
swap the start and end nodes so that the edge effectively reverses direction |
void |
setEnd(Node newEnd)
Sets a new end Node for this edge. |
void |
setLayout(EdgeLayout layout)
Associates an EdgeLayout object with this edge |
void |
setProperties(java.util.Properties p)
|
void |
setStart(Node newStart)
Sets a new start Node for this edge. |
void |
setVector(javax.vecmath.Vector3f v)
|
void |
setView(EdgeView view)
Associates a ( EdgeView ) view object with this edge. |
void |
setWeight(float weight)
|
Methods inherited from class org.wilmascope.graph.GraphElement |
---|
draw, getOwner, getUserData, hide, isVisible, setOwner, show, storeUserData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Edge()
public Edge(Node start, Node end)
start
- Nodeend
- Nodepublic Edge(Node start, Node end, EdgeView view)
start
- Nodeend
- Nodeview
- EdgeViewMethod Detail |
---|
public void setView(EdgeView view)
EdgeView
) view object with this edge.
(For any edge, there can be only one view object)
view
- EdgeView
public void recalculateMultiEdgeOffsets()
public EdgeView getView()
EdgeView
for the edge object.
(For any edge object, there can be only one view object)public void setLayout(EdgeLayout layout)
public EdgeLayout getLayout()
EdgeLayout
object for this Edge.public Node getStart()
public void setStart(Node newStart)
newStart
- - a replacement Nodepublic void setEnd(Node newEnd)
newEnd
- - a replacement Nodepublic Node getEnd()
public void reverseDirection()
public float getLength()
public Node getNeighbour(Node node)
public void collapse(Cluster cluster, Node node)
expand(Cluster)
undoes the effect.
public void expand(Cluster cluster)
collapse(org.wilmascope.graph.Cluster, org.wilmascope.graph.Node)
for a given cluster
public boolean hasVertices(Node u, Node v)
u
- either the start or end vertexv
- if u=start then v=end else u=end v=start
public void delete()
delete
in class GraphElement
public void recalculate()
public void setVector(javax.vecmath.Vector3f v)
public javax.vecmath.Vector3f getVector()
public boolean isDirected()
public void setWeight(float weight)
public float getWeight()
public java.util.Properties getProperties()
GraphElement
getProperties
in class GraphElement
public void setProperties(java.util.Properties p)
setProperties
in class GraphElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |