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.SnappingLocations for an IContentPart.-
Method Summary
Modifier and TypeMethodDescriptiongetHorizontalSnappingLocations(IContentPart<? extends javafx.scene.Node> part) Returns the horizontalSnappingModel.SnappingLocations for the givenIContentPart.getVerticalSnappingLocations(IContentPart<? extends javafx.scene.Node> part) Returns the verticalSnappingModel.SnappingLocations for the givenIContentPart.static ISnappingLocationProviderunion(List<ISnappingLocationProvider> providers) Combines the givenISnappingLocationProviders by wrapping them in a newISnappingLocationProviderthat returns a combination of allSnappingModel.SnappingLocations that are returned by the individual providers.
-
Method Details
-
union
Combines the givenISnappingLocationProviders by wrapping them in a newISnappingLocationProviderthat returns a combination of allSnappingModel.SnappingLocations that are returned by the individual providers.- Parameters:
providers- TheISnappingLocationProviders to combine.- Returns:
- A new
ISnappingLocationProviderthat represents the combination of the given providers.
-
getHorizontalSnappingLocations
List<SnappingModel.SnappingLocation> getHorizontalSnappingLocations(IContentPart<? extends javafx.scene.Node> part) Returns the horizontalSnappingModel.SnappingLocations for the givenIContentPart.- Parameters:
part- TheIContentPartfor which to compute theSnappingModel.SnappingLocations.- Returns:
- A
Listof all horizontalSnappingModel.SnappingLocations for the givenIContentPart.
-
getVerticalSnappingLocations
List<SnappingModel.SnappingLocation> getVerticalSnappingLocations(IContentPart<? extends javafx.scene.Node> part) Returns the verticalSnappingModel.SnappingLocations for the givenIContentPart.- Parameters:
part- TheIContentPartfor which to compute theSnappingModel.SnappingLocations.- Returns:
- A
Listof all verticalSnappingModel.SnappingLocations for the givenIContentPart.
-