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 Node>>
,IBehavior
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Creates theHiddenNeighborsFeedbackPart
that shows the hidden neighbors of theNodePart
on which thisNodeHidingBehavior
is installed.protected boolean
Returnstrue
if thehost
is currently hidden.protected void
protected void
protected IVisualPart<? extends Node>
Returns theHiddenNeighborsFeedbackPart
that is managed by thisNodeHidingBehavior
.getHost()
protected void
onHidingModelChange
(SetChangeListener.Change<? extends Node> change) Called uponHidingModel
changes.protected void
Removes theHiddenNeighborsFeedbackPart
that is managed by thisNodeHidingBehavior
.protected void
Refreshes theHiddenNeighborsFeedbackPart
that is managed by thisNodeHidingBehavior
.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
-
Constructor Details
-
NodeHidingBehavior
public NodeHidingBehavior()
-
-
Method Details
-
createHiddenNeighborsFeedbackPart
protected void createHiddenNeighborsFeedbackPart()Creates theHiddenNeighborsFeedbackPart
that shows the hidden neighbors of theNodePart
on which thisNodeHidingBehavior
is installed. -
determineHiddenStatus
protected boolean determineHiddenStatus()Description copied from class:AbstractHidingBehavior
- Specified by:
determineHiddenStatus
in classAbstractHidingBehavior
- Returns:
true
if thehost
is currently hidden, otherwisefalse
.
-
doActivate
protected void doActivate()- Overrides:
doActivate
in classAbstractHidingBehavior
-
doDeactivate
protected void doDeactivate()- Overrides:
doDeactivate
in classAbstractHidingBehavior
-
getHiddenNeighborsFeedbackPart
Returns theHiddenNeighborsFeedbackPart
that is managed by thisNodeHidingBehavior
.- Returns:
- The
HiddenNeighborsFeedbackPart
that is managed by thisNodeHidingBehavior
.
-
getHost
- Specified by:
getHost
in interfaceIBehavior
- Overrides:
getHost
in classAbstractBehavior
-
onHidingModelChange
Description copied from class:AbstractHidingBehavior
Called uponHidingModel
changes. Determines if thehost
is now hidden usingAbstractHidingBehavior.determineHiddenStatus()
and compares the result with the previous hidden status. If thehost
was previously hidden and is not hidden anymore,AbstractHidingBehavior.show()
is called. Otherwise,AbstractHidingBehavior.hide()
is called.- Overrides:
onHidingModelChange
in classAbstractHidingBehavior
- Parameters:
change
- The change event of theHidingModel
.
-
removeHiddenNeighborsFeedbackPart
protected void removeHiddenNeighborsFeedbackPart()Removes theHiddenNeighborsFeedbackPart
that is managed by thisNodeHidingBehavior
. -
updateHiddenNeighborsFeedbackPart
protected void updateHiddenNeighborsFeedbackPart()Refreshes theHiddenNeighborsFeedbackPart
that is managed by thisNodeHidingBehavior
.
-