Package org.eclipse.gef.mvc.fx.behaviors
Class HoverIntentBehavior
- java.lang.Object
-
- org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior
-
- org.eclipse.gef.mvc.fx.behaviors.HoverIntentBehavior
-
- All Implemented Interfaces:
IActivatable
,IAdaptable.Bound<IVisualPart<? extends javafx.scene.Node>>
,IBehavior
public class HoverIntentBehavior extends AbstractBehavior
TheHoverIntentBehavior
complements theHoverBehavior
w.r.t. feedback and handle generation in response toHoverModel
changes. WhileHoverBehavior
is responsible for generating feedback and handles for theHoverModel.hoverProperty()
, theHoverIntentBehavior
is responsible for generating feedback and handles for theHoverModel.hoverIntentProperty()
.
-
-
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 Modifier and Type Field Description static java.lang.String
HOVER_INTENT_FEEDBACK_PART_FACTORY
The adapter role for theIFeedbackPartFactory
that is used to generate hover feedback parts.static java.lang.String
HOVER_INTENT_HANDLE_PART_FACTORY
The adapter role for theIHandlePartFactory
that is used to generate hover handle parts.-
Fields inherited from interface org.eclipse.gef.common.activate.IActivatable
ACTIVE_PROPERTY
-
-
Constructor Summary
Constructors Constructor Description HoverIntentBehavior()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doActivate()
PostAbstractBehavior.activate()
hook that may be overwritten to e.g. register listeners.protected void
doDeactivate()
PreAbstractBehavior.deactivate()
hook that may be overwritten to e.g. unregister listeners.protected IFeedbackPartFactory
getFeedbackPartFactory(IViewer viewer)
Returns theIFeedbackPartFactory
that should be used for feedback creation.protected IHandlePartFactory
getHandlePartFactory(IViewer viewer)
Returns theIHandlePartFactory
that should be used for handle creation.protected HoverModel
getHoverModel()
Returns theHoverModel
in the context of thehost
.protected void
onHoverIntentChange(IContentPart<? extends javafx.scene.Node> oldHoverIntent, IContentPart<? extends javafx.scene.Node> newHoverIntent)
Callback method that is invoked when theHoverModel.hoverIntentProperty()
changes.-
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, getFeedbackPerTargetSet, getHandlePartFactory, getHandles, getHandles, getHandlesPerTargetSet, getHost, hasFeedback, hasFeedback, hasHandles, hasHandles, isActive, removeAnchoreds, removeFeedback, removeFeedback, removeFeedback, removeHandles, removeHandles, removeHandles, setAdaptable, updateHandles, updateHandles
-
-
-
-
Field Detail
-
HOVER_INTENT_FEEDBACK_PART_FACTORY
public static final java.lang.String HOVER_INTENT_FEEDBACK_PART_FACTORY
The adapter role for theIFeedbackPartFactory
that is used to generate hover feedback parts.- See Also:
- Constant Field Values
-
HOVER_INTENT_HANDLE_PART_FACTORY
public static final java.lang.String HOVER_INTENT_HANDLE_PART_FACTORY
The adapter role for theIHandlePartFactory
that is used to generate hover handle parts.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
getFeedbackPartFactory
protected IFeedbackPartFactory getFeedbackPartFactory(IViewer viewer)
Description copied from class:AbstractBehavior
Returns theIFeedbackPartFactory
that should be used for feedback creation.- Overrides:
getFeedbackPartFactory
in classAbstractBehavior
- Parameters:
viewer
- TheIViewer
for which to determine theIFeedbackPartFactory
for thisIBehavior
.- Returns:
- The
IFeedbackPartFactory
that should be used for feedback creation.
-
getHandlePartFactory
protected IHandlePartFactory getHandlePartFactory(IViewer viewer)
Description copied from class:AbstractBehavior
Returns theIHandlePartFactory
that should be used for handle creation.- Overrides:
getHandlePartFactory
in classAbstractBehavior
- Parameters:
viewer
- TheIViewer
for which to determine theIHandlePartFactory
for thisIBehavior
.- Returns:
- The
IHandlePartFactory
that should be used for feedback creation.
-
getHoverModel
protected HoverModel getHoverModel()
Returns theHoverModel
in the context of thehost
.- Returns:
- The
HoverModel
in the context of thehost
.
-
onHoverIntentChange
protected void onHoverIntentChange(IContentPart<? extends javafx.scene.Node> oldHoverIntent, IContentPart<? extends javafx.scene.Node> newHoverIntent)
Callback method that is invoked when theHoverModel.hoverIntentProperty()
changes. Triggers generation/removal of feedback and handles.- Parameters:
oldHoverIntent
- The previous hover intentIContentPart
.newHoverIntent
- The new hover intentIContentPart
.
-
-