Package ej.mwt.util

## Class Size

- java.lang.Object
- - ej.mwt.util.Size

- All Implemented Interfaces:
    `Outlineable`

      public class Size
      extends Object
      implements Outlineable

  Represents a size (width and height).

  For heap optimization the size is stored as a `short` and therefore is limited between `-32768` and `32767`.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Size​(int width, int height)` | Creates a size specifying its values.
    `Size​(Size size)` | Creates a size from another size.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addOutline​(int left, int top, int right, int bottom)` | Adds the given outline.
    `int` | `getHeight()` | Gets the height.
    `int` | `getWidth()` | Gets the width.
    `void` | `removeOutline​(int left, int top, int right, int bottom)` | Removes the given outline.
    `void` | `setHeight​(int height)` | Sets the height.
    `void` | `setSize​(int width, int height)` | Sets the size.
    `void` | `setWidth​(int width)` | Sets the width.

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

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Size

          public Size​(int width,
                      int height)

      Creates a size specifying its values.
      Parameters:
        `width` - the width.
        `height` - the height.

    - #### Size

          public Size​(Size size)

      Creates a size from another size.
      Parameters:
        `size` - the other size.

  - ### Method Detail

    - #### getWidth

          public int getWidth()

      Gets the width.
      Returns:
        the width.

    - #### setWidth

          public void setWidth​(int width)

      Sets the width.
      Parameters:
        `width` - the width.

    - #### getHeight

          public int getHeight()

      Gets the height.
      Returns:
        the height.

    - #### setHeight

          public void setHeight​(int height)

      Sets the height.
      Parameters:
        `height` - the height.

    - #### setSize

          public void setSize​(int width,
                              int height)

      Sets the size.
      Parameters:
        `width` - the width.
        `height` - the height.

    - #### addOutline

          public void addOutline​(int left,
                                 int top,
                                 int right,
                                 int bottom)

      Description copied from interface: `Outlineable`
      Adds the given outline.
      Specified by:
        `addOutline` in interface `Outlineable`
      Parameters:
        `left` - the left side thickness of the outline.
        `top` - the top side thickness of the outline.
        `right` - the right side thickness of the outline.
        `bottom` - the bottom side thickness of the outline.

    - #### removeOutline

          public void removeOutline​(int left,
                                    int top,
                                    int right,
                                    int bottom)

      Description copied from interface: `Outlineable`
      Removes the given outline.
      Specified by:
        `removeOutline` in interface `Outlineable`
      Parameters:
        `left` - the left side thickness of the outline.
        `top` - the top side thickness of the outline.
        `right` - the right side thickness of the outline.
        `bottom` - the bottom side thickness of the outline.