|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectGraphDrawingCursor
public class GraphDrawingCursor
A class to determine the coordinates of a node relative to the graph root.
This converts the positions (relative to the direct parent) computet by a
GraphLayoutCursor
into positions relative to the
root.
The computet coordinates are stored in maps of the given
SolvedFormLayout
and processed there.
A subclass of GraphNodeCursor
.
Constructor Summary | |
---|---|
GraphDrawingCursor(DefaultGraphCell theNode,
ImprovedJGraphLayout theLayout,
ImprovedJGraph aGraph)
Creates a new GraphDrawingCursor |
|
GraphDrawingCursor(DefaultGraphCell theNode,
ImprovedJGraphLayout theLayout,
ImprovedJGraph aGraph,
Set<DefaultGraphCell> theNodes)
Creates a new GraphDrawingCursor |
Method Summary | |
---|---|
DefaultGraphCell |
getCurrentNode()
Returns the recently processed node. |
boolean |
mayMoveDownwards()
Checking whether the current node has at least one child. |
boolean |
mayMoveSidewards()
Checking whether the current node has a sibling on the right. |
boolean |
mayMoveUpwards()
Checking whether the current node has a direct parent node. |
void |
moveDownwards()
Move to the current node's most left child and compute the new coordinates (for the child node). |
void |
moveSidewards()
Move to the current node's right sibling and compute the new coordinates (for the sibling). |
void |
moveUpwards()
Move to the current node's parent and compute the new coordinates (for the parent node). |
void |
processCurrentNode()
Computes the positions for the current node and stores it in a map of the given layout algorithm. |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphDrawingCursor(DefaultGraphCell theNode, ImprovedJGraphLayout theLayout, ImprovedJGraph aGraph)
GraphDrawingCursor
theNode
- the graph roottheLayout
- the layout algorithm to store the coordinatesaGraph
- the graph to layoutpublic GraphDrawingCursor(DefaultGraphCell theNode, ImprovedJGraphLayout theLayout, ImprovedJGraph aGraph, Set<DefaultGraphCell> theNodes)
GraphDrawingCursor
theNode
- the graph roottheLayout
- the layout algorithm to store the coordinatesaGraph
- the graph to layouttheNodes
- nodes the layout shall arrangeMethod Detail |
---|
public void moveUpwards()
moveUpwards
in interface NodeCursorInterface
public void moveDownwards()
moveDownwards
in interface NodeCursorInterface
public void moveSidewards()
moveSidewards
in interface NodeCursorInterface
JDomGraph.getRightSibling(DefaultGraphCell node)
public void processCurrentNode()
processCurrentNode
in interface NodeCursorInterface
public DefaultGraphCell getCurrentNode()
getCurrentNode
in interface NodeCursorInterface
public boolean mayMoveUpwards()
mayMoveUpwards
in interface NodeCursorInterface
public boolean mayMoveDownwards()
mayMoveDownwards
in interface NodeCursorInterface
public boolean mayMoveSidewards()
mayMoveSidewards
in interface NodeCursorInterface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |