Package org.eclipse.gef.mvc.fx.behaviors
Class RevealPrimarySelectionBehavior
java.lang.Object
org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior
org.eclipse.gef.mvc.fx.behaviors.RevealPrimarySelectionBehavior
- All Implemented Interfaces:
IActivatable
,IAdaptable.Bound<IVisualPart<? extends Node>>
,IBehavior
The
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.-
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 void
PostAbstractBehavior.activate()
hook that may be overwritten to e.g. register listeners.protected void
PreAbstractBehavior.deactivate()
hook that may be overwritten to e.g. unregister listeners.protected void
onPrimarySelectionChanged
(IContentPart<? extends Node> previousPrimarySelection, IContentPart<? extends Node> currentPrimarySelection) This method is called when the primary selection (i.e. the first element of theSelectionModel.selectionUnmodifiableProperty()
) is changed.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
-
RevealPrimarySelectionBehavior
public RevealPrimarySelectionBehavior()
-
-
Method Details
-
doActivate
protected void doActivate()Description copied from class:AbstractBehavior
PostAbstractBehavior.activate()
hook that may be overwritten to e.g. register listeners.- Overrides:
doActivate
in classAbstractBehavior
-
doDeactivate
protected void doDeactivate()Description copied from class:AbstractBehavior
PreAbstractBehavior.deactivate()
hook that may be overwritten to e.g. unregister listeners.- Overrides:
doDeactivate
in classAbstractBehavior
-
onPrimarySelectionChanged
protected void onPrimarySelectionChanged(IContentPart<? extends Node> previousPrimarySelection, IContentPart<? extends Node> currentPrimarySelection) This method is called when the primary selection (i.e. the first element of theSelectionModel.selectionUnmodifiableProperty()
) is changed.- Parameters:
previousPrimarySelection
- The previous primary selection, may benull
in case there was no previous selection.currentPrimarySelection
- The current primary selection, may benull
in case there is no selection.
-