|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.util.Rectangle
public final class Rectangle
Represents the bounds of a component.
| Field Summary | |
|---|---|
int |
height
The height of the entity in question. |
int |
width
The width of the entity in question. |
int |
x
The x position of the entity in question. |
int |
y
The y position of the entity in question. |
| Constructor Summary | |
|---|---|
Rectangle()
Creates an empty rectangle. |
|
Rectangle(int x,
int y,
int width,
int height)
Creates a rectangle with the specified location and dimensions. |
|
Rectangle(Rectangle other)
Copy constructor. |
|
| Method Summary | |
|---|---|
void |
add(int x,
int y,
int width,
int height)
Adds the specified rectangle to this rectangle, causing this rectangle to become the union of itself and the specified rectangle. |
boolean |
equals(Object other)
|
int |
getArea()
Returns the area of the rectangle. |
void |
grow(int h,
int v)
Increases the size of this rectangle by the specified amounts in the horizontal and vertical dimensions. |
int |
hashCode()
|
Rectangle |
intersect(Rectangle other)
Computes the intersection of this rectangle and the specified other. |
Rectangle |
intersect(Rectangle other,
Rectangle result)
Computes the intersection of this rectangle and the specified other, placing the result in the object provided. |
Rectangle |
intersectLocal(Rectangle other)
Computes the intersection in-place of this rectangle and the specified other. |
Rectangle |
set(int x,
int y,
int width,
int height)
Sets the fields of this rectangle. |
Rectangle |
set(Rectangle other)
Sets the state of this rectangle to that of the specified other. |
String |
toString()
Generates a string representation of this instance. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int x
public int y
public int width
public int height
| Constructor Detail |
|---|
public Rectangle(int x,
int y,
int width,
int height)
public Rectangle(Rectangle other)
public Rectangle()
| Method Detail |
|---|
public int getArea()
public Rectangle intersectLocal(Rectangle other)
public Rectangle intersect(Rectangle other)
public Rectangle intersect(Rectangle other,
Rectangle result)
public Rectangle set(Rectangle other)
public Rectangle set(int x,
int y,
int width,
int height)
public void add(int x,
int y,
int width,
int height)
public void grow(int h,
int v)
public boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||