public class RevealPrimarySelectionBehavior extends AbstractBehavior
RevealPrimarySelectionBehavior
observes the
SelectionModel
that is registered at the IViewer
of its
host
and
reveals
the
primary selection, i.e. the first element of the
SelectionModel.selectionUnmodifiableProperty()
when the selection
changes.active, adaptable
IAdaptable.Bound.Impl<T extends IAdaptable>
ACTIVE_PROPERTY
Constructor and Description |
---|
RevealPrimarySelectionBehavior() |
Modifier and Type | Method and Description |
---|---|
protected void |
doActivate()
Post
AbstractBehavior.activate() hook that may be overwritten to e.g. register
listeners. |
protected void |
doDeactivate()
Pre
AbstractBehavior.deactivate() hook that may be overwritten to e.g. unregister
listeners. |
protected void |
onPrimarySelectionChanged(IContentPart<? extends javafx.scene.Node> previousPrimarySelection,
IContentPart<? extends javafx.scene.Node> currentPrimarySelection)
This method is called when the primary selection (i.e. the first element
of the
SelectionModel.selectionUnmodifiableProperty() ) is
changed. |
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
protected void doActivate()
AbstractBehavior
AbstractBehavior.activate()
hook that may be overwritten to e.g. register
listeners.doActivate
in class AbstractBehavior
protected void doDeactivate()
AbstractBehavior
AbstractBehavior.deactivate()
hook that may be overwritten to e.g. unregister
listeners.doDeactivate
in class AbstractBehavior
protected void onPrimarySelectionChanged(IContentPart<? extends javafx.scene.Node> previousPrimarySelection, IContentPart<? extends javafx.scene.Node> currentPrimarySelection)
SelectionModel.selectionUnmodifiableProperty()
) is
changed.previousPrimarySelection
- The previous primary selection, may be null
in
case there was no previous selection.currentPrimarySelection
- The current primary selection, may be null
in
case there is no selection.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.