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.ViewportStatewithtx = ty = width = height = 0and an identity transform.ViewportState(double translateX, double translateY, double width, double height, AffineTransform contentsTransform) Creates a newNavigationModel.ViewportStatefor the given translation, size, and transform. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the contents transform associated with thisNavigationModel.ViewportState.getCopy()Returns a copy of thisNavigationModel.ViewportState.doubleReturns the viewport height associated with thisNavigationModel.ViewportState.doubleReturns the horizontal translation associated with thisNavigationModel.ViewportState.doubleReturns the vertical translation associated with thisNavigationModel.ViewportState.doublegetWidth()Returns the viewport width associated with thisNavigationModel.ViewportState.inthashCode()
-
Constructor Details
-
ViewportState
public ViewportState()Creates a newNavigationModel.ViewportStatewithtx = ty = width = height = 0and an identity transform. -
ViewportState
public ViewportState(double translateX, double translateY, double width, double height, AffineTransform contentsTransform) Creates a newNavigationModel.ViewportStatefor 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()
-