org.eclipse.gef.mvc.fx.providers

## Class BoundsSnappingLocationProvider

- java.lang.Object
- - org.eclipse.gef.mvc.fx.providers.BoundsSnappingLocationProvider

All Implemented Interfaces:
  ISnappingLocationProvider

Direct Known Subclasses:
  CenterSnappingLocationProvider, TopLeftSnappingLocationProvider

    public class BoundsSnappingLocationProvider
    extends java.lang.Object
    implements ISnappingLocationProvider

The `BoundsSnappingLocationProvider` determines `SnappingModel.SnappingLocation`s along the bounds of the individual `IContentPart`s that contribute to snapping. By default, only the minimum and maximum locations within the bounds are used for snapping.

### Constructor Summary

Constructors
Constructor and Description
`BoundsSnappingLocationProvider()`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.util.List<SnappingModel.SnappingLocation>` `getHorizontalSnappingLocations(IContentPart<? extends javafx.scene.Node> part)` Returns the horizontal `SnappingModel.SnappingLocation`s for the given `IContentPart`.
`protected java.util.List<SnappingModel.SnappingLocation>` `getSnappingLocations(IContentPart<? extends javafx.scene.Node> part, javafx.geometry.Orientation orient, double... ratios)` Iterates over the given ratios and interpolates positions within the bounds for the individual ratios.
`java.util.List<SnappingModel.SnappingLocation>` `getVerticalSnappingLocations(IContentPart<? extends javafx.scene.Node> part)` Returns the vertical `SnappingModel.SnappingLocation`s for the given `IContentPart`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.eclipse.gef.mvc.fx.providers.ISnappingLocationProvider

`union`

### Constructor Detail

#### BoundsSnappingLocationProvider

    public BoundsSnappingLocationProvider()

### Method Detail

#### getHorizontalSnappingLocations

    public java.util.List<SnappingModel.SnappingLocation> getHorizontalSnappingLocations(IContentPart<? extends javafx.scene.Node> part)

Description copied from interface: `ISnappingLocationProvider`
Returns the horizontal `SnappingModel.SnappingLocation`s for the given `IContentPart`.

Specified by:
  `getHorizontalSnappingLocations` in interface `ISnappingLocationProvider`
Parameters:
  `part` - The `IContentPart` for which to compute the `SnappingModel.SnappingLocation`s.
Returns:
  A `List` of all horizontal `SnappingModel.SnappingLocation`s for the given `IContentPart`.

#### getSnappingLocations

    protected java.util.List<SnappingModel.SnappingLocation> getSnappingLocations(IContentPart<? extends javafx.scene.Node> part,
                                                                                  javafx.geometry.Orientation orient,
                                                                                  double... ratios)

Iterates over the given ratios and interpolates positions within the bounds for the individual ratios.

Parameters:
  `part` - The `IContentPart` for which `SnappingModel.SnappingLocation`s are computed.
  `orient` - The `Orientation` for the `SnappingModel.SnappingLocation`s.
  `ratios` - The ratios at which snapping locations should be placed along the bounds.
Returns:
  The `SnappingModel.SnappingLocation`s for the given `IContentPart` according to its bounds and the given ratios.

#### getVerticalSnappingLocations

    public java.util.List<SnappingModel.SnappingLocation> getVerticalSnappingLocations(IContentPart<? extends javafx.scene.Node> part)

Description copied from interface: `ISnappingLocationProvider`
Returns the vertical `SnappingModel.SnappingLocation`s for the given `IContentPart`.

Specified by:
  `getVerticalSnappingLocations` in interface `ISnappingLocationProvider`
Parameters:
  `part` - The `IContentPart` for which to compute the `SnappingModel.SnappingLocation`s.
Returns:
  A `List` of all vertical `SnappingModel.SnappingLocation`s for the given `IContentPart`.