org.gnome.gtk

## Class Allocation

- Object
- - org.freedesktop.bindings.Pointer
  - - org.gnome.glib.Boxed
    - - org.gnome.gtk.Allocation

-     public final class Allocation
      extends Boxed

  An object with information about the size of the rectangle that has been allocated to a Widget and its position within its parent Container as a result of consideration of the Widget's size request. See Widget's `setSizeRequest()` for a more detailed discussion of the size request-allocation process. You get the Allocation currently given to a Widget with Widget's `getAllocation()`.

  Before the request-allocation process has occurred, you can expect this class to report a size of `1`x`1` at position `-1`,`-1`. You probably don't want to rely on those numbers; but that's what the initial values are.

  Since:
    4.0.6
  Author:
    Andrew Cowie

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getHeight()` The height that has been allocated.
    `int` | `getWidth()` The width that has been allocated.
    `int` | `getX()` The horizontal co-ordinate of the top left corner of the rectangle.
    `int` | `getY()` The vertical co-ordinate of the top left corner of the rectangle.
    `String` | `toString()`

    - ### Methods inherited from class Object

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

- - ### Method Detail

    - #### getHeight

          public int getHeight()

      The height that has been allocated.

    - #### getWidth

          public int getWidth()

      The width that has been allocated.

    - #### getX

          public int getX()

      The horizontal co-ordinate of the top left corner of the rectangle. This is relative to (ie, an offset from the top left corner of) the parent's Allocation).

    - #### getY

          public int getY()

      The vertical co-ordinate of the top left corner of the rectangle. This is relative to (ie, an offset from the top left corner of) the parent's Allocation).

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `org.freedesktop.bindings.Pointer`