Class XYBoxAnnotation

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

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

    • serialVersionUID

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

      private double x0
      The lower x-coordinate.
    • y0

      private double y0
      The lower y-coordinate.
    • x1

      private double x1
      The upper x-coordinate.
    • y1

      private double y1
      The upper y-coordinate.
    • stroke

      private transient Stroke stroke
      The stroke used to draw the box outline.
    • outlinePaint

      private transient Paint outlinePaint
      The paint used to draw the box outline.
    • fillPaint

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

    • XYBoxAnnotation

      public XYBoxAnnotation(double x0, double y0, double x1, double y1)
      Creates a new annotation (where, by default, the box is drawn with a black outline).
      Parameters:
      x0 - the lower x-coordinate of the box (in data space).
      y0 - the lower y-coordinate of the box (in data space).
      x1 - the upper x-coordinate of the box (in data space).
      y1 - the upper y-coordinate of the box (in data space).
    • XYBoxAnnotation

      public XYBoxAnnotation(double x0, double y0, double x1, double y1, Stroke stroke, Paint outlinePaint)
      Creates a new annotation where the box is drawn as an outline using the specified stroke and outlinePaint.
      Parameters:
      x0 - the lower x-coordinate of the box (in data space).
      y0 - the lower y-coordinate of the box (in data space).
      x1 - the upper x-coordinate of the box (in data space).
      y1 - the upper y-coordinate of the box (in data space).
      stroke - the shape stroke (null permitted).
      outlinePaint - the shape color (null permitted).
    • XYBoxAnnotation

      public XYBoxAnnotation(double x0, double y0, double x1, double y1, Stroke stroke, Paint outlinePaint, Paint fillPaint)
      Creates a new annotation.
      Parameters:
      x0 - the lower x-coordinate of the box (in data space).
      y0 - the lower y-coordinate of the box (in data space).
      x1 - the upper x-coordinate of the box (in data space).
      y1 - the upper y-coordinate of the box (in data space).
      stroke - the shape stroke (null permitted).
      outlinePaint - the shape color (null permitted).
      fillPaint - the paint used to fill the shape (null permitted).
  • Method Details