Package 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 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
Description
`BoundsSnappingLocationProvider()`

## Method Summary

Modifier and Type
Method
Description
`List<SnappingModel.SnappingLocation>`
`getHorizontalSnappingLocations(IContentPart<? extends javafx.scene.Node> part)`
Returns the horizontal `SnappingModel.SnappingLocation`s for the given `IContentPart`.
`protected 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.
`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`

## Constructor Details

### BoundsSnappingLocationProvider

public BoundsSnappingLocationProvider()

## Method Details

### getHorizontalSnappingLocations

public 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 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 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`.