org.globus.cog.gui.grapheditor.canvas.views.layouts
Class HierarchicalLayout
java.lang.Object
org.globus.cog.gui.grapheditor.canvas.views.layouts.HierarchicalLayout
- All Implemented Interfaces:
- GraphLayoutEngine
- public class HierarchicalLayout
- extends Object
- implements GraphLayoutEngine
Adds distribution of edges around the node so they tend to have equal angles
between them. Incoming edges will be coming from above, while outgoing edges
will go downwards. The behaviour can be easily reversed by turning your
monitor upside-down
|
Method Summary |
Hashtable |
layoutGraph(GraphInterface graph,
Hashtable fixedNodes)
This method takes a graph and a Hashtable with the nodes that cannot be moved and
returns a Hashtable with the coordinates of the nodes after doing the layout. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HierarchicalLayout
public HierarchicalLayout()
layoutGraph
public Hashtable layoutGraph(GraphInterface graph,
Hashtable fixedNodes)
- Description copied from interface:
GraphLayoutEngine
- This method takes a graph and a Hashtable with the nodes that cannot be moved and
returns a Hashtable with the coordinates of the nodes after doing the layout.
- Specified by:
layoutGraph in interface GraphLayoutEngine
- Parameters:
graph - The graph that needs to be layed outfixedNodes - A Hashtable containing Node objects as keys, and
Points as elements, which specify the coordinates of the non-movable nodes
- Returns:
- a Hashtable with Node objects as keys and Point objects as coordinates
for the nodes.