All Packages Class Hierarchy This Package Previous Next Index
Class Graph.Edge
java.lang.Object
|
+----Graph.Edge
- public abstract class Edge
- extends Object
- implements Serializable, Cloneable
This is an abstract class representing an Edge.
Every edge has its own Id, which is used as key in the hash
table of all edges.(note that the start and end node are
not sufficient to determine an unique edge, there may
be more than one edge that connects same nodes)
- See Also:
- EdgeAttributes, GraphEventsAdaptor, GraphEventsCollector
-
timestampEnd
-
Timestamps, used to indicate the time when the last
change of the node position happened.
-
timestampStart
-
Timestamps, used to indicate the time when the last
change of the node position happened.
-
Edge(Integer, Node, Node)
- Edge constructor
-
addComponents(GraphPanel)
- Adds Edge Attributes component to the graph panel
-
clone()
-
This cloning method is never used (it should be abstract)
-
getEndNode()
- Get End node
-
getId()
- get Id
-
getMarkPoint()
-
This method returns the middle of the visible part of the edge (visible means that it is not covered
by either start or end node).
-
getStartNode()
-
get Start Node
-
intersectionEndNode()
-
Returns the point of intersection between edge and the end node.
-
intersectionStartNode()
-
Returns the point of intersection between edge and the start node.
-
paint(Graphics)
-
-
removeComponents(GraphPanel)
-
-
setEndNode(Node)
-
-
setEventAdaptor(GraphEventsAdaptor)
-
-
setId(Integer)
-
-
setStartNode(Node)
-
timestampEnd
public long timestampEnd
- Timestamps, used to indicate the time when the last
change of the node position happened.
Since there are several fields that depend on the position
of the Node, and their calculation is rather expensive
to be performed every time an Edge is updated/displayed
we chose to use timestamps, to reduce the expense of maintaining
fields in question (fields carry information about intersection
of edge and start/end node, and position of the center of the visible
part of the edge.
If you chose to create your own edges, note that getMarkPoint(), updates
the timestamps, so call it after the timestamp dependant methods. I suggest
that you do not change timestamps in your (new) methods, but leave it
to the getMarkPoint.
timestampStart
public long timestampStart
- Timestamps, used to indicate the time when the last
change of the node position happened.
Since there are several fields that depend on the position
of the Node, and their calculation is rather expensive
to be performed every time an Edge is updated/displayed
we chose to use timestamps, to reduce the expense of maintaining
fields in question (fields carry information about intersection
of edge and start/end node, and position of the center of the visible
part of the edge.
If you chose to create your own edges, note that getMarkPoint(), updates
the timestamps, so call it after the timestamp dependant methods. I suggest
that you do not change timestamps in your (new) methods, but leave it
to the getMarkPoint.
Edge
public Edge(Integer Id,
Node startNode,
Node endNode)
- Edge constructor
addComponents
public void addComponents(GraphPanel graphPanel)
- Adds Edge Attributes component to the graph panel
clone
public Object clone()
- This cloning method is never used (it should be abstract)
- Overrides:
- clone in class Object
getEndNode
public Node getEndNode()
- Get End node
getId
public Integer getId()
- get Id
getMarkPoint
public Point getMarkPoint()
- This method returns the middle of the visible part of the edge (visible means that it is not covered
by either start or end node). Note that is updates the timestamps.
getStartNode
public Node getStartNode()
- get Start Node
intersectionEndNode
public Point intersectionEndNode()
- Returns the point of intersection between edge and the end node.
(should be optimized)
intersectionStartNode
public Point intersectionStartNode()
- Returns the point of intersection between edge and the start node.
(should be optimized)
paint
public abstract void paint(Graphics g)
removeComponents
public void removeComponents(GraphPanel g)
setEndNode
public void setEndNode(Node endNode)
setEventAdaptor
public void setEventAdaptor(GraphEventsAdaptor gea)
setId
public void setId(Integer Id)
setStartNode
public void setStartNode(Node startNode)
All Packages Class Hierarchy This Package Previous Next Index