org.jfree.chart.annotations
Class XYShapeAnnotation
java.lang.Object
org.jfree.chart.annotations.XYShapeAnnotation
- All Implemented Interfaces:
- java.io.Serializable, XYAnnotation
- public class XYShapeAnnotation
- extends java.lang.Object
- implements XYAnnotation, java.io.Serializable
A simple Shape
annotation that can be placed on an XYPlot
.
- Author:
- Greg Steckman
- See Also:
- Serialized Form
Constructor Summary |
XYShapeAnnotation(java.awt.Shape shape,
java.awt.Stroke stroke,
java.awt.Paint paint)
Creates a new annotation to be displayed. |
Method Summary |
void |
draw(java.awt.Graphics2D g2,
XYPlot plot,
java.awt.geom.Rectangle2D dataArea,
ValueAxis domainAxis,
ValueAxis rangeAxis)
Draws the annotation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XYShapeAnnotation
public XYShapeAnnotation(java.awt.Shape shape,
java.awt.Stroke stroke,
java.awt.Paint paint)
- Creates a new annotation to be displayed.
- Parameters:
shape
- the shape.stroke
- the shape stroke.paint
- the shape color.
draw
public void draw(java.awt.Graphics2D g2,
XYPlot plot,
java.awt.geom.Rectangle2D dataArea,
ValueAxis domainAxis,
ValueAxis rangeAxis)
- Draws the annotation.
- Specified by:
draw
in interface XYAnnotation
- Parameters:
g2
- the graphics device.plot
- the plot.dataArea
- the data area.domainAxis
- the domain axis.rangeAxis
- the range axis.