public class NodeHidingBehavior extends AbstractHidingBehavior
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.active, adaptableIAdaptable.Bound.Impl<T extends IAdaptable>ACTIVE_PROPERTY| Constructor and Description |
|---|
NodeHidingBehavior() |
| Modifier and Type | Method and 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. |
getHidingModel, hide, isHidden, showactivate, 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, updateHandlesprotected void createHiddenNeighborsFeedbackPart()
HiddenNeighborsFeedbackPart that shows the hidden
neighbors of the NodePart on which this
NodeHidingBehavior is installed.protected boolean determineHiddenStatus()
AbstractHidingBehaviordetermineHiddenStatus in class AbstractHidingBehaviortrue if the host is currently
hidden, otherwise false.protected void doActivate()
doActivate in class AbstractHidingBehaviorprotected void doDeactivate()
doDeactivate in class AbstractHidingBehaviorprotected IVisualPart<? extends javafx.scene.Node> getHiddenNeighborsFeedbackPart()
HiddenNeighborsFeedbackPart that is managed by this
NodeHidingBehavior.HiddenNeighborsFeedbackPart that is managed by this
NodeHidingBehavior.public NodePart getHost()
getHost in interface IBehaviorgetHost in class AbstractBehaviorprotected void onHidingModelChange(javafx.collections.SetChangeListener.Change<? extends Node> change)
AbstractHidingBehaviorHidingModel 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.onHidingModelChange in class AbstractHidingBehaviorchange - The change event of the HidingModel.protected void removeHiddenNeighborsFeedbackPart()
HiddenNeighborsFeedbackPart that is managed by this
NodeHidingBehavior.protected void updateHiddenNeighborsFeedbackPart()
HiddenNeighborsFeedbackPart that is managed by this
NodeHidingBehavior.Copyright (c) 2014 itemis AG and others. All rights reserved.