Package org.eclipse.gef.zest.fx.behaviors

# Class AbstractLayoutBehavior

java.lang.Object
org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior
org.eclipse.gef.zest.fx.behaviors.AbstractLayoutBehavior

All Implemented Interfaces:
  `IActivatable`, `IAdaptable.Bound<IVisualPart<? extends Node>>`, `IBehavior`

Direct Known Subclasses:
  `EdgeLayoutBehavior`, `GraphLayoutBehavior`, `NodeLayoutBehavior`

public abstract class AbstractLayoutBehavior extends AbstractBehavior
The `AbstractLayoutBehavior` is an abstract behavior that schedules `preLayout()` and `postLayout()` to be called before or after a layout pass, respectively. The `preLayout()` method can be used to write layout information into the layout model. Similarly, the `postLayout()` method can be used to read layout information from the layout model.

## Property Summary

### Properties inherited from class org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior

`active, adaptable`

## Nested Class Summary

## Nested classes/interfaces inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound

`IAdaptable.Bound.Impl<T extends IAdaptable>`

## Field Summary

### Fields inherited from interface org.eclipse.gef.common.activate.IActivatable

`ACTIVE_PROPERTY`

## Constructor Summary

Constructors
Constructor
Description
`AbstractLayoutBehavior()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doActivate()`
`protected void`
`doDeactivate()`
`protected abstract LayoutContext`
`getLayoutContext()`
Returns the `LayoutContext` for which `preLayout()` and `postLayout()` shall be called before or after a layout pass, respectively.
`protected void`
`layoutLabels()`
Called after a layout pass to adjust label positions.
`protected abstract void`
`postLayout()`
Called after a layout pass.
`protected abstract void`
`preLayout()`
Called before a layout pass.

### Methods inherited from class org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior

`activate, activeProperty, adaptableProperty, addAnchoreds, addAnchoreds, addFeedback, addFeedback, addHandles, addHandles, clearFeedback, clearHandles, deactivate, getAdaptable, getFeedback, getFeedback, getFeedbackPartFactory, getFeedbackPartFactory, getFeedbackPerTargetSet, getHandlePartFactory, getHandlePartFactory, getHandles, getHandles, getHandlesPerTargetSet, getHost, hasFeedback, hasFeedback, hasHandles, hasHandles, isActive, removeAnchoreds, removeFeedback, removeFeedback, removeFeedback, removeHandles, removeHandles, removeHandles, setAdaptable, updateHandles, updateHandles`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AbstractLayoutBehavior

public AbstractLayoutBehavior()

## Method Details

### doActivate

protected void doActivate()

Overrides:
  `doActivate` in class `AbstractBehavior`

### doDeactivate

protected void doDeactivate()

Overrides:
  `doDeactivate` in class `AbstractBehavior`

### getLayoutContext

protected abstract LayoutContext getLayoutContext()
Returns the `LayoutContext` for which `preLayout()` and `postLayout()` shall be called before or after a layout pass, respectively.

Returns:
  The `LayoutContext` for which `preLayout()` and `postLayout()` shall be called before or after a layout pass, respectively.

### layoutLabels

protected void layoutLabels()
Called after a layout pass to adjust label positions.

### postLayout

protected abstract void postLayout()
Called after a layout pass. Should be used to transfer layout information from the layout model.

### preLayout

protected abstract void preLayout()
Called before a layout pass. Should be used to transfer layout information to the layout model.