Class SFGraphDrawingCursor
java.lang.Object
de.saar.chorus.domgraph.layout.treelayout.DomGraphNodeCursor
de.saar.chorus.domgraph.layout.solvedformlayout.SFGraphDrawingCursor
- All Implemented Interfaces:
NodeCursorInterface
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
DomGraphLayoutCursor into positions relative to the
root.
The computet coordinates are stored in maps of the given
SolvedFormLayout and processed there.
A subclass of DomGraphNodeCursor.- Author:
- Marco Kuhlmann, Michaela Regneri
-
Field Summary
Fields inherited from class de.saar.chorus.domgraph.layout.treelayout.DomGraphNodeCursor
validEdges -
Constructor Summary
ConstructorsConstructorDescriptionSFGraphDrawingCursor(String theNode, SFGecodeTreeLayout theLayout, DomGraph aGraph) Creates a newDomGraphDrawingCursorSFGraphDrawingCursor(String theNode, SFGecodeTreeLayout theLayout, DomGraph aGraph, Set<String> theNodes) Creates a newDomGraphDrawingCursor -
Method Summary
Modifier and TypeMethodDescriptionvoidMove to the current node's most left child and compute the new coordinates (for the child node).voidMove to the current node's right sibling and compute the new coordinates (for the sibling).voidMove to the current node's parent and compute the new coordinates (for the parent node).voidComputes the positions for the current node and stores it in a map of the given layout algorithm.Methods inherited from class de.saar.chorus.domgraph.layout.treelayout.DomGraphNodeCursor
getCurrentNode, mayMoveDownwards, mayMoveSidewards, mayMoveUpwards
-
Constructor Details
-
SFGraphDrawingCursor
Creates a newDomGraphDrawingCursor- Parameters:
theNode- the graph roottheLayout- the layout algorithm to store the coordinatesaGraph- the graph to layout
-
SFGraphDrawingCursor
public SFGraphDrawingCursor(String theNode, SFGecodeTreeLayout theLayout, DomGraph aGraph, Set<String> theNodes) Creates a newDomGraphDrawingCursor- Parameters:
theNode- the graph roottheLayout- the layout algorithm to store the coordinatesaGraph- the graph to layouttheNodes- nodes the layout shall arrange
-
-
Method Details
-
moveUpwards
public void moveUpwards()Move to the current node's parent and compute the new coordinates (for the parent node).- Specified by:
moveUpwardsin interfaceNodeCursorInterface- Overrides:
moveUpwardsin classDomGraphNodeCursor
-
moveDownwards
public void moveDownwards()Move to the current node's most left child and compute the new coordinates (for the child node).- Specified by:
moveDownwardsin interfaceNodeCursorInterface- Overrides:
moveDownwardsin classDomGraphNodeCursor
-
moveSidewards
public void moveSidewards()Move to the current node's right sibling and compute the new coordinates (for the sibling).- Specified by:
moveSidewardsin interfaceNodeCursorInterface- Overrides:
moveSidewardsin classDomGraphNodeCursor- See Also:
-
JDomGraph.getRightSibling(DefaultGraphCell node)
-
processCurrentNode
public void processCurrentNode()Computes the positions for the current node and stores it in a map of the given layout algorithm.- Specified by:
processCurrentNodein interfaceNodeCursorInterface- Specified by:
processCurrentNodein classDomGraphNodeCursor
-