public static class SnappingModel.SnappingLocation extends Object
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 and Description |
|---|
SnappingLocation(IContentPart<? extends Node> part,
Orientation orientation,
double positionInScene)
Constructs a new
SnappingModel.SnappingLocation. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
SnappingModel.SnappingLocation |
getCopy()
Returns a copy of this
SnappingModel.SnappingLocation. |
Orientation |
getOrientation()
Returns the
Orientation of this SnappingModel.SnappingLocation. |
IContentPart<? extends 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(Orientation orientation)
Sets the
Orientation of this SnappingModel.SnappingLocation to the
given value. |
void |
setPart(IContentPart<? extends 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. |
String |
toString() |
public SnappingLocation(IContentPart<? extends Node> part, Orientation orientation, double positionInScene)
SnappingModel.SnappingLocation.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.public SnappingModel.SnappingLocation getCopy()
SnappingModel.SnappingLocation.SnappingModel.SnappingLocation.public Orientation getOrientation()
Orientation of this SnappingModel.SnappingLocation.Orientation of this SnappingModel.SnappingLocation.public IContentPart<? extends Node> getPart()
IContentPart from which this
SnappingModel.SnappingLocation was derived.IContentPart from which this
SnappingModel.SnappingLocation was derived.public double getPositionInScene()
SnappingModel.SnappingLocation.SnappingModel.SnappingLocation.public void setOrientation(Orientation orientation)
Orientation of this SnappingModel.SnappingLocation to the
given value.orientation - The new Orientation for this
SnappingModel.SnappingLocation.public void setPart(IContentPart<? extends Node> part)
IContentPart of this SnappingModel.SnappingLocation to the
given value.part - The new IContentPart for this
SnappingModel.SnappingLocation.public void setPositionInScene(double positionInScene)
SnappingModel.SnappingLocation to the
given value.positionInScene - The new position coordinate for this
SnappingModel.SnappingLocation.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.