|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jwo.utils.JWRectangle
Class for storing a rectangle with floating point coordinates. Rectangle has an origin at the lower left and a width and height.
Field Summary | |
float |
height
Height of rectangle. |
float |
width
Width of rectangle. |
float |
x
x-coordinate of rectangle origin. |
float |
y
y-coordinate of rectangle origin. |
Constructor Summary | |
JWRectangle(Dimension dimension)
Creates a rectangle from a given AWT Dimension object. |
|
JWRectangle(float width,
float height)
Creates a rectangle with given dimensions and 0 origin. |
|
JWRectangle(float x,
float y,
float width,
float height)
Creates a rectangle with a given origin and dimensions. |
|
JWRectangle(Rectangle rect)
Creates a JWRectangle from a given AWT Rectangle object. |
Method Summary | |
Dimension |
getDimension()
Converts the rectangle into an AWT Dimension object. |
Rectangle |
getRectangle()
Converts the rectangle into an AWT Rectangle object. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public float x
public float y
public float width
public float height
Constructor Detail |
public JWRectangle(float width, float height)
width
- Width of rectangle.height
- Height of rectangle.public JWRectangle(Dimension dimension)
dimension
- AWR Dimension object.public JWRectangle(Rectangle rect)
rect
- AWT Rectangle object.public JWRectangle(float x, float y, float width, float height)
x
- x-coordinate of rectangle origin.y
- y-coordinate of rectangle origin.width
- Width of rectangle.height
- Height of rectangle.Method Detail |
public Dimension getDimension()
public Rectangle getRectangle()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |