objectdraw
Interface Drawable2DInterface

All Superinterfaces:
DrawableInterface, LocatableInterface
All Known Implementing Classes:
FilledArc, FilledOval, FilledRect, FilledRoundedRect, FramedArc, FramedOval, FramedRect, FramedRoundedRect, objectdraw.ObjectDrawRectangularShape, Text, VisibleImage

public interface Drawable2DInterface
extends LocatableInterface

Drawable2DInterface is the interface shared by all two dimensional graphical objects - rectangles, ovals, arcs, and text.

Author:
Russell Zahniser (russell@zahniser.net)

Method Summary
 double getDoubleHeight()
          Return the height of the rectangle bounding this object, in double precision.
 double getDoubleWidth()
          Return the height of the rectangle bounding this object, in double precision.
 int getHeight()
          Return the width of the rectangle bounding this object.
 int getWidth()
          Return the height of the rectangle bounding this object.
 boolean overlaps(Drawable2DInterface other)
          Return true if the rectangle bounding this object overlaps with the rectangle bounding another object; false otherwise.
 
Methods inherited from interface objectdraw.LocatableInterface
getDoubleX, getDoubleY, getLocation, getX, getY
 
Methods inherited from interface objectdraw.DrawableInterface
addToCanvas, contains, getCanvas, getColor, hide, isHidden, move, moveTo, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, show
 

Method Detail

getDoubleHeight

double getDoubleHeight()
Return the height of the rectangle bounding this object, in double precision.

Returns:
the height of the rectangle bounding this object, in double precision.

getDoubleWidth

double getDoubleWidth()
Return the height of the rectangle bounding this object, in double precision.

Returns:
the height of the rectangle bounding this object, in double precision.

getHeight

int getHeight()
Return the width of the rectangle bounding this object.

Returns:
the width of the rectangle bounding this object.

getWidth

int getWidth()
Return the height of the rectangle bounding this object.

Returns:
the height of the rectangle bounding this object.

overlaps

boolean overlaps(Drawable2DInterface other)
Return true if the rectangle bounding this object overlaps with the rectangle bounding another object; false otherwise.

Parameters:
other - another two dimensional object to check for overlapping with
Returns:
whether the bounding rectangles of the two objects overlap