Package org.eclipse.gef.mvc.fx.providers

# Class CenterSnappingLocationProvider

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

All Implemented Interfaces:
  `ISnappingLocationProvider`

public class CenterSnappingLocationProvider extends BoundsSnappingLocationProvider
The `CenterSnappingLocationProvider` is a specialization of `BoundsSnappingLocationProvider` that returns the center of the bounds as the only `SnappingModel.SnappingLocation`s.

## Constructor Summary

Constructors
Constructor
Description
`CenterSnappingLocationProvider()`

## 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`.
`List<SnappingModel.SnappingLocation>`
`getVerticalSnappingLocations(IContentPart<? extends javafx.scene.Node> part)`
Returns the vertical `SnappingModel.SnappingLocation`s for the given `IContentPart`.

### Methods inherited from class org.eclipse.gef.mvc.fx.providers.BoundsSnappingLocationProvider

`getSnappingLocations`

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

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

## Constructor Details

### CenterSnappingLocationProvider

public CenterSnappingLocationProvider()

## 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`
Overrides:
  `getHorizontalSnappingLocations` in class `BoundsSnappingLocationProvider`
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`.

### 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`
Overrides:
  `getVerticalSnappingLocations` in class `BoundsSnappingLocationProvider`
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`.