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.Object
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
Constructors Constructor Description ViewportState()
Creates 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
AffineTransform
getContentsTransform()
Returns the contents transform associated with thisNavigationModel.ViewportState
.NavigationModel.ViewportState
getCopy()
Returns a copy of thisNavigationModel.ViewportState
.double
getHeight()
Returns the viewport height associated with thisNavigationModel.ViewportState
.double
getTranslateX()
Returns the horizontal translation associated with thisNavigationModel.ViewportState
.double
getTranslateY()
Returns the vertical translation associated with thisNavigationModel.ViewportState
.double
getWidth()
Returns the viewport width associated with thisNavigationModel.ViewportState
.int
hashCode()
-
-
-
Constructor Detail
-
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 Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in 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:
hashCode
in classjava.lang.Object
-
-