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
public abstract class AbstractHidingBehavior extends AbstractBehavior
TheAbstractHidingBehaviorregisters listeners on theHidingModelupon activation. When theHidingModelchanges, the hidden status of thehostisdetermined. If the hidden status of thehostchanged, eitherhide()orshow()will be called, respectively. By default, thehost's visual's visibility and mouse-transparency are changed depending on the hidden status.
-
-
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 Constructor Description AbstractHidingBehavior()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleandetermineHiddenStatus()Returnstrueif thehostis currently hidden.protected voiddoActivate()protected voiddoDeactivate()protected HidingModelgetHidingModel()protected 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
-
-
-
-
Method Detail
-
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
protected HidingModel 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()
-
-