Package org.eclipse.gef.zest.fx.models
Class NavigationModel.ViewportState
java.lang.Object
org.eclipse.gef.zest.fx.models.NavigationModel.ViewportState
- Enclosing class:
- NavigationModel
Representation of a viewport's state, which manifests itself in x and y
translation, width and height, as well as a contents transform.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newNavigationModel.ViewportState
withtx = ty = width = height = 0
and an identity transform.ViewportState
(double translateX, double translateY, double width, double height, AffineTransform contentsTransform) Creates a newNavigationModel.ViewportState
for the given translation, size, and transform. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the contents transform associated with thisNavigationModel.ViewportState
.getCopy()
Returns a copy of thisNavigationModel.ViewportState
.double
Returns the viewport height associated with thisNavigationModel.ViewportState
.double
Returns the horizontal translation associated with thisNavigationModel.ViewportState
.double
Returns the vertical translation associated with thisNavigationModel.ViewportState
.double
getWidth()
Returns the viewport width associated with thisNavigationModel.ViewportState
.int
hashCode()
-
Constructor Details
-
ViewportState
public ViewportState()Creates a newNavigationModel.ViewportState
withtx = ty = width = height = 0
and an identity transform. -
ViewportState
public ViewportState(double translateX, double translateY, double width, double height, AffineTransform contentsTransform) Creates a newNavigationModel.ViewportState
for the given translation, size, and transform.- Parameters:
translateX
- The horizontal translation.translateY
- The vertical translation.width
- The viewport width.height
- The viewport height.contentsTransform
- The contents transform.
-
-
Method Details
-
equals
-
getContentsTransform
Returns the contents transform associated with thisNavigationModel.ViewportState
.- Returns:
- The contents transform.
-
getCopy
Returns a copy of thisNavigationModel.ViewportState
.- Returns:
- A copy of this
NavigationModel.ViewportState
.
-
getHeight
public double getHeight()Returns the viewport height associated with thisNavigationModel.ViewportState
.- Returns:
- The viewport height.
-
getTranslateX
public double getTranslateX()Returns the horizontal translation associated with thisNavigationModel.ViewportState
.- Returns:
- The horizontal translation.
-
getTranslateY
public double getTranslateY()Returns the vertical translation associated with thisNavigationModel.ViewportState
.- Returns:
- The vertical translation.
-
getWidth
public double getWidth()Returns the viewport width associated with thisNavigationModel.ViewportState
.- Returns:
- The viewport width.
-
hashCode
public int hashCode()
-