Package org.eclipse.gef.mvc.fx.providers
Interface ISnappingLocationProvider
- All Known Implementing Classes:
BoundsSnappingLocationProvider
,CenterSnappingLocationProvider
,ConnectionSnappingLocationProvider
,TopLeftSnappingLocationProvider
public interface ISnappingLocationProvider
The
ISnappingLocationProvider
is used to determine
SnappingModel.SnappingLocation
s for an IContentPart
.-
Method Summary
Modifier and TypeMethodDescriptiongetHorizontalSnappingLocations
(IContentPart<? extends javafx.scene.Node> part) Returns the horizontalSnappingModel.SnappingLocation
s for the givenIContentPart
.getVerticalSnappingLocations
(IContentPart<? extends javafx.scene.Node> part) Returns the verticalSnappingModel.SnappingLocation
s for the givenIContentPart
.static ISnappingLocationProvider
union
(List<ISnappingLocationProvider> providers) Combines the givenISnappingLocationProvider
s by wrapping them in a newISnappingLocationProvider
that returns a combination of allSnappingModel.SnappingLocation
s that are returned by the individual providers.
-
Method Details
-
union
Combines the givenISnappingLocationProvider
s by wrapping them in a newISnappingLocationProvider
that returns a combination of allSnappingModel.SnappingLocation
s that are returned by the individual providers.- Parameters:
providers
- TheISnappingLocationProvider
s to combine.- Returns:
- A new
ISnappingLocationProvider
that represents the combination of the given providers.
-
getHorizontalSnappingLocations
List<SnappingModel.SnappingLocation> getHorizontalSnappingLocations(IContentPart<? extends javafx.scene.Node> part) Returns the horizontalSnappingModel.SnappingLocation
s for the givenIContentPart
.- Parameters:
part
- TheIContentPart
for which to compute theSnappingModel.SnappingLocation
s.- Returns:
- A
List
of all horizontalSnappingModel.SnappingLocation
s for the givenIContentPart
.
-
getVerticalSnappingLocations
List<SnappingModel.SnappingLocation> getVerticalSnappingLocations(IContentPart<? extends javafx.scene.Node> part) Returns the verticalSnappingModel.SnappingLocation
s for the givenIContentPart
.- Parameters:
part
- TheIContentPart
for which to compute theSnappingModel.SnappingLocation
s.- Returns:
- A
List
of all verticalSnappingModel.SnappingLocation
s for the givenIContentPart
.
-