|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.SequentialLayouter
public class SequentialLayouter
A SequentialLayouter allows for chaining multiple layout algorithms.
The layout algorithms are invoked one after the other in the order in which they were
added to the chain. They all run independently of each other, i.e., they only
influence each other by the changed input graph. Hence, the sequence determines the result.
One possible application would be to bundle several layout algorithms and pass a single
Layouter instance to a BufferedLayouter.

| Field Summary |
|---|
| Fields inherited from interface y.layout.Layouter |
|---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES |
| Constructor Summary | |
|---|---|
SequentialLayouter()
Creates a new SequentialLayouter instance with an empty chain of layout algorithms. |
|
| Method Summary | |
|---|---|
void |
appendLayouter(Layouter layouter)
Appends the given layout algorithm to the end of the chain. |
void |
appendLayouters(java.util.List layouters)
Appends the specified list of layout algorithms to the end of the chain. |
boolean |
canLayout(LayoutGraph graph)
Accepts all graphs that are accepted by each layout algorithm in the current chain. |
void |
clearLayouterChain()
Clears the current chain of layout algorithms and therefore removes all layout algorithms. |
void |
doLayout(LayoutGraph graph)
Executes all layout algorithms in the chain, one after the other. |
java.util.List |
getLayouters()
Returns the chain of layout algorithms. |
void |
setLayouters(java.util.List layouters)
Specifies the chain of layout algorithms. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SequentialLayouter()
SequentialLayouter instance with an empty chain of layout algorithms.
| Method Detail |
|---|
public boolean canLayout(LayoutGraph graph)
layout algorithm in the current chain.
canLayout in interface Layoutergraph - the input graph
true if all layout algorithms independently can handle this graph,
false otherwiseLayouter.doLayout(LayoutGraph)public void doLayout(LayoutGraph graph)
layout algorithms in the chain, one after the other.
The order of the layout algorithms is defined by the order in which they were appended.
doLayout in interface Layoutergraph - the input graphLayouter.canLayout(LayoutGraph)public void appendLayouter(Layouter layouter)
layout algorithm to the end of the chain.
layouter - the layout algorithm to appendpublic void appendLayouters(java.util.List layouters)
layout algorithms to the end of the chain.
layouters - the list of layout algorithms to append
java.lang.IllegalArgumentException - if there aren't only Layouter instances in the listpublic java.util.List getLayouters()
layout algorithms.
appendLayouter(Layouter),
appendLayouters(List),
setLayouters(List)public void setLayouters(java.util.List layouters)
layout algorithms.
layouters - the list of layout algorithms that should be invoked one after the otherappendLayouter(Layouter),
appendLayouters(List)public void clearLayouterChain()
layout algorithms and therefore removes all layout algorithms.
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||