javax.media.nativewindow.util

## Class Dimension

- java.lang.Object
- - javax.media.nativewindow.util.Dimension

- All Implemented Interfaces:
    WriteCloneable, Cloneable, Comparable<DimensionImmutable>, DimensionImmutable

      public class Dimension
      extends Object
      implements Cloneable, DimensionImmutable

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Dimension()`
    `Dimension(int[] size)`
    `Dimension(int width, int height)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Dimension` | `add(Dimension pd)`
    `Object` | `clone()`
    `Object` | `cloneMutable()`
    `int` | `compareTo(DimensionImmutable d)` Compares square of size.
    `boolean` | `equals(Object obj)` Checks whether two dimensions objects are equal.
    `int` | `getHeight()`
    `int` | `getWidth()`
    `int` | `hashCode()`
    `Dimension` | `scale(int s)`
    `void` | `set(int width, int height)`
    `void` | `setHeight(int height)`
    `void` | `setWidth(int width)`
    `String` | `toString()`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Dimension

          public Dimension()

    - #### Dimension

          public Dimension(int[] size)

    - #### Dimension

          public Dimension(int width,
                   int height)

  - ### Method Detail

    - #### cloneMutable

          public Object cloneMutable()

      Specified by:
        `cloneMutable` in interface `WriteCloneable`

    - #### clone

          public Object clone()

      Overrides:
        `clone` in class `Object`

    - #### getWidth

          public final int getWidth()

      Specified by:
        `getWidth` in interface `DimensionImmutable`

    - #### getHeight

          public final int getHeight()

      Specified by:
        `getHeight` in interface `DimensionImmutable`

    - #### set

          public final void set(int width,
                 int height)

    - #### setWidth

          public final void setWidth(int width)

    - #### setHeight

          public final void setHeight(int height)

    - #### scale

          public final Dimension scale(int s)

    - #### add

          public final Dimension add(Dimension pd)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### compareTo

          public int compareTo(DimensionImmutable d)

      Description copied from interface: `DimensionImmutable`

      Compares square of size.

      Specified by:
        `compareTo` in interface `Comparable<DimensionImmutable>`
      Specified by:
        `compareTo` in interface `DimensionImmutable`

    - #### equals

          public boolean equals(Object obj)

      Description copied from interface: `DimensionImmutable`
      Checks whether two dimensions objects are equal. Two instances of `DimensionReadOnly` are equal if two components `height` and `width` are equal.
      Specified by:
        `equals` in interface `DimensionImmutable`
      Overrides:
        `equals` in class `Object`
      Returns:
        `true` if the two dimensions are equal; otherwise `false`.

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in interface `DimensionImmutable`
      Overrides:
        `hashCode` in class `Object`

Copyright 2010 JogAmp Community.