Class DomGraphLayoutCursor
java.lang.Object
de.saar.chorus.domgraph.layout.treelayout.DomGraphNodeCursor
de.saar.chorus.domgraph.layout.treelayout.DomGraphLayoutCursor
- All Implemented Interfaces:
NodeCursorInterface
A class to determine the positions of nodes in a graph that
is a tree, relative to their direct parents. These positions are stored
in a given layout algorithm and converted later on by a
DomGraphDrawingCursor.
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
ConstructorsConstructorDescriptionDomGraphLayoutCursor(String theNode, Canvas canv, FragmentLayoutAlgorithm theLayout, DomGraph theGraph, Map<String, String> nl) Creates a newDomGraphLayoutCursorDomGraphLayoutCursor(String theNode, Canvas canv, FragmentLayoutAlgorithm theLayout, DomGraph theGraph, Set<String> theNodes, Map<String, String> nl) Creates a newDomGraphLayoutCursor -
Method Summary
Modifier and TypeMethodDescriptionvoidComputes the x- and y-coordinates of the current node, both relative to the direct parent node.Methods inherited from class de.saar.chorus.domgraph.layout.treelayout.DomGraphNodeCursor
getCurrentNode, mayMoveDownwards, mayMoveSidewards, mayMoveUpwards, moveDownwards, moveSidewards, moveUpwards
-
Constructor Details
-
DomGraphLayoutCursor
public DomGraphLayoutCursor(String theNode, Canvas canv, FragmentLayoutAlgorithm theLayout, DomGraph theGraph, Map<String, String> nl) Creates a newDomGraphLayoutCursor- Parameters:
theNode- the graph roottheLayout- the layout algorithm to store the coordinatestheGraph- the graph to layout
-
DomGraphLayoutCursor
public DomGraphLayoutCursor(String theNode, Canvas canv, FragmentLayoutAlgorithm theLayout, DomGraph theGraph, Set<String> theNodes, Map<String, String> nl) Creates a newDomGraphLayoutCursor- Parameters:
theNode- the graph roottheLayout- the layout algorithm to store the coordinatestheGraph- the graph to layouttheNodes- nodes the layout shall arrange
-
-
Method Details
-
processCurrentNode
public void processCurrentNode()Computes the x- and y-coordinates of the current node, both relative to the direct parent node.- Specified by:
processCurrentNodein interfaceNodeCursorInterface- Specified by:
processCurrentNodein classDomGraphNodeCursor
-