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

# Class NodeHidingBehavior

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

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

public class NodeHidingBehavior extends AbstractHidingBehavior
The `NodeHidingBehavior` is specific to `NodePart`. It registers listeners on the `HidingModel` upon activation. When the `HidingModel` changes, the hidden status of the `NodePart` is determined. If the hidden status of the part changed, either `AbstractHidingBehavior.hide()` or `AbstractHidingBehavior.show()` will be called, respectively, to hide/show the part. Additionally, a `HiddenNeighborsFeedbackPart` is managed by this `NodeHidingBehavior`. The `HiddenNeighborsFeedbackPart` shows the number of hidden neighbors of the `NodePart`.

## 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
`NodeHidingBehavior()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`createHiddenNeighborsFeedbackPart()`
Creates the `HiddenNeighborsFeedbackPart` that shows the hidden neighbors of the `NodePart` on which this `NodeHidingBehavior` is installed.
`protected boolean`
`determineHiddenStatus()`
Returns `true` if the `host` is currently hidden.
`protected void`
`doActivate()`
`protected void`
`doDeactivate()`
`protected IVisualPart<? extends javafx.scene.Node>`
`getHiddenNeighborsFeedbackPart()`
Returns the `HiddenNeighborsFeedbackPart` that is managed by this `NodeHidingBehavior`.
`NodePart`
`getHost()`
`protected void`
`onHidingModelChange(javafx.collections.SetChangeListener.Change<? extends Node> change)`
Called upon `HidingModel` changes.
`protected void`
`removeHiddenNeighborsFeedbackPart()`
Removes the `HiddenNeighborsFeedbackPart` that is managed by this `NodeHidingBehavior`.
`protected void`
`updateHiddenNeighborsFeedbackPart()`
Refreshes the `HiddenNeighborsFeedbackPart` that is managed by this `NodeHidingBehavior`.

### Methods inherited from class org.eclipse.gef.zest.fx.behaviors.AbstractHidingBehavior

`getHidingModel, hide, isHidden, show`

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

### NodeHidingBehavior

public NodeHidingBehavior()

## Method Details

### createHiddenNeighborsFeedbackPart

protected void createHiddenNeighborsFeedbackPart()
Creates the `HiddenNeighborsFeedbackPart` that shows the hidden neighbors of the `NodePart` on which this `NodeHidingBehavior` is installed.

### determineHiddenStatus

protected boolean determineHiddenStatus()
Description copied from class: `AbstractHidingBehavior`
Returns `true` if the `host` is currently hidden. Otherwise, returns `false`.

Specified by:
  `determineHiddenStatus` in class `AbstractHidingBehavior`
Returns:
  `true` if the `host` is currently hidden, otherwise `false`.

### doActivate

protected void doActivate()

Overrides:
  `doActivate` in class `AbstractHidingBehavior`

### doDeactivate

protected void doDeactivate()

Overrides:
  `doDeactivate` in class `AbstractHidingBehavior`

### getHiddenNeighborsFeedbackPart

protected IVisualPart<? extends javafx.scene.Node> getHiddenNeighborsFeedbackPart()
Returns the `HiddenNeighborsFeedbackPart` that is managed by this `NodeHidingBehavior`.

Returns:
  The `HiddenNeighborsFeedbackPart` that is managed by this `NodeHidingBehavior`.

### getHost

public NodePart getHost()

Specified by:
  `getHost` in interface `IBehavior`
Overrides:
  `getHost` in class `AbstractBehavior`

### onHidingModelChange

protected void onHidingModelChange(javafx.collections.SetChangeListener.Change<? extends Node> change)
Description copied from class: `AbstractHidingBehavior`
Called upon `HidingModel` changes. Determines if the `host` is now hidden using `AbstractHidingBehavior.determineHiddenStatus()` and compares the result with the previous hidden status. If the `host` was previously hidden and is not hidden anymore, `AbstractHidingBehavior.show()` is called. Otherwise, `AbstractHidingBehavior.hide()` is called.

Overrides:
  `onHidingModelChange` in class `AbstractHidingBehavior`
Parameters:
  `change` - The change event of the `HidingModel`.

### removeHiddenNeighborsFeedbackPart

protected void removeHiddenNeighborsFeedbackPart()
Removes the `HiddenNeighborsFeedbackPart` that is managed by this `NodeHidingBehavior`.

### updateHiddenNeighborsFeedbackPart

protected void updateHiddenNeighborsFeedbackPart()
Refreshes the `HiddenNeighborsFeedbackPart` that is managed by this `NodeHidingBehavior`.