|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectGraphLayoutCursor
public class GraphLayoutCursor
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
GraphDrawingCursor
.
A subclass of GraphNodeCursor
.
Constructor Summary | |
---|---|
GraphLayoutCursor(DefaultGraphCell theNode,
ImprovedJGraphLayout theLayout,
ImprovedJGraph theGraph)
Creates a new GraphLayoutCursor |
|
GraphLayoutCursor(DefaultGraphCell theNode,
ImprovedJGraphLayout theLayout,
ImprovedJGraph theGraph,
Set<DefaultGraphCell> theNodes)
Creates a new GraphLayoutCursor |
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()
Moving to the current node's most left child (assuming that there is one). |
void |
moveSidewards()
Moving to the current node's right sibling (assuming that there is one). |
void |
moveUpwards()
Moving to the current node's parent node (assuming that there is one). |
void |
processCurrentNode()
Computes the x- and y-coordinates of the current node, both relative to the direct parent node. |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphLayoutCursor(DefaultGraphCell theNode, ImprovedJGraphLayout theLayout, ImprovedJGraph theGraph)
GraphLayoutCursor
theNode
- the graph roottheLayout
- the layout algorithm to store the coordinatestheGraph
- the graph to layoutpublic GraphLayoutCursor(DefaultGraphCell theNode, ImprovedJGraphLayout theLayout, ImprovedJGraph theGraph, Set<DefaultGraphCell> theNodes)
GraphLayoutCursor
theNode
- the graph roottheLayout
- the layout algorithm to store the coordinatestheGraph
- the graph to layouttheNodes
- nodes the layout shall arrangeMethod Detail |
---|
public void processCurrentNode()
processCurrentNode
in interface NodeCursorInterface
public DefaultGraphCell getCurrentNode()
getCurrentNode
in interface NodeCursorInterface
public boolean mayMoveUpwards()
mayMoveUpwards
in interface NodeCursorInterface
public void moveUpwards()
moveUpwards
in interface NodeCursorInterface
public boolean mayMoveDownwards()
mayMoveDownwards
in interface NodeCursorInterface
public void moveDownwards()
moveDownwards
in interface NodeCursorInterface
public boolean mayMoveSidewards()
mayMoveSidewards
in interface NodeCursorInterface
public void moveSidewards()
moveSidewards
in interface NodeCursorInterface
JDomGraph.getRightSibling(DefaultGraphCell node)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |