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
TheAbstractHidingBehavior
registers listeners on theHidingModel
upon activation. When theHidingModel
changes, the hidden status of thehost
isdetermined
. If the hidden status of thehost
changed, 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 boolean
determineHiddenStatus()
Returnstrue
if thehost
is currently hidden.protected void
doActivate()
protected void
doDeactivate()
protected HidingModel
getHidingModel()
protected void
hide()
Hides thehost
.protected boolean
isHidden()
Returnstrue
if thehost
is currently considered to be hidden.protected void
onHidingModelChange(javafx.collections.SetChangeListener.Change<? extends Node> change)
Called uponHidingModel
changes.protected void
show()
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:
true
if thehost
is currently hidden, otherwisefalse
.
-
doActivate
protected void doActivate()
- Overrides:
doActivate
in classAbstractBehavior
-
doDeactivate
protected void doDeactivate()
- Overrides:
doDeactivate
in classAbstractBehavior
-
getHidingModel
protected HidingModel getHidingModel()
- Returns:
- The
HidingModel
that is installed on theIViewer
of thehost
.
-
hide
protected void hide()
-
isHidden
protected boolean isHidden()
- Returns:
true
if thehost
is currently considered to be hidden, otherwisefalse
.
-
onHidingModelChange
protected void onHidingModelChange(javafx.collections.SetChangeListener.Change<? extends Node> change)
Called uponHidingModel
changes. Determines if thehost
is now hidden usingdetermineHiddenStatus()
and compares the result with the previous hidden status. If thehost
was 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()
-
-