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 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:
      draw in interface XYAnnotation
      Parameters:
      g2 - the graphics device.
      plot - the plot.
      dataArea - the data area.
      domainAxis - the domain axis.
      rangeAxis - the range axis.
    • equals

      public boolean equals​(Object object)
      Tests this annotation for equality with an object.
      Overrides:
      equals in class Object
      Parameters:
      object - the object to test against.
      Returns:
      true or false.
    • clone

      public Object clone() throws CloneNotSupportedException
      Returns a clone of the annotation.
      Returns:
      A clone.
      Throws:
      CloneNotSupportedException - if the annotation can't be cloned.