objectdraw
Class FramedArc
java.lang.Object
objectdraw.Drawable
objectdraw.Drawable2D
objectdraw.Resizable2D
objectdraw.Rectangular
objectdraw.Arc
objectdraw.FramedArc
- All Implemented Interfaces:
- Serializable, Drawable2DInterface, DrawableInterface, Resizable2DInterface
public class FramedArc
- extends Arc
- implements Resizable2DInterface
FramedArc is an implementation of a drawable framed arc object.
Only the arc itself is drawn. There are no lines connecting
the ends of the arc to the center of the bounding rectangle.
- Version:
- 1.1.1 released February 2005
- See Also:
- Serialized Form
Constructor Summary |
FramedArc(double x,
double y,
double width,
double height,
double startAngle,
double arcAngle,
DrawingCanvas canvas)
Creates a new FramedArc object. |
FramedArc(Location origin,
double width,
double height,
double startAngle,
double arcAngle,
DrawingCanvas canvas)
Creates a new FramedArc object. |
FramedArc(Location p0,
Location p1,
double startAngle,
double arcAngle,
DrawingCanvas canvas)
Creates a new FramedArc 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.Drawable |
addToCanvas, clearCanvasContent, getCanvas, getColor, hide, isHidden, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setCanvasContent, setColor, setStateChanged, show |
Methods inherited from interface objectdraw.DrawableInterface |
addToCanvas, contains, getCanvas, getColor, hide, isHidden, move, moveTo, moveTo, removeFromCanvas, sendBackward, sendForward, sendToBack, sendToFront, setColor, show |
FramedArc
public FramedArc(double x,
double y,
double width,
double height,
double startAngle,
double arcAngle,
DrawingCanvas canvas)
- 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 total angle of the arc.canvas
- the canvas in which the object is created.
FramedArc
public FramedArc(Location origin,
double width,
double height,
double startAngle,
double arcAngle,
DrawingCanvas canvas)
- 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 total angle of the arc.canvas
- the canvas in which the object is created.
FramedArc
public FramedArc(Location p0,
Location p1,
double startAngle,
double arcAngle,
DrawingCanvas canvas)
- 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 total angle of the arc.canvas
- the canvas in which the object is created
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 Arc
- Returns:
- a string representation of the object.