public class SnappingBehavior extends AbstractBehavior
SnappingBehavior is responsible for creating and removing
feedback and handles in response to SnappingModel changes.active, adaptableIAdaptable.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, updateHandlespublic static final java.lang.String SNAPPING_FEEDBACK_PART_FACTORY
IFeedbackPartFactory that is used to
generate snap-to feedback.protected void doActivate()
AbstractBehaviorAbstractBehavior.activate() hook that may be overwritten to e.g. register
listeners.doActivate in class AbstractBehaviorprotected void doDeactivate()
AbstractBehaviorAbstractBehavior.deactivate() hook that may be overwritten to e.g. unregister
listeners.doDeactivate in class AbstractBehaviorprotected IFeedbackPartFactory getFeedbackPartFactory(IViewer viewer)
IFeedbackPartFactory for selection feedback.getFeedbackPartFactory in class AbstractBehaviorviewer - 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.SnappingLocations
previously stored in the SnappingModel.newValue - A List containing the SnappingModel.SnappingLocations
currently stored in the SnappingModel.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.