afreechart/src/main/java/org/afree/chart/plot/XYPlot.java
/**
     * Adds a marker for a specific dataset/renderer and, if requested, sends a
     * {@link PlotChangeEvent} to all registered listeners.
     * <P>
     * Typically a marker will be drawn by the renderer as a line perpendicular
     * to the range axis, however this is entirely up to the renderer.
     * 
     * @param index
     *            the dataset/renderer index.
     * @param marker
     *            the marker.
     * @param layer
     *            the layer (foreground or background).
     * @param notify
     *            notify listeners?
     * 
     * @since JFreeChart 1.0.10
     */
Adds a marker for a specific dataset/renderer and, if requested, sends a
PlotChangeEvent to all registered listeners.

Typically a marker will be drawn by the renderer as a line perpendicular
to the range axis, however this is entirely up to the renderer.

@param index
the dataset/renderer index.
@param marker
the marker.
@param layer
the layer (foreground or background).


Adds a marker for a specific dataset / renderer and if requested sends a PlotChangeEvent to all registered listeners . Typically a marker will be drawn by the renderer as a line perpendicular to the range axis however this is entirely up to the renderer . @param index the dataset / renderer index . @param marker the marker . @param layer the layer ( foreground or background ) .
public void addRangeMarker(int index, Marker marker, Layer layer,
            boolean notify) {
        Collection markers;
        if (layer == Layer.FOREGROUND) {
            markers = (Collection) this.foregroundRangeMarkers.get(new Integer(
                    index));
            if (markers == null) {
                markers = new java.util.ArrayList();
                this.foregroundRangeMarkers.put(new Integer(index), markers);
            }
            markers.add(marker);
        } else if (layer == Layer.BACKGROUND) {
            markers = (Collection) this.backgroundRangeMarkers.get(new Integer(
                    index));
            if (markers == null) {
                markers = new java.util.ArrayList();
                this.backgroundRangeMarkers.put(new Integer(index), markers);
            }
            markers.add(marker);
        }
        marker.addChangeListener(this);
        if (notify) {
            fireChangeEvent();
        }
    }
public void addRangeMarker ( int index , Marker marker , Layer layer , boolean notify ) { Collection markers ; if ( layer == Layer . FOREGROUND ) { markers = ( Collection ) this . foregroundRangeMarkers . get ( new Integer ( index ) ) ; if ( markers == null ) { markers = new java . util . ArrayList ( ) ; this . foregroundRangeMarkers . put ( new Integer ( index ) , markers ) ; } markers . add ( marker ) ; } else if ( layer == Layer . BACKGROUND ) { markers = ( Collection ) this . backgroundRangeMarkers . get ( new Integer ( index ) ) ; if ( markers == null ) { markers = new java . util . ArrayList ( ) ; this . backgroundRangeMarkers . put ( new Integer ( index ) , markers ) ; } markers . add ( marker ) ; } marker . addChangeListener ( this ) ; if ( notify ) { fireChangeEvent ( ) ; } }
Adds a marker for a specific dataset/renderer and, if requested, sends a
 {@link PlotChangeEvent} to all registered listeners.
Adds a marker for a specific dataset / renderer and if requested sends a { @link PlotChangeEvent } to all registered listeners .