|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Drawable2DInterface is an interface for objects being placed on a DrawingCanvas that defines which accessor methods are availabe for Drawable2D objects. It includes getHeight, getWidth,and getBounds. It extends DrawableInterface.
Method Summary | |
Bounds |
getBounds()
Retrieves the bounding rectangle of the object. |
double |
getHeight()
Gets the height of the object's bounding rectangle |
Location |
getLocation()
Get the coordinates of the object's bounding rectangle's upper left corner |
double |
getWidth()
Gets the width of the object's bounding rectangle |
double |
getX()
Get the x coordinate of the object's bounding rectangle's upper left corner |
double |
getY()
Get the y coordinate of the object's bounding rectangle's upper left corner |
boolean |
overlaps(Drawable2DInterface item)
Determines if another Drawable's bounding box overlaps with this object's bounding box. |
Methods inherited from interface objectdraw.DrawableInterface |
addToCanvas, contains, draw, getColor, hide, isHidden, move, moveTo, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, show |
Method Detail |
public double getWidth()
public double getHeight()
public double getX()
public double getY()
public Bounds getBounds()
public Location getLocation()
public boolean overlaps(Drawable2DInterface item)
item
- the other objecttrue
if item intersects this object;
false
otherwise.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |