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
`ViewportState()` Creates a new `NavigationModel.ViewportState` with `tx = ty = width = height = 0` and an identity transform.
`ViewportState​(double translateX, double translateY, double width, double height, AffineTransform contentsTransform)` Creates a new `NavigationModel.ViewportState` for the given translation, size, and transform.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals​(java.lang.Object obj)`
`AffineTransform` `getContentsTransform()` Returns the contents transform associated with this `NavigationModel.ViewportState`.
`NavigationModel.ViewportState` `getCopy()` Returns a copy of this `NavigationModel.ViewportState`.
`double` `getHeight()` Returns the viewport height associated with this `NavigationModel.ViewportState`.
`double` `getTranslateX()` Returns the horizontal translation associated with this `NavigationModel.ViewportState`.
`double` `getTranslateY()` Returns the vertical translation associated with this `NavigationModel.ViewportState`.
`double` `getWidth()` Returns the viewport width associated with this `NavigationModel.ViewportState` .
`int` `hashCode()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ViewportState

    public ViewportState()

Creates a new `NavigationModel.ViewportState` with `tx = ty = width = height = 0` and an identity transform.

#### ViewportState

    public ViewportState​(double translateX,
                         double translateY,
                         double width,
                         double height,
                         AffineTransform contentsTransform)

Creates a new `NavigationModel.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 class `java.lang.Object`

#### getContentsTransform

    public AffineTransform getContentsTransform()

Returns the contents transform associated with this `NavigationModel.ViewportState`.

Returns:
  The contents transform.

#### getCopy

    public NavigationModel.ViewportState getCopy()

Returns a copy of this `NavigationModel.ViewportState`.

Returns:
  A copy of this `NavigationModel.ViewportState`.

#### getHeight

    public double getHeight()

Returns the viewport height associated with this `NavigationModel.ViewportState`.

Returns:
  The viewport height.

#### getTranslateX

    public double getTranslateX()

Returns the horizontal translation associated with this `NavigationModel.ViewportState`.

Returns:
  The horizontal translation.

#### getTranslateY

    public double getTranslateY()

Returns the vertical translation associated with this `NavigationModel.ViewportState`.

Returns:
  The vertical translation.

#### getWidth

    public double getWidth()

Returns the viewport width associated with this `NavigationModel.ViewportState` .

Returns:
  The viewport width.

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`