Package org.eclipse.gef.mvc.fx.models

## Class SnappingModel.SnappingLocation

- java.lang.Object
- - org.eclipse.gef.mvc.fx.models.SnappingModel.SnappingLocation

Enclosing class:
  SnappingModel

    public static class SnappingModel.SnappingLocation
    extends java.lang.Object

A `SnappingModel.SnappingLocation` combines an `IContentPart`, a position coordinate in the scene coordinate system, and an `Orientation`. The position coordinate is evaluated in dependence of the location's `Orientation`. For horizontal locations, the position coordinate is a y-coordinate. For vertical locations, the position coordinate is an x-coordinate.

### Constructor Summary

Constructors
`SnappingLocation​(IContentPart<? extends javafx.scene.Node> part, javafx.geometry.Orientation orientation, double positionInScene)` Constructs a new `SnappingModel.SnappingLocation`.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals​(java.lang.Object obj)`
`SnappingModel.SnappingLocation` `getCopy()` Returns a copy of this `SnappingModel.SnappingLocation`.
`javafx.geometry.Orientation` `getOrientation()` Returns the `Orientation` of this `SnappingModel.SnappingLocation`.
`IContentPart<? extends javafx.scene.Node>` `getPart()` Returns the `IContentPart` from which this `SnappingModel.SnappingLocation` was derived.
`double` `getPositionInScene()` Returns the position coordinate of this `SnappingModel.SnappingLocation`.
`int` `hashCode()`
`void` `setOrientation​(javafx.geometry.Orientation orientation)` Sets the `Orientation` of this `SnappingModel.SnappingLocation` to the given value.
`void` `setPart​(IContentPart<? extends javafx.scene.Node> part)` Sets the `IContentPart` of this `SnappingModel.SnappingLocation` to the given value.
`void` `setPositionInScene​(double positionInScene)` Sets the position coordinate of this `SnappingModel.SnappingLocation` to the given value.
`java.lang.String` `toString()`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### SnappingLocation

    public SnappingLocation​(IContentPart<? extends javafx.scene.Node> part,
                            javafx.geometry.Orientation orientation,
                            double positionInScene)

Constructs a new `SnappingModel.SnappingLocation`.

Parameters:
  `part` - The `IContentPart` from which this location is derived.
  `orientation` - The `Orientation` for this `SnappingModel.SnappingLocation`.
  `positionInScene` - The position coordinate for this `SnappingModel.SnappingLocation`. The coordinate is either the x- or y-coordinate, depending on the `Orientation`. For horizontal locations, the y-coordinate needs to be specified. For vertical locations, the x-coordinate needs to be specified.

### Method Detail

#### equals

    public boolean equals​(java.lang.Object obj)

Overrides:
  `equals` in class `java.lang.Object`

#### getCopy

    public SnappingModel.SnappingLocation getCopy()

Returns a copy of this `SnappingModel.SnappingLocation`.

Returns:
  A copy of this `SnappingModel.SnappingLocation`.

#### getOrientation

    public javafx.geometry.Orientation getOrientation()

Returns the `Orientation` of this `SnappingModel.SnappingLocation`.

Returns:
  The `Orientation` of this `SnappingModel.SnappingLocation`.

#### getPart

    public IContentPart<? extends javafx.scene.Node> getPart()

Returns the `IContentPart` from which this `SnappingModel.SnappingLocation` was derived.

Returns:
  The `IContentPart` from which this `SnappingModel.SnappingLocation` was derived.

#### getPositionInScene

    public double getPositionInScene()

Returns the position coordinate of this `SnappingModel.SnappingLocation`.

Returns:
  The position coordinate of this `SnappingModel.SnappingLocation`.

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

#### setOrientation

    public void setOrientation​(javafx.geometry.Orientation orientation)

Sets the `Orientation` of this `SnappingModel.SnappingLocation` to the given value.

Parameters:
  `orientation` - The new `Orientation` for this `SnappingModel.SnappingLocation`.

#### setPart

    public void setPart​(IContentPart<? extends javafx.scene.Node> part)

Sets the `IContentPart` of this `SnappingModel.SnappingLocation` to the given value.

Parameters:
  `part` - The new `IContentPart` for this `SnappingModel.SnappingLocation`.

#### setPositionInScene

    public void setPositionInScene​(double positionInScene)

Sets the position coordinate of this `SnappingModel.SnappingLocation` to the given value.

Parameters:
  `positionInScene` - The new position coordinate for this `SnappingModel.SnappingLocation`.

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`