Package org.eclipse.gef.mvc.fx.models
Class SnappingModel
java.lang.Object
org.eclipse.gef.mvc.fx.models.SnappingModel
The
SnappingModel
stores SnappingModel.SnappingLocation
s for which feedback
is generated by the SnappingBehavior.-
Property Summary
TypePropertyDescriptionjavafx.beans.property.ReadOnlyListProperty<SnappingModel.SnappingLocation>
A read-only property containing the currentSnappingModel.SnappingLocation
s.javafx.beans.property.ReadOnlyListProperty<org.eclipse.gef.mvc.fx.handlers.ISnapToStrategy>
A read-only property containing the currentISnapToStrategies
. -
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
ASnappingModel.SnappingLocation
combines anIContentPart
, a position coordinate in the scene coordinate system, and anOrientation
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Name of the property storing supported strategies.static final String
Name of thesnappingLocationsProperty()
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns aList
containing theSnappingModel.SnappingLocation
s currently stored in thisSnappingModel
.getSnappingLocationsFor
(IContentPart<? extends javafx.scene.Node> part) Returns aList
containing theSnappingModel.SnappingLocation
s that were derived from the givenIContentPart
.void
setSnappingLocations
(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>
A read-only property containing the currentSnappingModel.SnappingLocation
s.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.SnappingLocation
s. -
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 aList
containing theSnappingModel.SnappingLocation
s currently stored in thisSnappingModel
.- Returns:
- A
List
containing theSnappingModel.SnappingLocation
s currently stored in thisSnappingModel
.
-
getSnappingLocationsFor
public 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
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. -
snapToStrategiesProperty
public javafx.beans.property.ReadOnlyListProperty<org.eclipse.gef.mvc.fx.handlers.ISnapToStrategy> snapToStrategiesProperty()A read-only property containing the currentISnapToStrategies
.
-