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.Object
TheSnappingModel
storesSnappingModel.SnappingLocation
s for which feedback is generated by the SnappingBehavior.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SnappingModel.SnappingLocation
ASnappingModel.SnappingLocation
combines anIContentPart
, a position coordinate in the scene coordinate system, and anOrientation
.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SNAP_TO_STRATEGIES_PROPERTY
Name of the property storing supported strategies.static java.lang.String
SNAPPING_LOCATIONS_PROPERTY
Name 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 aList
containing theSnappingModel.SnappingLocation
s currently stored in thisSnappingModel
.java.util.List<SnappingModel.SnappingLocation>
getSnappingLocationsFor(IContentPart<? extends javafx.scene.Node> part)
Returns aList
containing theSnappingModel.SnappingLocation
s that were derived from the givenIContentPart
.void
setSnappingLocations(java.util.List<? extends SnappingModel.SnappingLocation> snappingLocations)
Replaces theSnappingModel.SnappingLocation
s that are stored in thisSnappingModel
by the givenList
ofSnappingModel.SnappingLocation
s.javafx.beans.property.ReadOnlyListProperty<SnappingModel.SnappingLocation>
snappingLocationsProperty()
A read-only property containing the currentSnappingModel.SnappingLocation
s.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 aList
containing theSnappingModel.SnappingLocation
s currently stored in thisSnappingModel
.- Returns:
- A
List
containing theSnappingModel.SnappingLocation
s currently stored in thisSnappingModel
.
-
getSnappingLocationsFor
public java.util.List<SnappingModel.SnappingLocation> getSnappingLocationsFor(IContentPart<? extends javafx.scene.Node> part)
Returns aList
containing theSnappingModel.SnappingLocation
s that were derived from the givenIContentPart
.- Parameters:
part
- TheIContentPart
for which to return the derivedSnappingModel.SnappingLocation
s.- Returns:
- A
List
containing theSnappingModel.SnappingLocation
s that were derived from the givenIContentPart
.
-
setSnappingLocations
public void setSnappingLocations(java.util.List<? extends SnappingModel.SnappingLocation> snappingLocations)
Replaces theSnappingModel.SnappingLocation
s that are stored in thisSnappingModel
by the givenList
ofSnappingModel.SnappingLocation
s.- Parameters:
snappingLocations
- AList
containing the newSnappingModel.SnappingLocation
s to store in thisSnappingModel
.
-
snappingLocationsProperty
public javafx.beans.property.ReadOnlyListProperty<SnappingModel.SnappingLocation> snappingLocationsProperty()
A read-only property containing the currentSnappingModel.SnappingLocation
s.- 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
.
-
-