Class XYShapeAnnotation

All Implemented Interfaces:
Serializable, Cloneable, Annotation, XYAnnotation, PublicCloneable

public class XYShapeAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable
A simple Shape annotation that can be placed on an XYPlot. The shape coordinates are specified in data space.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For serialization.
      See Also:
    • shape

      private transient Shape shape
      The shape.
    • stroke

      private transient Stroke stroke
      The stroke used to draw the shape's outline.
    • outlinePaint

      private transient Paint outlinePaint
      The paint used to draw the shape's outline.
    • fillPaint

      private transient Paint fillPaint
      The paint used to fill the shape.
  • Constructor Details

    • XYShapeAnnotation

      public XYShapeAnnotation(Shape shape)
      Creates a new annotation (where, by default, the shape is drawn with a black outline).
      Parameters:
      shape - the shape (coordinates in data space, null not permitted).
    • XYShapeAnnotation

      public XYShapeAnnotation(Shape shape, Stroke stroke, Paint outlinePaint)
      Creates a new annotation where the shape is drawn as an outline using the specified stroke and outlinePaint.
      Parameters:
      shape - the shape (null not permitted).
      stroke - the shape stroke (null permitted).
      outlinePaint - the shape color (null permitted).
    • XYShapeAnnotation

      public XYShapeAnnotation(Shape shape, Stroke stroke, Paint outlinePaint, Paint fillPaint)
      Creates a new annotation.
      Parameters:
      shape - the shape (null not permitted).
      stroke - the shape stroke (null permitted).
      outlinePaint - the shape color (null permitted).
      fillPaint - the paint used to fill the shape (null permitted.
  • Method Details