Package org.eclipse.gef.zest.fx.models
Class NavigationModel.ViewportState
- java.lang.Object
-
- org.eclipse.gef.zest.fx.models.NavigationModel.ViewportState
-
- Enclosing class:
- NavigationModel
public static class NavigationModel.ViewportState extends java.lang.ObjectRepresentation of a viewport's state, which manifests itself in x and y translation, width and height, as well as a contents transform.
-
-
Constructor Summary
Constructors Constructor Description ViewportState()Creates 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)AffineTransformgetContentsTransform()Returns the contents transform associated with thisNavigationModel.ViewportState.NavigationModel.ViewportStategetCopy()Returns a copy of thisNavigationModel.ViewportState.doublegetHeight()Returns the viewport height associated with thisNavigationModel.ViewportState.doublegetTranslateX()Returns the horizontal translation associated with thisNavigationModel.ViewportState.doublegetTranslateY()Returns the vertical translation associated with thisNavigationModel.ViewportState.doublegetWidth()Returns the viewport width associated with thisNavigationModel.ViewportState.inthashCode()
-
-
-
Constructor Detail
-
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 Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getContentsTransform
public AffineTransform getContentsTransform()
Returns the contents transform associated with thisNavigationModel.ViewportState.- Returns:
- The contents transform.
-
getCopy
public NavigationModel.ViewportState 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()
- Overrides:
hashCodein classjava.lang.Object
-
-