|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.guiseframework.geometry.Rectangle
public class Rectangle
A rectangle on a plane.
| Field Summary | |
|---|---|
static Rectangle |
EMPTY_RECTANGLE
A predefined rectangle with zero size on the zero plane. |
| Constructor Summary | |
|---|---|
Rectangle(double x,
double y,
double width,
double height)
Two-dimensional primitive pixel coordinates and dimensions constructor. |
|
Rectangle(double x,
double y,
double z,
double width,
double height)
Primitive pixel coordinates and dimensions constructor. |
|
Rectangle(double x,
double y,
double z,
double width,
double height,
Unit unit)
Primitive coordinates, dimensions, and unit constructor. |
|
Rectangle(double x,
double y,
double width,
double height,
Unit unit)
Two-dimensional primitive coordinates, dimensions, and unit constructor. |
|
Rectangle(Extent x,
Extent y,
Extent width,
Extent height)
Two-dimensional coordinates and dimensions constructor. |
|
Rectangle(Extent x,
Extent y,
Extent z,
Extent width,
Extent height)
Coordinates and dimensions constructor. |
|
Rectangle(Point position,
Dimensions size)
Position and size constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one. |
Point |
getPosition()
|
Dimensions |
getSize()
|
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Rectangle EMPTY_RECTANGLE
| Constructor Detail |
|---|
public Rectangle(double x,
double y,
double width,
double height)
x - The X coordinate.y - The Y coordinate.width - The width of the rectangleheight - The height of the rectangle.
public Rectangle(double x,
double y,
double z,
double width,
double height)
x - The X coordinate.y - The Y coordinate.z - The Z coordinate.width - The width of the rectangleheight - The height of the rectangle.
public Rectangle(double x,
double y,
double width,
double height,
Unit unit)
x - The X coordinate.y - The Y coordinate.width - The width of the rectangleheight - The height of the rectangle.unit - The unit in which the point is measured.
public Rectangle(double x,
double y,
double z,
double width,
double height,
Unit unit)
x - The X coordinate.y - The Y coordinate.z - The Z coordinate.width - The width of the rectangleheight - The height of the rectangle.unit - The unit in which the point is measured.
public Rectangle(Extent x,
Extent y,
Extent width,
Extent height)
x - The X coordinate.y - The Y coordinate.width - The width of the rectangleheight - The height of the rectangle.
public Rectangle(Extent x,
Extent y,
Extent z,
Extent width,
Extent height)
x - The X coordinate.y - The Y coordinate.z - The Z coordinate.width - The width of the rectangleheight - The height of the rectangle.
public Rectangle(Point position,
Dimensions size)
position - The position of the upper-left corner of the rectangle.size - The size of the rectangle, which is guaranteed to have zero depth.
java.lang.NullPointerException - if the position and/or size is null.
java.lang.IllegalArgumentException - if the size has a non-zero depth.| Method Detail |
|---|
public Point getPosition()
public Dimensions getSize()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - The reference object with which to compare.
true if this object is equivalent to the given object.public final java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||