objectdraw
Class FramedArc
java.lang.Object
|
+--objectdraw.Drawable
|
+--objectdraw.Drawable2D
|
+--objectdraw.Resizable2D
|
+--objectdraw.Rect
|
+--objectdraw.FramedArc
- All Implemented Interfaces:
- Drawable2DInterface, DrawableInterface, Resizable2DInterface, java.io.Serializable
- public class FramedArc
- extends Rect
FramedArc is an implementation of a drawable framed arc object.
- See Also:
- Serialized Form
Constructor Summary |
FramedArc(double x,
double y,
double width,
double height,
double startangle,
double arcangle,
DrawingCanvas c)
Creates a new FramedArc object. |
FramedArc(Location origin,
double width,
double height,
double startangle,
double arcangle,
DrawingCanvas c)
Creates a new FramedArc object. |
FramedArc(Location p0,
Location p1,
double startangle,
double arcangle,
DrawingCanvas c)
Creates a new FramedArc 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, contains, getColor, hide, isHidden, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, show |
FramedArc
public FramedArc(Location origin,
double width,
double height,
double startangle,
double arcangle,
DrawingCanvas c)
- Creates a new FramedArc 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.startangle
- the starting angle of the arc.arcangle
- the ending angle of the arc.c
- the canvas in which the object is created.
FramedArc
public FramedArc(double x,
double y,
double width,
double height,
double startangle,
double arcangle,
DrawingCanvas c)
- Creates a new FramedArc 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.startangle
- the starting angle of the arc.arcangle
- the ending angle of the arc.c
- the canvas in which the object is created.
FramedArc
public FramedArc(Location p0,
Location p1,
double startangle,
double arcangle,
DrawingCanvas c)
- Creates a new FramedArc object.
- Parameters:
p0
- endpoint of a diagonal of the rectanglep1
- other diagonal endpointstartangle
- the starting angle of the arc.arcangle
- the ending angle of the arc.c
- the canvas in which the object is created
getStartAngle
public double getStartAngle()
- Returns:
- startangle of this arc.
getArcAngle
public double getArcAngle()
- Returns:
- arcangle of this arc.
setStartAngle
public void setStartAngle(double startangle)
- Parameters:
new
- startangle for this arc.
setArcAngle
public void setArcAngle(double arcangle)
- Parameters:
new
- arcangle for this arc.
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.