public class NodeHidingBehavior extends AbstractHidingBehavior
NodeHidingBehavior is specific to NodeContentPart. It
registers listeners on the HidingModel upon activation. When the
HidingModel changes, the hidden status of the NodeContentPart
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 NodeContentPart.pcsACTIVE_PROPERTY| Constructor and Description |
|---|
NodeHidingBehavior() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
protected void |
createHiddenNeighborsFeedbackPart()
Creates the
HiddenNeighborsFeedbackPart that shows the hidden
neighbors of the NodeContentPart on which this
NodeHidingBehavior is installed. |
void |
deactivate() |
protected boolean |
determineHiddenStatus()
Returns
true if the host is currently
hidden. |
protected IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> |
getHiddenNeighborsFeedbackPart()
Returns the
HiddenNeighborsFeedbackPart that is managed by this
NodeHidingBehavior. |
NodeContentPart |
getHost() |
protected void |
onHidingModelChange(java.beans.PropertyChangeEvent event)
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, showaddFeedback, addFeedback, addHandles, addHandles, addPropertyChangeListener, getAdaptable, getFeedbackParts, getHandleParts, isActive, removeFeedback, removeHandles, removePropertyChangeListener, setAdaptable, switchAdaptableScopespublic void activate()
activate in interface IActivatableactivate in class AbstractHidingBehaviorprotected void createHiddenNeighborsFeedbackPart()
HiddenNeighborsFeedbackPart that shows the hidden
neighbors of the NodeContentPart on which this
NodeHidingBehavior is installed.public void deactivate()
deactivate in interface IActivatabledeactivate in class AbstractHidingBehaviorprotected boolean determineHiddenStatus()
AbstractHidingBehaviordetermineHiddenStatus in class AbstractHidingBehaviortrue if the host is currently
hidden, otherwise false.protected IVisualPart<javafx.scene.Node,? extends javafx.scene.Node> getHiddenNeighborsFeedbackPart()
HiddenNeighborsFeedbackPart that is managed by this
NodeHidingBehavior.HiddenNeighborsFeedbackPart that is managed by this
NodeHidingBehavior.public NodeContentPart getHost()
getHost in interface IBehavior<javafx.scene.Node>getHost in class AbstractBehavior<javafx.scene.Node>protected void onHidingModelChange(java.beans.PropertyChangeEvent event)
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 AbstractHidingBehaviorevent - The property 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.