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
ConstructorsConstructorDescriptionSnappingLocation(IContentPart<? extends javafx.scene.Node> part, javafx.geometry.Orientation orientation, double positionInScene) Constructs a newSnappingModel.SnappingLocation. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetCopy()Returns a copy of thisSnappingModel.SnappingLocation.javafx.geometry.OrientationReturns theOrientationof thisSnappingModel.SnappingLocation.IContentPart<? extends javafx.scene.Node>getPart()Returns theIContentPartfrom which thisSnappingModel.SnappingLocationwas derived.doubleReturns the position coordinate of thisSnappingModel.SnappingLocation.inthashCode()voidsetOrientation(javafx.geometry.Orientation orientation) Sets theOrientationof thisSnappingModel.SnappingLocationto the given value.voidsetPart(IContentPart<? extends javafx.scene.Node> part) Sets theIContentPartof thisSnappingModel.SnappingLocationto the given value.voidsetPositionInScene(double positionInScene) Sets the position coordinate of thisSnappingModel.SnappingLocationto 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- TheIContentPartfrom which this location is derived.orientation- TheOrientationfor 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 theOrientationof thisSnappingModel.SnappingLocation.- Returns:
- The
Orientationof thisSnappingModel.SnappingLocation.
-
getPart
Returns theIContentPartfrom which thisSnappingModel.SnappingLocationwas derived.- Returns:
- The
IContentPartfrom which thisSnappingModel.SnappingLocationwas 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 theOrientationof thisSnappingModel.SnappingLocationto the given value.- Parameters:
orientation- The newOrientationfor thisSnappingModel.SnappingLocation.
-
setPart
Sets theIContentPartof thisSnappingModel.SnappingLocationto the given value.- Parameters:
part- The newIContentPartfor thisSnappingModel.SnappingLocation.
-
setPositionInScene
public void setPositionInScene(double positionInScene) Sets the position coordinate of thisSnappingModel.SnappingLocationto the given value.- Parameters:
positionInScene- The new position coordinate for thisSnappingModel.SnappingLocation.
-
toString
-