|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.AbstractLayoutStage y.layout.LayoutMultiplexer
public class LayoutMultiplexer
This class delegates its layout calls to a core layout algorithm that is dynamically chosen at runtime by inspecting the nodes of the input graph.
If a data provider is registered with the given graph using the look-up key LAYOUTER_DPKEY
it is used to retrieve the Layouter
objects that are stored for the graph's
nodes.
If no such data provider is registered, this layout stage's core layouter (if
any) is used for layout calculation of all nodes.
Note that the first non-null
Layouter retrieved from the data provider
is used for all nodes.
The main purpose of this class is to enable the use of individual layout algorithms
for components (when used as the core layouter of class ComponentLayouter
)
or for the contents of group nodes (when used as the core layouter of class RecursiveGroupLayouter
).
Field Summary | |
---|---|
static Object |
LAYOUTER_DPKEY
Look-up key used to register a DataProvider that provides a
Layouter object for each node of a graph. |
Fields inherited from interface y.layout.Layouter |
---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
---|---|
LayoutMultiplexer()
|
Method Summary | |
---|---|
boolean |
canLayout(LayoutGraph graph)
Returns true iff the given graph can be laid
out by this algorithm. |
void |
doLayout(LayoutGraph graph)
Main layout routine that assigns new layout information to the given graph. |
protected Layouter |
getCoreLayouter(LayoutGraph graph)
Returns the core layout algorithm associated with the nodes contained in the given graph. |
Methods inherited from class y.layout.AbstractLayoutStage |
---|
canLayoutCore, doLayoutCore, getCoreLayouter, setCoreLayouter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Object LAYOUTER_DPKEY
DataProvider
that provides a
Layouter
object for each node of a graph.
Constructor Detail |
---|
public LayoutMultiplexer()
Method Detail |
---|
public boolean canLayout(LayoutGraph graph)
Layouter
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
.
public void doLayout(LayoutGraph graph)
Layouter
protected Layouter getCoreLayouter(LayoutGraph graph)
LAYOUTER_DPKEY
.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |