Class AbstractHidingBehavior
java.lang.Object
org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior
org.eclipse.gef.zest.fx.behaviors.AbstractHidingBehavior
- All Implemented Interfaces:
IActivatable,IAdaptable.Bound<IVisualPart<? extends javafx.scene.Node>>,IBehavior
- Direct Known Subclasses:
EdgeHidingBehavior,EdgeLabelHidingBehavior,NodeHidingBehavior
The
AbstractHidingBehavior registers listeners on the
HidingModel upon activation. When the HidingModel changes,
the hidden status of the host is
determined. If the hidden status of the
host changed, either hide() or show()
will be called, respectively. By default, the host's
visual's visibility and mouse-transparency are changed depending on the
hidden status.-
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleanReturnstrueif thehostis currently hidden.protected voidprotected voidprotected HidingModelprotected voidhide()Hides thehost.protected booleanisHidden()Returnstrueif thehostis currently considered to be hidden.protected voidonHidingModelChange(javafx.collections.SetChangeListener.Change<? extends Node> change) Called uponHidingModelchanges.protected voidshow()Shows thehost.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, getHost, hasFeedback, hasFeedback, hasHandles, hasHandles, isActive, removeAnchoreds, removeFeedback, removeFeedback, removeFeedback, removeHandles, removeHandles, removeHandles, setAdaptable, updateHandles, updateHandles
-
Constructor Details
-
AbstractHidingBehavior
public AbstractHidingBehavior()
-
-
Method Details
-
determineHiddenStatus
protected abstract boolean determineHiddenStatus()- Returns:
trueif thehostis currently hidden, otherwisefalse.
-
doActivate
protected void doActivate()- Overrides:
doActivatein classAbstractBehavior
-
doDeactivate
protected void doDeactivate()- Overrides:
doDeactivatein classAbstractBehavior
-
getHidingModel
- Returns:
- The
HidingModelthat is installed on theIViewerof thehost.
-
hide
protected void hide() -
isHidden
protected boolean isHidden()- Returns:
trueif thehostis currently considered to be hidden, otherwisefalse.
-
onHidingModelChange
protected void onHidingModelChange(javafx.collections.SetChangeListener.Change<? extends Node> change) Called uponHidingModelchanges. Determines if thehostis now hidden usingdetermineHiddenStatus()and compares the result with the previous hidden status. If thehostwas previously hidden and is not hidden anymore,show()is called. Otherwise,hide()is called.- Parameters:
change- The change event of theHidingModel.
-
show
protected void show()
-