Package org.eclipse.gef.mvc.fx.models
Class SnappingModel.SnappingLocation
java.lang.Object
org.eclipse.gef.mvc.fx.models.SnappingModel.SnappingLocation
- Enclosing class:
- SnappingModel
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
ConstructorDescriptionSnappingLocation
(IContentPart<? extends javafx.scene.Node> part, javafx.geometry.Orientation orientation, double positionInScene) Constructs a newSnappingModel.SnappingLocation
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getCopy()
Returns a copy of thisSnappingModel.SnappingLocation
.javafx.geometry.Orientation
Returns theOrientation
of thisSnappingModel.SnappingLocation
.IContentPart<? extends javafx.scene.Node>
getPart()
Returns theIContentPart
from which thisSnappingModel.SnappingLocation
was derived.double
Returns the position coordinate of thisSnappingModel.SnappingLocation
.int
hashCode()
void
setOrientation
(javafx.geometry.Orientation orientation) Sets theOrientation
of thisSnappingModel.SnappingLocation
to the given value.void
setPart
(IContentPart<? extends javafx.scene.Node> part) Sets theIContentPart
of thisSnappingModel.SnappingLocation
to the given value.void
setPositionInScene
(double positionInScene) Sets the position coordinate of thisSnappingModel.SnappingLocation
to the given value.toString()
-
Constructor Details
-
SnappingLocation
public SnappingLocation(IContentPart<? extends javafx.scene.Node> part, javafx.geometry.Orientation orientation, double positionInScene) Constructs a newSnappingModel.SnappingLocation
.- Parameters:
part
- TheIContentPart
from which this location is derived.orientation
- TheOrientation
for thisSnappingModel.SnappingLocation
.positionInScene
- The position coordinate for thisSnappingModel.SnappingLocation
. The coordinate is either the x- or y-coordinate, depending on theOrientation
. For horizontal locations, the y-coordinate needs to be specified. For vertical locations, the x-coordinate needs to be specified.
-
-
Method Details
-
equals
-
getCopy
Returns a copy of thisSnappingModel.SnappingLocation
.- Returns:
- A copy of this
SnappingModel.SnappingLocation
.
-
getOrientation
public javafx.geometry.Orientation getOrientation()Returns theOrientation
of thisSnappingModel.SnappingLocation
.- Returns:
- The
Orientation
of thisSnappingModel.SnappingLocation
.
-
getPart
Returns theIContentPart
from which thisSnappingModel.SnappingLocation
was derived.- Returns:
- The
IContentPart
from which thisSnappingModel.SnappingLocation
was derived.
-
getPositionInScene
public double getPositionInScene()Returns the position coordinate of thisSnappingModel.SnappingLocation
.- Returns:
- The position coordinate of this
SnappingModel.SnappingLocation
.
-
hashCode
public int hashCode() -
setOrientation
public void setOrientation(javafx.geometry.Orientation orientation) Sets theOrientation
of thisSnappingModel.SnappingLocation
to the given value.- Parameters:
orientation
- The newOrientation
for thisSnappingModel.SnappingLocation
.
-
setPart
Sets theIContentPart
of thisSnappingModel.SnappingLocation
to the given value.- Parameters:
part
- The newIContentPart
for thisSnappingModel.SnappingLocation
.
-
setPositionInScene
public void setPositionInScene(double positionInScene) Sets the position coordinate of thisSnappingModel.SnappingLocation
to the given value.- Parameters:
positionInScene
- The new position coordinate for thisSnappingModel.SnappingLocation
.
-
toString
-