Package org.eclipse.gef.mvc.fx.behaviors
Class SnappingBehavior
java.lang.Object
org.eclipse.gef.mvc.fx.behaviors.AbstractBehavior
org.eclipse.gef.mvc.fx.behaviors.SnappingBehavior
- All Implemented Interfaces:
IActivatable,IAdaptable.Bound<IVisualPart<? extends javafx.scene.Node>>,IBehavior
The
SnappingBehavior is responsible for creating and removing
feedback and handles in response to SnappingModel 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
FieldsModifier and TypeFieldDescriptionstatic final StringDefines the role for theIFeedbackPartFactorythat is used to generate snap-to feedback.Fields inherited from interface org.eclipse.gef.common.activate.IActivatable
ACTIVE_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidPostAbstractBehavior.activate()hook that may be overwritten to e.g. register listeners.protected voidPreAbstractBehavior.deactivate()hook that may be overwritten to e.g. unregister listeners.protected IFeedbackPartFactorygetFeedbackPartFactory(IViewer viewer) Returns theIFeedbackPartFactoryfor selection feedback.protected voidonSnappingLocationsChanged(List<? extends SnappingModel.SnappingLocation> oldValue, List<? extends SnappingModel.SnappingLocation> newValue) Callback method that is called in response toSnappingModelchanges.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, getHandlePartFactory, getHandles, getHandles, getHandlesPerTargetSet, getHost, hasFeedback, hasFeedback, hasHandles, hasHandles, isActive, removeAnchoreds, removeFeedback, removeFeedback, removeFeedback, removeHandles, removeHandles, removeHandles, setAdaptable, updateHandles, updateHandles
-
Field Details
-
SNAPPING_FEEDBACK_PART_FACTORY
Defines the role for theIFeedbackPartFactorythat is used to generate snap-to feedback.- See Also:
-
-
Constructor Details
-
SnappingBehavior
public SnappingBehavior()
-
-
Method Details
-
doActivate
protected void doActivate()Description copied from class:AbstractBehaviorPostAbstractBehavior.activate()hook that may be overwritten to e.g. register listeners.- Overrides:
doActivatein classAbstractBehavior
-
doDeactivate
protected void doDeactivate()Description copied from class:AbstractBehaviorPreAbstractBehavior.deactivate()hook that may be overwritten to e.g. unregister listeners.- Overrides:
doDeactivatein classAbstractBehavior
-
getFeedbackPartFactory
Returns theIFeedbackPartFactoryfor selection feedback.- Overrides:
getFeedbackPartFactoryin classAbstractBehavior- Parameters:
viewer- TheIViewerfor which to determine theIFeedbackPartFactoryfor thisIBehavior.- Returns:
- The
IFeedbackPartFactoryfor selection feedback.
-
onSnappingLocationsChanged
protected void onSnappingLocationsChanged(List<? extends SnappingModel.SnappingLocation> oldValue, List<? extends SnappingModel.SnappingLocation> newValue) Callback method that is called in response toSnappingModelchanges.- Parameters:
oldValue- AListcontaining theSnappingModel.SnappingLocations previously stored in theSnappingModel.newValue- AListcontaining theSnappingModel.SnappingLocations currently stored in theSnappingModel.
-