|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Drawable2DInterface describes the methods available for manipulating two-dimensional objects placed on a DrawingCanvas. It extends DrawableInterface and includes getHeight, getWidth. All Drawables except Lines implement this interface.
Method Summary | |
double |
getHeight()
Get the height of a graphical object |
Location |
getLocation()
Get a graphical object's position |
double |
getWidth()
Get the width of a graphical object |
double |
getX()
Get the x coordinate of left edge of rectangle bounding the object |
double |
getY()
Get the y coordinate of top edge of rectangle bounding the object |
boolean |
overlaps(Drawable2DInterface item)
Determines if another Drawable's bounding rectangle overlaps with this object's bounding rectangle. |
Methods inherited from interface objectdraw.DrawableInterface |
addToCanvas, contains, getCanvas, 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 Location getLocation()
public boolean overlaps(Drawable2DInterface item)
item
- the other object
true
if item intersects this object;
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |