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, adaptable
IAdaptable.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, show
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
protected void createHiddenNeighborsFeedbackPart()
HiddenNeighborsFeedbackPart
that shows the hidden
neighbors of the NodePart
on which this
NodeHidingBehavior
is installed.protected boolean determineHiddenStatus()
AbstractHidingBehavior
determineHiddenStatus
in class AbstractHidingBehavior
true
if the host
is currently
hidden, otherwise false
.protected void doActivate()
doActivate
in class AbstractHidingBehavior
protected void doDeactivate()
doDeactivate
in class AbstractHidingBehavior
protected 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 IBehavior
getHost
in class AbstractBehavior
protected void onHidingModelChange(javafx.collections.SetChangeListener.Change<? extends Node> change)
AbstractHidingBehavior
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.onHidingModelChange
in class AbstractHidingBehavior
change
- 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.