afreechart/src/main/java/org/afree/chart/renderer/xy/AbstractXYItemRenderer.java
/**
     * Adds an annotation to the specified layer and sends a
     * {@link RendererChangeEvent} to all registered listeners.
     * 
     * @param annotation
     *            the annotation (<code>null</code> not permitted).
     * @param layer
     *            the layer (<code>null</code> not permitted).
     */
Adds an annotation to the specified layer and sends a
RendererChangeEvent to all registered listeners.

@param annotation
the annotation (null not permitted).
@param layer
the layer (null not permitted).
Adds an annotation to the specified layer and sends a RendererChangeEvent to all registered listeners . @param annotation the annotation ( null not permitted ) . @param layer the layer ( null not permitted ) .
public void addAnnotation(XYAnnotation annotation, Layer layer) {
        if (annotation == null) {
            throw new IllegalArgumentException("Null 'annotation' argument.");
        }
        if (layer.equals(Layer.FOREGROUND)) {
            this.foregroundAnnotations.add(annotation);
             fireChangeEvent();
        } else if (layer.equals(Layer.BACKGROUND)) {
            this.backgroundAnnotations.add(annotation);
             fireChangeEvent();
        } else {
            throw new RuntimeException("Unknown layer.");
        }
    }
public void addAnnotation ( XYAnnotation annotation , Layer layer ) { if ( annotation == null ) { throw new IllegalArgumentException ( "Null 'annotation' argument." ) ; } if ( layer . equals ( Layer . FOREGROUND ) ) { this . foregroundAnnotations . add ( annotation ) ; fireChangeEvent ( ) ; } else if ( layer . equals ( Layer . BACKGROUND ) ) { this . backgroundAnnotations . add ( annotation ) ; fireChangeEvent ( ) ; } else { throw new RuntimeException ( "Unknown layer." ) ; } }
Adds an annotation to the specified layer and sends a
 {@link RendererChangeEvent} to all registered listeners.
Adds an annotation to the specified layer and sends a { @link RendererChangeEvent } to all registered listeners .
// should never get here