objectdraw
Class Resizable2D

java.lang.Object
  |
  +--objectdraw.Drawable
        |
        +--objectdraw.Drawable2D
              |
              +--objectdraw.Resizable2D
All Implemented Interfaces:
Drawable2DInterface, DrawableInterface, Resizable2DInterface, java.io.Serializable
Direct Known Subclasses:
Rect, VisibleImage

public abstract class Resizable2D
extends Drawable2D
implements Resizable2DInterface

Resizable2D is the implementation of the Resizable2D interface which defines mutator methods for two dimensional, drawable objects.

See Also:
Serialized Form

Fields inherited from class objectdraw.Drawable
canvas, canvasContent, color, DEBUGGING, shown
 
Constructor Summary
Resizable2D()
           
 
Method Summary
 void move(double dx, double dy)
          Moves the object within the canvas by the amount specified in the x and y directions.
 void moveTo(Location point)
          Moves the object within the canvas to the specified point.
 
Methods inherited from class objectdraw.Drawable2D
contains, draw, getHeight, getLocation, getX, getY, overlaps
 
Methods inherited from class objectdraw.Drawable
addToCanvas, getColor, hide, isHidden, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, setStateChanged, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface objectdraw.Resizable2DInterface
setBounds, setHeight, setWidth
 
Methods inherited from interface objectdraw.Drawable2DInterface
getBounds, getHeight, getLocation, getWidth, getX, getY, overlaps
 
Methods inherited from interface objectdraw.DrawableInterface
addToCanvas, contains, draw, getColor, hide, isHidden, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, show
 

Constructor Detail

Resizable2D

public Resizable2D()
Method Detail

moveTo

public void moveTo(Location point)
Moves the object within the canvas to the specified point.
Specified by:
moveTo in interface DrawableInterface
Overrides:
moveTo in class Drawable
Parameters:
point - the coordinates of the upper left corner of the object's new bounding box

move

public void move(double dx,
                 double dy)
Moves the object within the canvas by the amount specified in the x and y directions.
Specified by:
move in interface DrawableInterface
Overrides:
move in class Drawable
Parameters:
dx - the amount to move in the x-direction
dy - the amount to move in the y-direction