Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jfree.chart.annotations
Class XYShapeAnnotation

    java.lang.Object
      org.jfree.chart.annotations.XYShapeAnnotation

All Implemented Interfaces:
  java.io.Serializable, XYAnnotation

public class XYShapeAnnotation
extends java.lang.Object
implements XYAnnotation, java.io.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 Summary
`XYShapeAnnotation(java.awt.Shape shape)` Creates a new annotation.
`XYShapeAnnotation(java.awt.Shape shape, java.awt.Stroke stroke, java.awt.Paint paint)` Creates a new annotation.

Method Summary
`void` | `draw(java.awt.Graphics2D g2, XYPlot plot, java.awt.geom.Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis)` Draws the annotation.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XYShapeAnnotation

    public XYShapeAnnotation(java.awt.Shape shape)

  Creates a new annotation.

Parameters:
  `shape` - the shape (coordinates in data space).

### XYShapeAnnotation

    public XYShapeAnnotation(java.awt.Shape shape,
                             java.awt.Stroke stroke,
                             java.awt.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 Detail

### draw

    public void draw(java.awt.Graphics2D g2,
                     XYPlot plot,
                     java.awt.geom.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.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD