public class SnappingBehavior extends AbstractBehavior
SnappingBehavior
is responsible for creating and removing
feedback and handles in response to SnappingModel
changes.active, adaptable
IAdaptable.Bound.Impl<T extends IAdaptable>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SNAPPING_FEEDBACK_PART_FACTORY
Defines the role for the
IFeedbackPartFactory that is used to
generate snap-to feedback. |
ACTIVE_PROPERTY
Constructor and Description |
---|
SnappingBehavior() |
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 IFeedbackPartFactory |
getFeedbackPartFactory(IViewer viewer)
Returns the
IFeedbackPartFactory for selection feedback. |
protected void |
onSnappingLocationsChanged(java.util.List<? extends SnappingModel.SnappingLocation> oldValue,
java.util.List<? extends SnappingModel.SnappingLocation> newValue)
Callback method that is called in response to
SnappingModel
changes. |
activate, activeProperty, adaptableProperty, addAnchoreds, addAnchoreds, addFeedback, addFeedback, addHandles, addHandles, clearFeedback, clearHandles, deactivate, getAdaptable, getFeedback, getFeedback, getFeedbackPartFactory, getFeedbackPerTargetSet, getHandlePartFactory, getHandlePartFactory, getHandles, getHandles, getHandlesPerTargetSet, getHost, hasFeedback, hasFeedback, hasHandles, hasHandles, isActive, removeAnchoreds, removeFeedback, removeFeedback, removeFeedback, removeHandles, removeHandles, removeHandles, setAdaptable, updateHandles, updateHandles
public static final java.lang.String SNAPPING_FEEDBACK_PART_FACTORY
IFeedbackPartFactory
that is used to
generate snap-to feedback.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 IFeedbackPartFactory getFeedbackPartFactory(IViewer viewer)
IFeedbackPartFactory
for selection feedback.getFeedbackPartFactory
in class AbstractBehavior
viewer
- The IViewer
for which to determine the
IFeedbackPartFactory
for this IBehavior
.IFeedbackPartFactory
for selection feedback.protected void onSnappingLocationsChanged(java.util.List<? extends SnappingModel.SnappingLocation> oldValue, java.util.List<? extends SnappingModel.SnappingLocation> newValue)
SnappingModel
changes.oldValue
- A List
containing the SnappingModel.SnappingLocation
s
previously stored in the SnappingModel
.newValue
- A List
containing the SnappingModel.SnappingLocation
s
currently stored in the SnappingModel
.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.