org.gnu.gdk

Class Rectangle

public class Rectangle extends Boxed

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 exist in java-gnome 4.0; look out for org.gnome.gdk.Rectangle.

Represents a rectangle with x, y, width and height members.
Constructor Summary
Rectangle()
Construct an empty Rectangle
Rectangle(int x, int y, int width, int height)
Construct a Rectangle providing the x and y left-top coordinates, width and height.
Rectangle(Handle handle)
Method Summary
intgetHeight()
Retrieve the height of the Rectangle.
static RectanglegetRectangle(Handle handle)
For internal use of Java-Gnome only;
static TypegetType()
Retrieve the runtime type used by the GLib library.
intgetWidth()
Retrieve the width of the Rectangle.
intgetX()
Retrieve the x coordinate for the Rectangle.
intgetY()
Retrieve the y coordinate for the Rectangle.
Rectangleintersect(Rectangle rect)
Returns the intersection of this Rectangle and the provided Rectangle or null if there is no intersection.
voidsetHeight(int heigth)
Set the height of the Rectangle.
voidsetWidth(int width)
Set the width of the Rectangle.
voidsetX(int x)
Set the x coordinate for the Rectangle.
voidsetY(int y)
Set the y coordinate for the Rectangle.
Rectangleunion(Rectangle rect)
Returns the union of this Rectangle and the provided Rectangle or null if there is no union.

Constructor Detail

Rectangle

public Rectangle()
Construct an empty Rectangle

Rectangle

public Rectangle(int x, int y, int width, int height)

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Construct a Rectangle providing the x and y left-top coordinates, width and height.

Parameters: x y width height

Rectangle

public Rectangle(Handle handle)

Method Detail

getHeight

public int getHeight()

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Retrieve the height of the Rectangle.

getRectangle

public static Rectangle getRectangle(Handle handle)

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

For internal use of Java-Gnome only;

getType

public static Type getType()

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Retrieve the runtime type used by the GLib library.

getWidth

public int getWidth()

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Retrieve the width of the Rectangle.

getX

public int getX()

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Retrieve the x coordinate for the Rectangle.

getY

public int getY()

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Retrieve the y coordinate for the Rectangle.

intersect

public Rectangle intersect(Rectangle rect)

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Returns the intersection of this Rectangle and the provided Rectangle or null if there is no intersection.

Parameters: rect

setHeight

public void setHeight(int heigth)

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Set the height of the Rectangle.

Parameters: heigth

setWidth

public void setWidth(int width)

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Set the width of the Rectangle.

Parameters: width

setX

public void setX(int x)

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Set the x coordinate for the Rectangle.

Parameters: x

setY

public void setY(int y)

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Set the y coordinate for the Rectangle.

Parameters: y

union

public Rectangle union(Rectangle rect)

Deprecated: Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Returns the union of this Rectangle and the provided Rectangle or null if there is no union.

Parameters: rect