|
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.CompositeLayoutStage
public class CompositeLayoutStage
CompositeLayoutStage
allows for combining multiple LayoutStage
s.
The LayoutStage
s are organized in a pipeline where additional LayoutStage
s can be
prepended
or appended
.
Each LayoutStage
in the pipeline executes its pre-processing code before calling its successor
LayoutStage
. Then, after all subsequent LayoutStage
s have finished, it will execute its
post-processing code.
Note that the pipeline only works when all LayoutStage
s call their core layout algorithm which is the next
LayoutStage
in the pipeline.
Field Summary |
---|
Fields inherited from interface y.layout.Layouter |
---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
---|---|
CompositeLayoutStage()
Creates a new CompositeLayoutStage instance with an empty pipeline. |
|
CompositeLayoutStage(LayoutStage outerStage,
LayoutStage innerStage)
Creates a new CompositeLayoutStage instance with two LayoutStage s in the pipeline. |
Method Summary | |
---|---|
void |
appendStage(LayoutStage stage)
Appends a LayoutStage to the previously added LayoutStage s. |
boolean |
canLayout(LayoutGraph graph)
Checks whether or not the pipeline of LayoutStage s can arrange the given graph. |
void |
doLayout(LayoutGraph graph)
Executes the pipeline of LayoutStage and the core layout algorithm which apply the layout to the graph. |
java.util.List |
getLayoutStages()
Returns the complete pipeline of LayoutStage s that were added to this CompositeLayoutStage . |
void |
prependStage(LayoutStage stage)
Prepends a LayoutStage to the previously added LayoutStage s. |
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 |
Constructor Detail |
---|
public CompositeLayoutStage()
CompositeLayoutStage
instance with an empty pipeline.
public CompositeLayoutStage(LayoutStage outerStage, LayoutStage innerStage)
CompositeLayoutStage
instance with two LayoutStage
s in the pipeline.
The inner LayoutStage
will be wrapped by the outer LayoutStage
.
outerStage
- the wrapping LayoutStage
innerStage
- the wrapped LayoutStage
Method Detail |
---|
public void prependStage(LayoutStage stage)
LayoutStage
to the previously added LayoutStage
s.
The added LayoutStage
will be invoked before any other LayoutStage
. Its
pre-processing code will be executed before the already added LayoutStage
s' pre-processing code, while its
post-processing code will be executed after the post-processing code of all the other LayoutStage
s.
stage
- the stage to prependpublic java.util.List getLayoutStages()
LayoutStage
s that were added to this CompositeLayoutStage
.
LayoutStage
s in the pipelinepublic void appendStage(LayoutStage stage)
LayoutStage
to the previously added LayoutStage
s.
The added LayoutStage
will be invoked just before the core layout algorithm
will be invoked.
Its pre-processing code will be executed after the already added LayoutStage
s' pre-processing code, while its
post-processing code will be executed before the post-processing code of all the other LayoutStage
s.
stage
- the stage to appendpublic boolean canLayout(LayoutGraph graph)
LayoutStage
s can arrange the given graph.
graph
- the input graph
true
if the graph can be arranged by the pipeline of LayoutStage
s,
false
otherwiseLayouter.doLayout(LayoutGraph)
public void doLayout(LayoutGraph graph)
LayoutStage
and the core layout algorithm which apply the layout to the graph.
graph
- the input graphLayouter.canLayout(LayoutGraph)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |