y.layout.tree
Class TreeComponentLayouter

java.lang.Object
  |
  +--y.layout.tree.TreeComponentLayouter
All Implemented Interfaces:
Layouter, LayoutStage

public class TreeComponentLayouter
extends Object
implements LayoutStage

This stage can be used to do mix layouts for treelike subgraph structures and the non-tree like rest of a graph.


Field Summary
static Object DUMMY_NODE_DPKEY
          During the mainrun of the layout dummy nodes can be identified by looking at the value of the registered DataProvider which can be obtained from the graph using this key.
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
TreeComponentLayouter(Layouter treeCoreLayouter)
          Creates a new instance of TreeComponentLayouter using the specified layouter for layouting the subtrees.
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Returns true iff the given graph can be layed out by this algorithm.
 void doLayout(LayoutGraph graph)
          Assigns a new graph layout to the given layout graph.
protected  void doLayoutUsingDummies(LayoutGraph graph, DataProvider dummyDp)
           
 Layouter getCoreLayouter()
          Returns the core layouter.
 Layouter getTreeComponentCoreLayouter()
          Getter for property treeComponentCoreLayouter.
 boolean isOrientationOptimizationActive()
          Getter for property orientationOptimizationActive.
 void setCoreLayouter(Layouter l)
          Sets the core layouter.
 void setOrientationOptimizationActive(boolean orientationOptimizationActive)
          Setter for property orientationOptimizationActive.
 void setTreeComponentCoreLayouter(Layouter treeComponentCoreLayouter)
          Setter for property treeComponentCoreLayouter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DUMMY_NODE_DPKEY

public static final Object DUMMY_NODE_DPKEY
During the mainrun of the layout dummy nodes can be identified by looking at the value of the registered DataProvider which can be obtained from the graph using this key.

Constructor Detail

TreeComponentLayouter

public TreeComponentLayouter(Layouter treeCoreLayouter)
Creates a new instance of TreeComponentLayouter using the specified layouter for layouting the subtrees.

Method Detail

canLayout

public boolean canLayout(LayoutGraph graph)
Returns true iff the given graph can be layed out by this algorithm. Calling doLayout with the given graph as it's argument will only success if this method returns true.

Specified by:
canLayout in interface Layouter

doLayout

public void doLayout(LayoutGraph graph)
Assigns a new graph layout to the given layout graph.

Specified by:
doLayout in interface Layouter

doLayoutUsingDummies

protected void doLayoutUsingDummies(LayoutGraph graph,
                                    DataProvider dummyDp)

getCoreLayouter

public Layouter getCoreLayouter()
Returns the core layouter.

Specified by:
getCoreLayouter in interface LayoutStage

setCoreLayouter

public void setCoreLayouter(Layouter l)
Sets the core layouter.

Specified by:
setCoreLayouter in interface LayoutStage

getTreeComponentCoreLayouter

public Layouter getTreeComponentCoreLayouter()
Getter for property treeComponentCoreLayouter.

Returns:
Value of property treeComponentCoreLayouter.

setTreeComponentCoreLayouter

public void setTreeComponentCoreLayouter(Layouter treeComponentCoreLayouter)
Setter for property treeComponentCoreLayouter.

Parameters:
treeComponentCoreLayouter - New value of property treeComponentCoreLayouter.

isOrientationOptimizationActive

public boolean isOrientationOptimizationActive()
Getter for property orientationOptimizationActive.

Returns:
Value of property orientationOptimizationActive.

setOrientationOptimizationActive

public void setOrientationOptimizationActive(boolean orientationOptimizationActive)
Setter for property orientationOptimizationActive.

Parameters:
orientationOptimizationActive - New value of property orientationOptimizationActive.

© Copyright 2000-2003,
yWorks GmbH.
All rights reserved.

2003