public abstract class AbstractHidingBehavior extends AbstractBehavior<javafx.scene.Node>
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.active, adaptable
IAdaptable.Bound.Impl<T extends IAdaptable>
ACTIVE_PROPERTY
Constructor and Description |
---|
AbstractHidingBehavior() |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
determineHiddenStatus()
Returns
true if the host is currently
hidden. |
protected void |
doActivate() |
protected void |
doDeactivate() |
protected HidingModel |
getHidingModel()
|
protected void |
hide()
Hides the
host . |
protected boolean |
isHidden()
Returns
true if the host is currently
considered to be hidden. |
protected void |
onHidingModelChange(javafx.collections.SetChangeListener.Change<? extends Node> change)
Called upon
HidingModel changes. |
protected void |
show()
Shows the
host . |
activate, activeProperty, adaptableProperty, addFeedback, addHandles, deactivate, getAdaptable, getFeedbackParts, getHandleParts, getHost, isActive, removeFeedback, removeHandles, setAdaptable, switchAdaptableScopes, updateHandles
protected abstract boolean determineHiddenStatus()
true
if the host
is currently
hidden, otherwise false
.protected void doActivate()
doActivate
in class AbstractBehavior<javafx.scene.Node>
protected void doDeactivate()
doDeactivate
in class AbstractBehavior<javafx.scene.Node>
protected HidingModel getHidingModel()
HidingModel
that is installed on the IViewer
of the host
.protected void hide()
protected boolean isHidden()
true
if the host
is currently
considered to be hidden, otherwise false
.protected void onHidingModelChange(javafx.collections.SetChangeListener.Change<? extends Node> change)
HidingModel
changes. Determines if the
host
is now hidden using
determineHiddenStatus()
and compares the result with the
previous hidden status. If the host
was previously
hidden and is not hidden anymore, show()
is called. Otherwise,
hide()
is called.change
- The change event of the HidingModel
.protected void show()
Copyright (c) 2014 itemis AG and others. All rights reserved.