objectdraw
Class FramedRoundedRect
java.lang.Object
|
+--objectdraw.Drawable
|
+--objectdraw.Drawable2D
|
+--objectdraw.Resizable2D
|
+--objectdraw.Rect
|
+--objectdraw.FramedRoundedRect
- All Implemented Interfaces:
- Drawable2DInterface, DrawableInterface, Resizable2DInterface, java.io.Serializable
- public class FramedRoundedRect
- extends Rect
FramedRoundedRect is an implementation of a drawable framed rounded rectangle object.
- See Also:
- Serialized Form
Constructor Summary |
FramedRoundedRect(double x,
double y,
double width,
double height,
double arcwidth,
double archeight,
DrawingCanvas c)
Creates a new FramedRoundedRect object. |
FramedRoundedRect(Location origin,
double width,
double height,
double arcwidth,
double archeight,
DrawingCanvas c)
Creates a new FramedRoundedRect object. |
FramedRoundedRect(Location p0,
Location p1,
double arcwidth,
double archeight,
DrawingCanvas c)
Creates a new FramedRoundedRect object. |
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, wait, wait, wait |
Methods inherited from interface objectdraw.DrawableInterface |
addToCanvas, getColor, hide, isHidden, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, show |
FramedRoundedRect
public FramedRoundedRect(Location origin,
double width,
double height,
double arcwidth,
double archeight,
DrawingCanvas c)
- 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.c
- the canvas in which the object is created.
FramedRoundedRect
public FramedRoundedRect(double x,
double y,
double width,
double height,
double arcwidth,
double archeight,
DrawingCanvas c)
- 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.c
- the canvas in which the object is created.
FramedRoundedRect
public FramedRoundedRect(Location p0,
Location p1,
double arcwidth,
double archeight,
DrawingCanvas c)
- 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.c
- the canvas in which the object is created.
getArcWidth
public double getArcWidth()
- Returns:
- angle width of this rect.
getArcHeight
public double getArcHeight()
- Returns:
- angle height of this rect.
setArcWidth
public void setArcWidth(double arcwidth)
- Parameters:
new
- angle width for this rect.
setArcHeight
public void setArcHeight(double archeight)
- Parameters:
new
- angle height for this rect.
contains
public boolean contains(Location point)
- Determines if the rounded rect contains the given point.
- Overrides:
contains
in class Drawable2D
- Parameters:
point
- the point- Returns:
true
if point is contained in oval.
false
otherwise.
draw
public void draw(java.awt.Graphics g)
- Draws the object.
- Overrides:
draw
in class Drawable2D
- Parameters:
g
- the graphics context into which the object is drawn
toString
public java.lang.String toString()
- Generates a string representation of the object.
- Overrides:
toString
in class java.lang.Object
- Returns:
- a string representation of the object.