Package org.eclipse.gef.zest.fx.policies

# Class HidePolicy

java.lang.Object
org.eclipse.gef.common.adapt.IAdaptable.Bound.Impl<IVisualPart<? extends Node>>
org.eclipse.gef.mvc.fx.policies.AbstractPolicy
org.eclipse.gef.zest.fx.policies.HidePolicy

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

public class HidePolicy extends AbstractPolicy
The `HidePolicy` can be installed on `NodePart` to hide the contents.

## Property Summary

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

`adaptable`

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

`adaptable`

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`HidePolicy.ClearHoverHandlesOperation`
Clears the hover handles for the given part upon execution of this operation.

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

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

## Constructor Summary

Constructors
Constructor
Description
`HidePolicy()`

## Method Summary

Modifier and Type
Method
Description
`protected ITransactionalOperation`
`createDeselectOperation(NodePart part)`
Returns an `ITransactionalOperation` that removes the given `NodePart` from the `SelectionModel` of the corresponding `IViewer`.
`protected ITransactionalOperation`
`createHideOperation(NodePart part)`
Returns an `ITransactionalOperation` that adds the given `NodePart` to the `HidingModel` of its `IViewer` .
`protected ITransactionalOperation`
`createOperation()`
`protected ITransactionalOperation`
`createUnfocusOperation(NodePart part)`
Returns an `ITransactionalOperation` that removes the given `NodePart` from the `FocusModel` of the corresponding `IViewer`.
`NodePart`
`getHost()`
`void`
`hide()`
Executes an operation on the history that hides the `host` `NodePart` (and removes it from the `FocusModel` and from the `SelectionModel`).

### Methods inherited from class org.eclipse.gef.mvc.fx.policies.AbstractPolicy

`checkInitialized, commit, getOperation, init, isInitialized, locallyExecuteOperation, rollback`

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

`adaptableProperty, getAdaptable, setAdaptable`

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

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

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

`adaptableProperty, getAdaptable, setAdaptable`

## Constructor Details

### HidePolicy

public HidePolicy()

## Method Details

### createDeselectOperation

protected ITransactionalOperation createDeselectOperation(NodePart part)
Returns an `ITransactionalOperation` that removes the given `NodePart` from the `SelectionModel` of the corresponding `IViewer`.

Parameters:
  `part` - The `NodePart` that is to be removed from the `SelectionModel`.
Returns:
  An `ITransactionalOperation` that removes the given `NodePart` from the `SelectionModel`.

### createHideOperation

protected ITransactionalOperation createHideOperation(NodePart part)
Returns an `ITransactionalOperation` that adds the given `NodePart` to the `HidingModel` of its `IViewer` .

Parameters:
  `part` - The `NodePart` that is to be hidden.
Returns:
  An `ITransactionalOperation` that adds the given `NodePart` to the `HidingModel` of its `IViewer`.

### createOperation

protected ITransactionalOperation createOperation()

Specified by:
  `createOperation` in class `AbstractPolicy`

### createUnfocusOperation

protected ITransactionalOperation createUnfocusOperation(NodePart part)
Returns an `ITransactionalOperation` that removes the given `NodePart` from the `FocusModel` of the corresponding `IViewer`.

Parameters:
  `part` - The `NodePart` that is to be removed.
Returns:
  An `ITransactionalOperation` that removes the given `NodePart` from the `FocusModel`.

### getHost

public NodePart getHost()

### hide

public void hide()
Executes an operation on the history that hides the `host` `NodePart` (and removes it from the `FocusModel` and from the `SelectionModel`).