objectdraw
Class FramedRoundedRect

java.lang.Object
  extended by objectdraw.Drawable
      extended by objectdraw.Drawable2D
          extended by objectdraw.Resizable2D
              extended by objectdraw.Rectangular
                  extended by objectdraw.RoundedRect
                      extended by objectdraw.FramedRoundedRect
All Implemented Interfaces:
Serializable, Drawable2DInterface, DrawableInterface, Resizable2DInterface

public class FramedRoundedRect
extends RoundedRect
implements Resizable2DInterface

FramedRoundedRect is an implementation of a drawable framed rounded rectangle object.

Version:
1.1.1 released February 2005
See Also:
Serialized Form

Field Summary
 
Fields inherited from class objectdraw.RoundedRect
arcHeight, arcWidth
 
Fields inherited from class objectdraw.Rectangular
height, width, x, y
 
Fields inherited from class objectdraw.Drawable
canvasContent, color, shown
 
Constructor Summary
FramedRoundedRect(double x, double y, double width, double height, double arcWidth, double arcHeight, DrawingCanvas canvas)
          Creates a new FramedRoundedRect object.
FramedRoundedRect(Location origin, double width, double height, double arcWidth, double arcHeight, DrawingCanvas canvas)
          Creates a new FramedRoundedRect object.
FramedRoundedRect(Location p0, Location p1, double arcWidth, double arcHeight, DrawingCanvas canvas)
          Creates a new FramedRoundedRect object.
 
Method Summary
(package private)  void draw(Graphics g)
          Draws the object.
 String toString()
          Generates a string representation of the object.
 
Methods inherited from class objectdraw.RoundedRect
contains, getArcHeight, getArcWidth, setArcHeight, setArcWidth
 
Methods inherited from class objectdraw.Rectangular
getBounds, getHeight, getWidth, setBounds, setHeight, setSize, setWidth
 
Methods inherited from class objectdraw.Resizable2D
move, moveTo
 
Methods inherited from class objectdraw.Drawable2D
getLocation, getX, getY, overlaps
 
Methods inherited from class objectdraw.Drawable
addToCanvas, clearCanvasContent, getCanvas, getColor, hide, isHidden, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setCanvasContent, setColor, setStateChanged, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface objectdraw.Resizable2DInterface
setHeight, setSize, setWidth
 
Methods inherited from interface objectdraw.Drawable2DInterface
getHeight, getLocation, getWidth, getX, getY, overlaps
 
Methods inherited from interface objectdraw.DrawableInterface
addToCanvas, contains, getCanvas, getColor, hide, isHidden, move, moveTo, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, show
 

Constructor Detail

FramedRoundedRect

public FramedRoundedRect(double x,
                         double y,
                         double width,
                         double height,
                         double arcWidth,
                         double arcHeight,
                         DrawingCanvas canvas)
Creates a new FramedRoundedRect object.

Parameters:
x - coordinate of the upper left corner of the bounding rectangle.
y - coordinate of the upper left corner of the bounding rectangle.
width - the width of the bounding rectangle.
height - the height of the bounding rectangle.
arcWidth - the width of the corner arc.
arcHeight - the height of the corner arc.
canvas - the canvas in which the object is created.

FramedRoundedRect

public FramedRoundedRect(Location origin,
                         double width,
                         double height,
                         double arcWidth,
                         double arcHeight,
                         DrawingCanvas canvas)
Creates a new FramedRoundedRect object.

Parameters:
origin - the upper left corner of the bounding rectangle.
width - the width of the bounding rectangle.
height - the height of the bounding rectangle.
arcWidth - the width of the corner arc.
arcHeight - the height of the corner arc.
canvas - the canvas in which the object is created.

FramedRoundedRect

public FramedRoundedRect(Location p0,
                         Location p1,
                         double arcWidth,
                         double arcHeight,
                         DrawingCanvas canvas)
Creates a new FramedRoundedRect object.

Parameters:
p0 - the upper left corner of the bounding rectangle.
p1 - the other diagonal endpoint.
arcWidth - the width of the corner arc.
arcHeight - the height of the corner arc.
canvas - the canvas in which the object is created.
Method Detail

draw

void draw(Graphics g)
Draws the object.

Overrides:
draw in class Drawable2D
Parameters:
g - the graphics context into which the object is drawn

toString

public String toString()
Generates a string representation of the object.

Overrides:
toString in class RoundedRect
Returns:
a string representation of the object.