org.eclipse.gef.zest.fx.behaviors

## Class AbstractHidingBehavior

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

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

Direct Known Subclasses:
  EdgeHidingBehavior, EdgeLabelHidingBehavior, NodeHidingBehavior

    public abstract class AbstractHidingBehavior
    extends AbstractBehavior

The `AbstractHidingBehavior` registers listeners on the `HidingModel` upon activation. When the `HidingModel` changes, the hidden status of the `host` is `determined`. If the hidden status of the `host` changed, either `hide()` or `show()` will be called, respectively. By default, the `host`'s visual's visibility and mouse-transparency are changed depending on the hidden status.

### 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 and Description
`AbstractHidingBehavior()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected abstract boolean` `determineHiddenStatus()` Returns `true` if the `host` is currently hidden.
`protected void` `doActivate()`
`protected void` `doDeactivate()`
`protected HidingModel` `getHidingModel()` Returns the `HidingModel` that is installed on the `IViewer` of the `host`.
`protected void` `hide()` Hides the `host`.
`protected boolean` `isHidden()` Returns `true` if the `host` is currently considered to be hidden.
`protected void` `onHidingModelChange(SetChangeListener.Change<? extends Node> change)` Called upon `HidingModel` changes.
`protected void` `show()` Shows the `host`.

### 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 Detail

#### AbstractHidingBehavior

    public AbstractHidingBehavior()

### Method Detail

#### determineHiddenStatus

    protected abstract boolean determineHiddenStatus()

Returns `true` if the `host` is currently hidden. Otherwise, returns `false`.

Returns:
  `true` if the `host` is currently hidden, otherwise `false`.

#### doActivate

    protected void doActivate()

Overrides:
  `doActivate` in class `AbstractBehavior`

#### doDeactivate

    protected void doDeactivate()

Overrides:
  `doDeactivate` in class `AbstractBehavior`

#### getHidingModel

    protected HidingModel getHidingModel()

Returns the `HidingModel` that is installed on the `IViewer` of the `host`.

Returns:
  The `HidingModel` that is installed on the `IViewer` of the `host`.

#### hide

    protected void hide()

Hides the `host`. By default, the `host`'s visual's visibility will be set to `false` and its mouse-transparency will be set to `true`.

#### isHidden

    protected boolean isHidden()

Returns `true` if the `host` is currently considered to be hidden. Otherwise, returns `false`.

Returns:
  `true` if the `host` is currently considered to be hidden, otherwise `false`.

#### onHidingModelChange

    protected void onHidingModelChange(SetChangeListener.Change<? extends Node> change)

Called upon `HidingModel` changes. Determines if the `host` is now hidden using `determineHiddenStatus()` and compares the result with the previous hidden status. If the `host` was previously hidden and is not hidden anymore, `show()` is called. Otherwise, `hide()` is called.

Parameters:
  `change` - The change event of the `HidingModel`.

#### show

    protected void show()

Shows the `host`. By default, the `host`'s visual's visibility will be set to `true` and its mouse-transparency will be set to `false`.