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.ObjectASnappingModel.SnappingLocationcombines anIContentPart, a position coordinate in the scene coordinate system, and anOrientation. The position coordinate is evaluated in dependence of the location'sOrientation. For horizontal locations, the position coordinate is a y-coordinate. For vertical locations, the position coordinate is an x-coordinate.
-
-
Constructor Summary
Constructors Constructor Description SnappingLocation(IContentPart<? extends javafx.scene.Node> part, javafx.geometry.Orientation orientation, double positionInScene)Constructs a newSnappingModel.SnappingLocation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)SnappingModel.SnappingLocationgetCopy()Returns a copy of thisSnappingModel.SnappingLocation.javafx.geometry.OrientationgetOrientation()Returns theOrientationof thisSnappingModel.SnappingLocation.IContentPart<? extends javafx.scene.Node>getPart()Returns theIContentPartfrom which thisSnappingModel.SnappingLocationwas derived.doublegetPositionInScene()Returns 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.java.lang.StringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getCopy
public SnappingModel.SnappingLocation 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
public IContentPart<? extends javafx.scene.Node> 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()
- Overrides:
hashCodein classjava.lang.Object
-
setOrientation
public void setOrientation(javafx.geometry.Orientation orientation)
Sets theOrientationof thisSnappingModel.SnappingLocationto the given value.- Parameters:
orientation- The newOrientationfor thisSnappingModel.SnappingLocation.
-
setPart
public void setPart(IContentPart<? extends javafx.scene.Node> part)
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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-