Package org.eclipse.gef.mvc.fx.models
Class SnappingModel
java.lang.Object
org.eclipse.gef.mvc.fx.models.SnappingModel
The
SnappingModel stores SnappingModel.SnappingLocations for which feedback
is generated by the SnappingBehavior.-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyListProperty<SnappingModel.SnappingLocation>A read-only property containing the currentSnappingModel.SnappingLocations.javafx.beans.property.ReadOnlyListProperty<org.eclipse.gef.mvc.fx.handlers.ISnapToStrategy>A read-only property containing the currentISnapToStrategies. -
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classASnappingModel.SnappingLocationcombines anIContentPart, a position coordinate in the scene coordinate system, and anOrientation. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of the property storing supported strategies.static final StringName of thesnappingLocationsProperty(). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns aListcontaining theSnappingModel.SnappingLocations currently stored in thisSnappingModel.getSnappingLocationsFor(IContentPart<? extends javafx.scene.Node> part) Returns aListcontaining theSnappingModel.SnappingLocations that were derived from the givenIContentPart.voidsetSnappingLocations(List<? extends SnappingModel.SnappingLocation> snappingLocations) Replaces theSnappingModel.SnappingLocations that are stored in thisSnappingModelby the givenListofSnappingModel.SnappingLocations.javafx.beans.property.ReadOnlyListProperty<SnappingModel.SnappingLocation>A read-only property containing the currentSnappingModel.SnappingLocations.javafx.beans.property.ReadOnlyListProperty<org.eclipse.gef.mvc.fx.handlers.ISnapToStrategy>A read-only property containing the currentISnapToStrategies.
-
Property Details
-
snappingLocations
public javafx.beans.property.ReadOnlyListProperty<SnappingModel.SnappingLocation> snappingLocationsPropertyA read-only property containing the currentSnappingModel.SnappingLocations. -
snapToStrategies
public javafx.beans.property.ReadOnlyListProperty<org.eclipse.gef.mvc.fx.handlers.ISnapToStrategy> snapToStrategiesPropertyA read-only property containing the currentISnapToStrategies.
-
-
Field Details
-
SNAPPING_LOCATIONS_PROPERTY
Name of thesnappingLocationsProperty().- See Also:
-
SNAP_TO_STRATEGIES_PROPERTY
Name of the property storing supported strategies.- See Also:
-
-
Constructor Details
-
SnappingModel
public SnappingModel()
-
-
Method Details
-
getSnappingLocations
Returns aListcontaining theSnappingModel.SnappingLocations currently stored in thisSnappingModel.- Returns:
- A
Listcontaining theSnappingModel.SnappingLocations currently stored in thisSnappingModel.
-
getSnappingLocationsFor
public List<SnappingModel.SnappingLocation> getSnappingLocationsFor(IContentPart<? extends javafx.scene.Node> part) Returns aListcontaining theSnappingModel.SnappingLocations that were derived from the givenIContentPart.- Parameters:
part- TheIContentPartfor which to return the derivedSnappingModel.SnappingLocations.- Returns:
- A
Listcontaining theSnappingModel.SnappingLocations that were derived from the givenIContentPart.
-
setSnappingLocations
Replaces theSnappingModel.SnappingLocations that are stored in thisSnappingModelby the givenListofSnappingModel.SnappingLocations.- Parameters:
snappingLocations- AListcontaining the newSnappingModel.SnappingLocations to store in thisSnappingModel.
-
snappingLocationsProperty
public javafx.beans.property.ReadOnlyListProperty<SnappingModel.SnappingLocation> snappingLocationsProperty()A read-only property containing the currentSnappingModel.SnappingLocations. -
snapToStrategiesProperty
public javafx.beans.property.ReadOnlyListProperty<org.eclipse.gef.mvc.fx.handlers.ISnapToStrategy> snapToStrategiesProperty()A read-only property containing the currentISnapToStrategies.
-