objectdraw
Interface Resizable2DInterface

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

public interface Resizable2DInterface
extends DrawableInterface

Resizable2DInterface is the interface shared by all two dimensional object that can be resized. This includes all the rectangles, ovals, arcs, and rounded rectangles, but not text or turtles.

Author:
Russell Zahniser (russell@zahniser.net)

Method Summary
 void setHeight(double h)
          Set the height of this object, leaving its top edge in place and stretching the bottom.
 void setSize(double width, double height)
          Set the width and height of this object.
 void setWidth(double w)
          Set the width of this object, leaving its left edge in place and stretching the right.
 
Methods inherited from interface objectdraw.DrawableInterface
addToCanvas, contains, getCanvas, getColor, hide, isHidden, move, moveTo, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, show
 

Method Detail

setHeight

void setHeight(double h)
Set the height of this object, leaving its top edge in place and stretching the bottom.

Parameters:
h - new height

setSize

void setSize(double width,
             double height)
Set the width and height of this object. Its upper left corner will stay fixed in place, and the opposite corner will move to make it the new size.

Parameters:
width - new width
height - new height

setWidth

void setWidth(double w)
Set the width of this object, leaving its left edge in place and stretching the right.

Parameters:
w - new width