| 
 | Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.CompositeLayouter
public class CompositeLayouter
A CompositeLayouter allows for wrapping a core layout algorithm with multiple LayoutStages.
 
   The LayoutStages are organized in a pipeline where additional LayoutStages can be 
   prepended or appended.
 
   Each LayoutStage in the pipeline executes its pre-processing code before calling its successor
   LayoutStage. Then, after all subsequent LayoutStages have finished, it will execute its
   post-processing code. 
 
   Note that the pipeline only works when all LayoutStages 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 | |
|---|---|
| CompositeLayouter(LayoutStage stage,
                  Layouter coreLayouter)Creates a new CompositeLayouterinstance that prepends the specifiedLayoutStageto the given
 layout algorithm. | |
| Method Summary | |
|---|---|
|  void | appendStage(LayoutStage stage)Appends a LayoutStageto the previously addedLayoutStages. | 
|  boolean | canLayout(LayoutGraph graph)Accepts all graphs that are accepted by the complete pipelineofLayoutStages. | 
|  void | doLayout(LayoutGraph graph)Executes the pipeline of LayoutStageand the core layout algorithm which apply the layout to the graph. | 
|  java.util.List | getLayoutStages()Returns the complete pipeline of LayoutStages that were added to thisCompositeLayouter. | 
|  void | prependStage(LayoutStage stage)Prepends a LayoutStageto the previously addedLayoutStages. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public CompositeLayouter(LayoutStage stage,
                         Layouter coreLayouter)
CompositeLayouter instance that prepends the specified LayoutStage to the given
 layout algorithm.
stage - the stage to prepend to the core algorithmcoreLayouter - the core layout algorithm| Method Detail | 
|---|
public void prependStage(LayoutStage stage)
LayoutStage to the previously added LayoutStages.
 The added LayoutStage will be invoked before any other LayoutStage. Its
 pre-processing code will be executed before the already added LayoutStages' pre-processing code while its
 post-processing code will be executed after the post-processing code of all the other LayoutStages.
stage - the stage to prependpublic java.util.List getLayoutStages()
LayoutStages that were added to this CompositeLayouter.
LayoutStages in the pipelinepublic void appendStage(LayoutStage stage)
LayoutStage to the previously added LayoutStages.
 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 LayoutStages' pre-processing code while its
 post-processing code will be executed before the post-processing code of all the other LayoutStages.
stage - the stage to appendpublic boolean canLayout(LayoutGraph graph)
pipeline of LayoutStages.
canLayout in interface Layoutergraph - the input graph
true if all LayoutStages and the core layout algorithm can handle the graphLayouter.doLayout(LayoutGraph)public void doLayout(LayoutGraph graph)
LayoutStage and the core layout algorithm which apply the layout to the graph.
doLayout in interface Layoutergraph - the input graphLayouter.canLayout(LayoutGraph)| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||