|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RectangleView
Provides a view of a Rectangle without allowing modifications.
Method Summary | |
---|---|
boolean |
contains(PointView point)
Returns whether this rectangle contains the specified point. |
boolean |
contains(RectangleView rectangle)
Returns whether this rectangle contains the specified one. |
int |
getBottom()
Same as getY() + getHeight() . |
PointView |
getBottomLeft()
Returns the location of the bottom-left point of the rectangle. |
Point |
getBottomLeft(Point reusable)
Returns the location of the bottom-left point of the rectangle. |
PointView |
getBottomRight()
Returns the location of the bottom-right point of the rectangle. |
Point |
getBottomRight(Point reusable)
Returns the location of the bottom-right point of the rectangle. |
PointView |
getCenter()
Returns the location of the center of the rectangle. |
Point |
getCenter(Point reusable)
Returns the location of the center of the rectangle, in the same manner as the getCenter() method. |
int |
getHeight()
Returns the height of the rectangle. |
RectangleView |
getIntersection(RectangleView rectangle)
Returns the intersection between this rectangle and the specified one. |
Rectangle |
getIntersection(RectangleView rectangle,
Rectangle reusable)
Returns the intersection between this rectangle and the specified one. |
int |
getLeft()
Same as getX() . |
int |
getRight()
Same as getX() + getWidth() . |
SizeView |
getSize()
Returns the size of the rectangle. |
Size |
getSize(Size reusable)
Returns the size of the rectangle. |
int |
getTop()
Same as getY() . |
PointView |
getTopLeft()
Returns the location of the top-left point of the rectangle. |
Point |
getTopLeft(Point reusable)
Returns the location of the top-left point of the rectangle. |
PointView |
getTopRight()
Returns the location of the top-right point of the rectangle. |
Point |
getTopRight(Point reusable)
Returns the location of the top-right point of the rectangle. |
int |
getWidth()
Returns the width of the rectangle. |
int |
getX()
Returns the X coordinate of the top-left point. |
int |
getY()
Returns the Y coordinate of the top-left point. |
boolean |
intersects(RectangleView rectangle)
Returns whether this rectangle intersects with the specified one. |
Method Detail |
---|
int getX()
int getY()
int getWidth()
int getHeight()
int getLeft()
getX()
.
int getTop()
getY()
.
int getRight()
getX() + getWidth()
.
int getBottom()
getY() + getHeight()
.
SizeView getSize()
Size getSize(Size reusable)
Size
object is not null
, it is reused and returned.
PointView getTopLeft()
Point getTopLeft(Point reusable)
Point
object is not null
, it is
reused and returned.
PointView getTopRight()
Point getTopRight(Point reusable)
Point
object is not null
, it is
reused and returned.
PointView getBottomLeft()
Point getBottomLeft(Point reusable)
Point
object is not null
, it is
reused and returned.
PointView getBottomRight()
Point getBottomRight(Point reusable)
Point
object is not null
, it is
reused and returned.
PointView getCenter()
Point getCenter(Point reusable)
Point
object is not null
, it is reused and
returned.
boolean contains(PointView point)
boolean contains(RectangleView rectangle)
boolean intersects(RectangleView rectangle)
RectangleView getIntersection(RectangleView rectangle)
null
if the two rectangles do not intersect and do
not even "touch". Returns an empty rectangle if the two rectangles
"touch".
Rectangle getIntersection(RectangleView rectangle, Rectangle reusable)
null
if the two rectangles do not intersect and do
not even "touch". Returns an empty rectangle if the two rectangles
"touch".
If the specified Rectangle
object is not null
,
it is reused and returned.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |