|
|||||||||
| 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 layout
public 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 arrange| Method Detail |
|---|
public void processCurrentNode()
processCurrentNode in interface NodeCursorInterfacepublic DefaultGraphCell getCurrentNode()
getCurrentNode in interface NodeCursorInterfacepublic boolean mayMoveUpwards()
mayMoveUpwards in interface NodeCursorInterfacepublic void moveUpwards()
moveUpwards in interface NodeCursorInterfacepublic boolean mayMoveDownwards()
mayMoveDownwards in interface NodeCursorInterfacepublic void moveDownwards()
moveDownwards in interface NodeCursorInterfacepublic boolean mayMoveSidewards()
mayMoveSidewards in interface NodeCursorInterfacepublic void moveSidewards()
moveSidewards in interface NodeCursorInterfaceJDomGraph.getRightSibling(DefaultGraphCell node)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||