|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectobjectdraw.Drawable
objectdraw.Drawable2D
objectdraw.Resizable2D
objectdraw.Rectangular
objectdraw.RoundedRect
abstract class RoundedRect
RoundedRect is an abstract base class for drawable rounded rectangular objects.
Field Summary | |
---|---|
protected double |
arcHeight
|
protected double |
arcWidth
|
Fields inherited from class objectdraw.Rectangular |
---|
height, width, x, y |
Fields inherited from class objectdraw.Drawable |
---|
canvasContent, color, shown |
Constructor Summary | |
---|---|
RoundedRect(double x,
double y,
double width,
double height,
double arcWidth,
double arcHeight,
DrawingCanvas canvas)
Creates a new RoundedRect object. |
|
RoundedRect(Location origin,
double width,
double height,
double arcWidth,
double arcHeight,
DrawingCanvas canvas)
Creates a new RoundedRect object. |
|
RoundedRect(Location p0,
Location p1,
double arcWidth,
double arcHeight,
DrawingCanvas canvas)
Creates a new RoundedRect object. |
Method Summary | |
---|---|
boolean |
contains(Location point)
Determines if a particular position on the DrawingCanvas is contained within the object. |
double |
getArcHeight()
Gets the height of the arc that rounds off the corners. |
double |
getArcWidth()
Gets the width of the arc that rounds off the corners. |
void |
setArcHeight(double arcHeight)
Change the arc height for the rounded corners of a rounded rectangle |
void |
setArcWidth(double arcWidth)
Change the width for the rounded corners of a rounded rectangle |
String |
toString()
Generates a string representation of the object. |
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 |
---|
draw, 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.Drawable2DInterface |
---|
getLocation, getX, getY, overlaps |
Methods inherited from interface objectdraw.DrawableInterface |
---|
addToCanvas, getCanvas, getColor, hide, isHidden, move, moveTo, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, show |
Field Detail |
---|
protected double arcHeight
protected double arcWidth
Constructor Detail |
---|
public RoundedRect(double x, double y, double width, double height, double arcWidth, double arcHeight, DrawingCanvas canvas)
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.public RoundedRect(Location origin, double width, double height, double arcWidth, double arcHeight, DrawingCanvas canvas)
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.public RoundedRect(Location p0, Location p1, double arcWidth, double arcHeight, DrawingCanvas canvas)
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 |
---|
public boolean contains(Location point)
DrawableInterface
contains
in interface DrawableInterface
contains
in class Drawable2D
point
- the position on the canvas.
public double getArcHeight()
public double getArcWidth()
public void setArcHeight(double arcHeight)
arcHeight
- angle height for this rect.public void setArcWidth(double arcWidth)
arcWidth
- angle width for this rect.public String toString()
toString
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |