Package org.eclipse.zest.layouts

# Interface LayoutAlgorithm

All Known Subinterfaces:
  `LayoutAlgorithm.Zest1`

All Known Implementing Classes:
  `AbstractLayoutAlgorithm`, `AbstractLayoutAlgorithm.Zest1`, `BoxLayoutAlgorithm`, `CompositeLayoutAlgorithm`, `CompositeLayoutAlgorithm.Zest1`, `ContinuousLayoutAlgorithm`, `DirectedGraphLayoutAlgorithm`, `DirectedGraphLayoutAlgorithm.Zest1`, `GridLayoutAlgorithm`, `GridLayoutAlgorithm.Zest1`, `HorizontalLayoutAlgorithm`, `HorizontalShift`, `HorizontalShiftAlgorithm`, `HorizontalTreeLayoutAlgorithm`, `RadialLayoutAlgorithm`, `RadialLayoutAlgorithm.Zest1`, `SpaceTreeLayoutAlgorithm`, `SpringLayoutAlgorithm`, `SpringLayoutAlgorithm.Zest1`, `SugiyamaLayoutAlgorithm`, `TreeLayoutAlgorithm`, `TreeLayoutAlgorithm.Zest1`, `VerticalLayoutAlgorithm`

public interface LayoutAlgorithm
A simple interface used by all layouts.

@noextend
  This interface is not intended to be extended by clients.
@noimplement
  This interface is not intended to be implemented by clients.

## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
`static interface`
`LayoutAlgorithm.Zest1`
Deprecated, for removal: This API element is subject to removal in a future version.
Use `LayoutAlgorithm` instead.

## Method Summary

Modifier and Type
Method
Description
`void`
`applyLayout(boolean clean)`
Makes this algorithm perform layout computation and apply it to its context.
`void`
`setLayoutContext(LayoutContext context)`
Sets the layout context for this algorithm.

## Method Details

### setLayoutContext

void setLayoutContext(LayoutContext context)
Sets the layout context for this algorithm. The receiver will unregister from its previous layout context and register to the new one (registration means for example adding listeners). After a call to this method, the receiving algorithm can compute and cache internal data related to given context and perform an initial layout.

Parameters:
  `context` - a new layout context or null if this algorithm should not perform any layout
Since:
  2.0

### applyLayout

void applyLayout(boolean clean)
Makes this algorithm perform layout computation and apply it to its context.

Parameters:
  `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.
Since:
  2.0