org.gnu.gtk

Class Allocation

public final class Allocation extends Object

Deprecated: This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. This class may in the future have an equivalent in java-gnome 4.0, try looking for org.gnome.gtk.Allocation. You should be aware that there is a considerably different API in the new library: the architecture is completely different and most notably internals are no longer exposed to public view.

When the top-level widget has determined how much space its child would like to have, the second phase of the size negotiation, size allocation, begins. A child's size allocation is represented by an Allocation object. This class contains not only a width and height, but also a position (i.e. X and Y coordinates), so that containers can tell their children not only how much space they have gotten, but also where they are positioned inside the space available to the container.
Constructor Summary
Allocation(int x, int y, int width, int height)
Construct a new Allocation.
Method Summary
intgetHeight()
intgetWidth()
intgetX()
intgetY()

Constructor Detail

Allocation

public Allocation(int x, int y, int width, int height)
Construct a new Allocation.

Parameters: x the X position of the widget's area relative to its parents allocation. y the Y position of the widget's area relative to its parents allocation. width the width of the widget's allocated area. height the height of the widget's allocated area.

See Also: getAllocation

Method Detail

getHeight

public final int getHeight()

Returns: the height of the widget's allocated area.

getWidth

public final int getWidth()

Returns: the width of the widget's allocated area.

getX

public final int getX()

Returns: the X position of the widget's area relative to its parents allocation.

getY

public final int getY()

Returns: the Y position of the widget's area relative to its parents allocation.