Package org.eclipse.gef.mvc.fx.models
Class SnappingModel
- java.lang.Object
-
- org.eclipse.gef.mvc.fx.models.SnappingModel
-
public class SnappingModel extends java.lang.ObjectTheSnappingModelstoresSnappingModel.SnappingLocations for which feedback is generated by the SnappingBehavior.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSnappingModel.SnappingLocationASnappingModel.SnappingLocationcombines anIContentPart, a position coordinate in the scene coordinate system, and anOrientation.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSNAP_TO_STRATEGIES_PROPERTYName of the property storing supported strategies.static java.lang.StringSNAPPING_LOCATIONS_PROPERTYName of thesnappingLocationsProperty().
-
Constructor Summary
Constructors Constructor Description SnappingModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<SnappingModel.SnappingLocation>getSnappingLocations()Returns aListcontaining theSnappingModel.SnappingLocations currently stored in thisSnappingModel.java.util.List<SnappingModel.SnappingLocation>getSnappingLocationsFor(IContentPart<? extends javafx.scene.Node> part)Returns aListcontaining theSnappingModel.SnappingLocations that were derived from the givenIContentPart.voidsetSnappingLocations(java.util.List<? extends SnappingModel.SnappingLocation> snappingLocations)Replaces theSnappingModel.SnappingLocations that are stored in thisSnappingModelby the givenListofSnappingModel.SnappingLocations.javafx.beans.property.ReadOnlyListProperty<SnappingModel.SnappingLocation>snappingLocationsProperty()A read-only property containing the currentSnappingModel.SnappingLocations.javafx.beans.property.ReadOnlyListProperty<org.eclipse.gef.mvc.fx.handlers.ISnapToStrategy>snapToStrategiesProperty()A read-only property containing the currentISnapToStrategies.
-
-
-
Field Detail
-
SNAPPING_LOCATIONS_PROPERTY
public static final java.lang.String SNAPPING_LOCATIONS_PROPERTY
Name of thesnappingLocationsProperty().- See Also:
- Constant Field Values
-
SNAP_TO_STRATEGIES_PROPERTY
public static final java.lang.String SNAP_TO_STRATEGIES_PROPERTY
Name of the property storing supported strategies.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSnappingLocations
public java.util.List<SnappingModel.SnappingLocation> getSnappingLocations()
Returns aListcontaining theSnappingModel.SnappingLocations currently stored in thisSnappingModel.- Returns:
- A
Listcontaining theSnappingModel.SnappingLocations currently stored in thisSnappingModel.
-
getSnappingLocationsFor
public java.util.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
public void setSnappingLocations(java.util.List<? extends SnappingModel.SnappingLocation> snappingLocations)
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.- Returns:
- A read-only list property named
SNAPPING_LOCATIONS_PROPERTY.
-
snapToStrategiesProperty
public javafx.beans.property.ReadOnlyListProperty<org.eclipse.gef.mvc.fx.handlers.ISnapToStrategy> snapToStrategiesProperty()
A read-only property containing the currentISnapToStrategies.- Returns:
- A read-only list property named
SNAP_TO_STRATEGIES_PROPERTY.
-
-