Package org.jfree.chart.annotations
Class XYShapeAnnotation
java.lang.Object
org.jfree.chart.annotations.XYShapeAnnotation
- All Implemented Interfaces:
Serializable
,XYAnnotation
public class XYShapeAnnotation extends Object implements XYAnnotation, Serializable
A simple
Shape
annotation that can be placed on an
XYPlot
. The shape coordinates are specified in data space.- Author:
- Greg Steckman
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description XYShapeAnnotation(Shape shape)
Creates a new annotation.XYShapeAnnotation(Shape shape, Stroke stroke, Paint paint)
Creates a new annotation. -
Method Summary
Modifier and Type Method Description void
draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis)
Draws the annotation.
-
Constructor Details
-
XYShapeAnnotation
Creates a new annotation.- Parameters:
shape
- the shape (coordinates in data space).
-
XYShapeAnnotation
Creates a new annotation.- Parameters:
shape
- the shape (null
not permitted).stroke
- the shape stroke (null
not permitted).paint
- the shape color (null
not permitted).
-
-
Method Details
-
draw
public void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis)Draws the annotation. This method is usually called by theXYPlot
class, you shouldn't need to call it directly.- Specified by:
draw
in interfaceXYAnnotation
- Parameters:
g2
- the graphics device.plot
- the plot.dataArea
- the data area.domainAxis
- the domain axis.rangeAxis
- the range axis.
-