|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--physicon.graphLib.DoubleRectangle
Help class for the library. Represents the rectangle with double coordinates and dimensions
| Field Summary | |
double |
height
|
double |
width
|
double |
x
|
double |
y
|
| Constructor Summary | |
DoubleRectangle(double _x,
double _y,
double _width,
double _height)
Constructor. |
|
DoubleRectangle(DoublePoint _topLeft,
DoublePoint _bottomRight)
Constructor |
|
| Method Summary | |
boolean |
contains(DoublePoint _dpt)
Returns true if the given point is in the given object. |
boolean |
equals(DoubleRectangle _drct)
Compares the current object with the given one. |
DoubleRectangle |
intersect(DoubleRectangle _rct)
Returns the intersection of the current object with the given DoubleRectangle |
void |
move(double _x,
double _y)
Moves the current object to the given point. |
void |
move(DoublePoint _dpt)
Moves the current object to the given point. |
void |
normilize()
Converts the current object to the "normal" state. |
java.lang.String |
toString()
Returns the string representation of the current object |
void |
translate(double _dx,
double _dy)
Translates the current object by the given vector |
void |
translate(DoublePoint _dpt)
Translates the current object by the given vector |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public double x
public double y
public double width
public double height
| Constructor Detail |
public DoubleRectangle(double _x,
double _y,
double _width,
double _height)
_x - - the x coordinate of the closest
to the reference point (0, 0) summit of the
rectangle_y - - the y coordinate of the closest
to the reference point (0, 0) summit of the
rectangle_width - - the width of the rectangle_height - - the height of the rectangle
public DoubleRectangle(DoublePoint _topLeft,
DoublePoint _bottomRight)
_topLeft - - coordinates of the closest
to the reference point summit of the rectangle_bottomRight - - coordinates of the opposite
to the _topLeft summit of the rectangle| Method Detail |
public java.lang.String toString()
public boolean equals(DoubleRectangle _drct)
_drct - - the DoubleRectangle to compare the
current object with
public void move(double _x,
double _y)
_x - - the x coordinate of the closest to
the refernce point summit of the current object_y - - the y coordinate of the closest to
the reference point summit of the current objectpublic void move(DoublePoint _dpt)
_dpt - - new coordinates of the closest to
the refernce point summit of the current object
public void translate(double _dx,
double _dy)
_dx - - displacement of the x coordinate
of the current object_dy - - displacement of the y coordinate
of the current objectpublic void translate(DoublePoint _dpt)
_dpt - - displacement of coordinates
of the current objectpublic DoubleRectangle intersect(DoubleRectangle _rct)
_rct - - gicen DoubleRectanglepublic boolean contains(DoublePoint _dpt)
_dpt - - the given pointpublic void normilize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||