|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgraph.layout.JGraphCompoundLayout
public class JGraphCompoundLayout
This allows to recursively compose any number of abstract layouts into a compound abstract layout. Note that this is more flexible than a decorator pattern, because you can use different class hierarchies to implement the input (facade) and the layout algorithms, while adhering to the rule that each layout algorithm uses the output of the last layout as its input.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.jgraph.layout.JGraphLayout |
---|
JGraphLayout.Stoppable |
Field Summary | |
---|---|
protected List |
layouts
Holds all layouts. |
Fields inherited from interface com.jgraph.layout.JGraphLayout |
---|
VERSION |
Constructor Summary | |
---|---|
JGraphCompoundLayout()
Default constructor |
|
JGraphCompoundLayout(JGraphLayout[] layouts)
Constructs a compound layout consisting of the specified first- and secondStep. |
Method Summary | |
---|---|
void |
add(JGraphLayout layout)
Adds a layout to layouts . |
List |
getLayouts()
Returns the list of layouts. |
void |
remove(JGraphLayout layout)
Removes a layout from layouts |
void |
run(JGraphFacade graph)
Runs all layouts in the order they were inserted. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected List layouts
Constructor Detail |
---|
public JGraphCompoundLayout()
public JGraphCompoundLayout(JGraphLayout[] layouts)
Method Detail |
---|
public void run(JGraphFacade graph)
run
in interface JGraphLayout
graph
- The layout facade that the layout will use as inputpublic void add(JGraphLayout layout)
layouts
.
layout
- The layout to add.public void remove(JGraphLayout layout)
layouts
layout
- The layout to remove.public List getLayouts()
|
JGraph |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |