public class CompositeLayoutAlgorithm extends java.lang.Object implements ILayoutAlgorithm
CompositeLayoutAlgorithm
combines multiple
ILayoutAlgorithm
s. When doing a layout-pass, all the algorithms are
applied in sequence.Constructor and Description |
---|
CompositeLayoutAlgorithm(ILayoutAlgorithm[] algorithms)
Constructs a new
CompositeLayoutAlgorithm that combines the given
ILayoutAlgorithm s. |
Modifier and Type | Method and Description |
---|---|
void |
applyLayout(boolean clean)
Makes this algorithm perform layout computation and apply it to its
context.
|
LayoutContext |
getLayoutContext()
Returns the previously set
LayoutContext . |
void |
setLayoutContext(LayoutContext context)
Sets the layout context for this algorithm.
|
public CompositeLayoutAlgorithm(ILayoutAlgorithm[] algorithms)
CompositeLayoutAlgorithm
that combines the given
ILayoutAlgorithm
s.algorithms
- The ILayoutAlgorithm
s that are combined by this
CompositeLayoutAlgorithm
.public void applyLayout(boolean clean)
ILayoutAlgorithm
applyLayout
in interface ILayoutAlgorithm
clean
- if true the receiver should assume that the layout context has
changed significantly and recompute the whole layout even if
it keeps track of changes with listeners. False can be used
after dynamic layout in a context is turned back on so that
layout algorithm working in background can apply accumulated
changes. Static layout algorithm can ignore this call entirely
if clean is false.public void setLayoutContext(LayoutContext context)
ILayoutAlgorithm
setLayoutContext
in interface ILayoutAlgorithm
context
- a new layout context or null if this algorithm should not
perform any layoutpublic LayoutContext getLayoutContext()
ILayoutAlgorithm
LayoutContext
.getLayoutContext
in interface ILayoutAlgorithm
LayoutContext
Copyright (c) 2014 itemis AG and others. All rights reserved.