Package docking.widgets.fieldpanel.support

# Class ViewerPosition

java.lang.Object
docking.widgets.fieldpanel.support.ViewerPosition

All Implemented Interfaces:
  `Serializable`

public class ViewerPosition extends Object implements Serializable
Records the current top of screen position of the viewer.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ViewerPosition(int index, int xOffset, int yOffset)`
  `ViewerPosition(BigInteger index, int xOffset, int yOffset)`
  Construct a new viewer position with the given index, xOffset and yOffset.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `final BigInteger`
  `getIndex()`
  `final int`
  `getIndexAsInt()`
  Returns the index of the item at the top of the screen.
  `final int`
  `getXOffset()`
  Returns the horizontal scroll position.
  `final int`
  `getYOffset()`
  Returns the y coordinate of the layout at the top of the screen.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### ViewerPosition

    public ViewerPosition(BigInteger index, int xOffset, int yOffset)
    Construct a new viewer position with the given index, xOffset and yOffset.
    Parameters:
      `index` - the index of the layout displayed at the top of the screen.
      `xOffset` - The horizontal scroll position (NOT CURRENTLY USED)
      `yOffset` - the vertical position of the layout at the top of the screen. If the layout is totally visible, then the yOffset will be 0. Otherwise, it will be < 0 indicating that it begins above the top of the screen.

  - ### ViewerPosition

    public ViewerPosition(int index, int xOffset, int yOffset)

- ## Method Details

  - ### getIndexAsInt

    public final int getIndexAsInt()
    Returns the index of the item at the top of the screen.

  - ### getIndex

    public final BigInteger getIndex()

  - ### getXOffset

    public final int getXOffset()
    Returns the horizontal scroll position.

  - ### getYOffset

    public final int getYOffset()
    Returns the y coordinate of the layout at the top of the screen.

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`
    See Also:
      - `Object.equals(java.lang.Object)`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`
    See Also:
      - `Object.toString()`