java-gnome version 4.0.19

org.gnome.gtk
Class Allocation

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.gnome.glib.Boxed
          extended by 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 1x1 at position -1,-1. You probably don't want to rely on those numbers; but that's what the initial values are.

This object is a live reference to the allocation field in the GtkWidget struct and so calling the getter methods will yield correct current values once you've got the Allocation object for the Widget in question.

Since:
4.0.6
Author:
Andrew Cowie

Method Summary
 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


java-gnome