java-gnome version 4.0.19

org.gnome.gdk
Class Rectangle

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.gnome.glib.Boxed
          extended by org.gnome.gdk.Rectangle

public final class Rectangle
extends Boxed

An object describing a rectangular area. While superficially similar to Allocation, this class is in fact different. It's primary use is in describing an area that has been exposed and needs to be [re]drawn. You normally get one of these from the getArea() method on EventExpose, though in rare situations you need to describe an area based on your own calculations and there is a constructor for that case.

Since:
4.0.7
Author:
Andrew Cowie

Constructor Summary
Rectangle(int x, int y, int width, int height)
          Create a Rectanlge.
 
Method Summary
 int getHeight()
          The height of the box described by this Rectangle.
 int getWidth()
          The width of the box described by this Rectangle.
 int getX()
          The horizontal co-ordinate of the top left corner of the box described by this Rectangle.
 int getY()
          The vertical co-ordinate of the box described by this Rectangle.
 String toString()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Rectangle

public Rectangle(int x,
                 int y,
                 int width,
                 int height)
Create a Rectanlge. This is principally used so that you can describe an area that needs to be redrawn, passing it to the invalidate() method of an [org.gnome.gdk] Window.

As usual, measurements are in pixels.

Since:
4.0.8
Method Detail

getHeight

public int getHeight()
The height of the box described by this Rectangle.

Since:
4.0.7

getWidth

public int getWidth()
The width of the box described by this Rectangle.

Since:
4.0.7

getX

public int getX()
The horizontal co-ordinate of the top left corner of the box described by this Rectangle.

Since:
4.0.7

getY

public int getY()
The vertical co-ordinate of the box described by this Rectangle.

Since:
4.0.7

toString

public String toString()
Overrides:
toString in class org.freedesktop.bindings.Pointer


java-gnome