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 Details

    • XYShapeAnnotation

      public XYShapeAnnotation​(Shape shape)
      Creates a new annotation.
      Parameters:
      shape - the shape (coordinates in data space).
    • XYShapeAnnotation

      public XYShapeAnnotation​(Shape shape, Stroke stroke, Paint paint)
      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 the XYPlot class, you shouldn't need to call it directly.
      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.