|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.tree.TreeComponentLayouter
public class TreeComponentLayouter
This stage can be used to do mix layouts for tree-like subgraph structures and the non-tree like rest of a graph.
Field Summary | |
---|---|
static Object |
DUMMY_NODE_DPKEY
During the main run 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 laying out the subtrees. |
Method Summary | |
---|---|
boolean |
canLayout(LayoutGraph graph)
Returns true iff the given graph can be laid
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)
Called by doLayout(y.layout.LayoutGraph) to delegate to the
getCoreLayouter() , adding the dummy provider to the graph instance. |
Layouter |
getCoreLayouter()
Returns the core layouter. |
Layouter |
getTreeComponentCoreLayouter()
Returns the core layouter used for tree components. |
boolean |
isOrientationOptimizationActive()
Returns true if this layouter tries to improve tree component
placement by changing the components orientation and false
otherwise. |
void |
setCoreLayouter(Layouter l)
Sets the core layouter. |
void |
setOrientationOptimizationActive(boolean orientationOptimizationActive)
Specifies whether this layouter should try to improve tree component placement by changing the components orientation. |
void |
setTreeComponentCoreLayouter(Layouter treeComponentCoreLayouter)
Specifies the core layouter used for tree components. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object DUMMY_NODE_DPKEY
Constructor Detail |
---|
public TreeComponentLayouter(Layouter treeCoreLayouter)
Method Detail |
---|
public boolean canLayout(LayoutGraph graph)
true
iff the given graph can be laid
out by this algorithm. Calling doLayout
with
the given graph as its argument will only success if
this method returns true
.
canLayout
in interface Layouter
public void doLayout(LayoutGraph graph)
doLayout
in interface Layouter
protected void doLayoutUsingDummies(LayoutGraph graph, DataProvider dummyDp)
doLayout(y.layout.LayoutGraph)
to delegate to the
getCoreLayouter()
, adding the dummy provider to the graph instance.
public Layouter getCoreLayouter()
getCoreLayouter
in interface LayoutStage
public void setCoreLayouter(Layouter l)
setCoreLayouter
in interface LayoutStage
public Layouter getTreeComponentCoreLayouter()
public void setTreeComponentCoreLayouter(Layouter treeComponentCoreLayouter)
public boolean isOrientationOptimizationActive()
true
if this layouter tries to improve tree component
placement by changing the components orientation and false
otherwise.
public void setOrientationOptimizationActive(boolean orientationOptimizationActive)
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |