org.eclipse.gef.mvc.fx.policies

## Interface IPolicy

All Superinterfaces:
  IAdaptable.Bound<IVisualPart<? extends Node>>

All Known Implementing Classes:
  AbstractPolicy, BendConnectionPolicy, ContentPolicy, CreationPolicy, DeletionPolicy, FocusTraversalPolicy, ResizePolicy, TransformPolicy, ViewportPolicy

    public interface IPolicy
    extends IAdaptable.Bound<IVisualPart<? extends Node>>

The `IPolicy` interface extends `IAdaptable.Bound`, i.e. it is bound to an `IAdaptable`, its so called `getHost()`.

### Property Summary

### Properties inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound

`adaptable`

### Nested Class Summary

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

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

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`ITransactionalOperation` `commit()` Returns an `ITransactionalOperation` that performs all manipulations applied by the policy since the previous `init()` call.
`default IVisualPart<? extends Node>` `getHost()` Returns the host of this `IPolicy`, i.e. the `IVisualPart` this `IPolicy` is attached to.
`void` `init()` Initializes the policy, so that the policy's "work" methods can be used.
`void` `rollback()` Puts back this policy into an uninitialized state, reverting any changes that have been applied via the policy's work methods since the preceding `init()` call.

### Methods inherited from interface org.eclipse.gef.common.adapt.IAdaptable.Bound

`adaptableProperty, getAdaptable, setAdaptable`

### Method Detail

#### commit

    ITransactionalOperation commit()

Returns an `ITransactionalOperation` that performs all manipulations applied by the policy since the previous `init()` call.

Returns:
  An `ITransactionalOperation` that performs all manipulations applied by the policy since the last `init()` call.

#### getHost

    default IVisualPart<? extends Node> getHost()

Returns the host of this `IPolicy`, i.e. the `IVisualPart` this `IPolicy` is attached to.

Returns:
  The host of this `IPolicy`.

#### init

    void init()

Initializes the policy, so that the policy's "work" methods can be used. Calling a "work" method while the policy is not initialized will result in an `IllegalStateException`, as well as re-initializing before committing or rolling back.

#### rollback

    void rollback()

Puts back this policy into an uninitialized state, reverting any changes that have been applied via the policy's work methods since the preceding `init()` call.