public static class SnappingModel.SnappingLocation
extends java.lang.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 javafx.scene.Node> part,
javafx.geometry.Orientation orientation,
double positionInScene)
Constructs a new
SnappingModel.SnappingLocation. |
| Modifier and Type | Method and Description |
|---|---|
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() |
public SnappingLocation(IContentPart<? extends javafx.scene.Node> part, javafx.geometry.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 boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic SnappingModel.SnappingLocation getCopy()
SnappingModel.SnappingLocation.SnappingModel.SnappingLocation.public javafx.geometry.Orientation getOrientation()
Orientation of this SnappingModel.SnappingLocation.Orientation of this SnappingModel.SnappingLocation.public IContentPart<? extends javafx.scene.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 int hashCode()
hashCode in class java.lang.Objectpublic void setOrientation(javafx.geometry.Orientation orientation)
Orientation of this SnappingModel.SnappingLocation to the
given value.orientation - The new Orientation for this
SnappingModel.SnappingLocation.public void setPart(IContentPart<? extends javafx.scene.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.public java.lang.String toString()
toString in class java.lang.ObjectCopyright (c) 2014, 2016 itemis AG and others. All rights reserved.