Package org.jfree.chart.annotations
Class XYDrawableAnnotation
java.lang.Object
org.jfree.chart.annotations.XYDrawableAnnotation
- All Implemented Interfaces:
Serializable,Cloneable,XYAnnotation
public class XYDrawableAnnotation extends Object implements XYAnnotation, Cloneable, Serializable
A general annotation that can be placed on an
XYPlot.- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description XYDrawableAnnotation(double x, double y, double width, double height, org.jfree.ui.Drawable drawable)Creates a new annotation to be displayed within the given area. -
Method Summary
Modifier and Type Method Description Objectclone()Returns a clone of the annotation.voiddraw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis)Draws the annotation.booleanequals(Object object)Tests this annotation for equality with an object.
-
Constructor Details
-
XYDrawableAnnotation
public XYDrawableAnnotation(double x, double y, double width, double height, org.jfree.ui.Drawable drawable)Creates a new annotation to be displayed within the given area.- Parameters:
x- the x-coordinate for the area.y- the y-coordinate for the area.width- the width of the area.height- the height of the area.drawable- the drawable object.
-
-
Method Details
-
draw
public void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis)Draws the annotation.- Specified by:
drawin interfaceXYAnnotation- Parameters:
g2- the graphics device.plot- the plot.dataArea- the data area.domainAxis- the domain axis.rangeAxis- the range axis.
-
equals
Tests this annotation for equality with an object. -
clone
Returns a clone of the annotation.- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if the annotation can't be cloned.
-