afreechart/src/main/java/org/afree/chart/axis/SymbolAxis.java
/**
     * Draws the grid bands for the axis when it is at the top or bottom of
     * the plot.
     *
     * @param canvas  the graphics device.
     * @param plotArea  the area within which the chart should be drawn.
     * @param dataArea  the area within which the plot should be drawn
     *                  (a subset of the drawArea).
     * @param firstGridBandIsDark  True: the first grid band takes the
     *                             color of <CODE>gridBandPaint<CODE>.
     *                             False: the second grid band takes the
     *                             color of <CODE>gridBandPaint<CODE>.
     * @param ticks  the ticks.
     */
Draws the grid bands for the axis when it is at the top or bottom of
the plot.

@param canvas  the graphics device.
@param plotArea  the area within which the chart should be drawn.
@param dataArea  the area within which the plot should be drawn
(a subset of the drawArea).
@param firstGridBandIsDark  True: the first grid band takes the
color of gridBandPaint.
False: the second grid band takes the
color of gridBandPaint.
@param ticks  the ticks.
Draws the grid bands for the axis when it is at the top or bottom of the plot . @param canvas the graphics device . @param plotArea the area within which the chart should be drawn . @param dataArea the area within which the plot should be drawn ( a subset of the drawArea ) . @param firstGridBandIsDark True : the first grid band takes the color of gridBandPaint . False : the second grid band takes the color of gridBandPaint . @param ticks the ticks .
protected void drawGridBandsHorizontal(Canvas canvas,
                                           RectShape plotArea,
                                           RectShape dataArea,
                                           boolean firstGridBandIsDark,
                                           List ticks) {
        boolean currentGridBandIsDark = firstGridBandIsDark;
        double yy = dataArea.getY();
        double xx1, xx2;
        float outlineStrokeWidth;
        if (getPlot().getOutlineStroke() !=  0.0f) {
            outlineStrokeWidth
                = getPlot().getOutlineStroke();
        }
        else {
            outlineStrokeWidth = 1f;
        }
        Iterator iterator = ticks.iterator();
        ValueTick tick;
        RectShape band;
        while (iterator.hasNext()) {
            tick = (ValueTick) iterator.next();
            xx1 = valueToJava2D(tick.getValue() - 0.5d, dataArea,
                    RectangleEdge.BOTTOM);
            xx2 = valueToJava2D(tick.getValue() + 0.5d, dataArea,
                    RectangleEdge.BOTTOM);
            PaintType paintType;
            if (currentGridBandIsDark) {
                paintType = this.gridBandPaintType;
            }
            else {
                paintType = this.gridBandAlternatePaintType;
            }
            Paint paint = PaintUtility.createPaint(Paint.ANTI_ALIAS_FLAG, paintType);
            band = new RectShape(xx1, yy + outlineStrokeWidth,
                xx2 - xx1, dataArea.getMaxY() - yy - outlineStrokeWidth);
            band.fill(canvas, paint);
            currentGridBandIsDark = !currentGridBandIsDark;
        }
    }
protected void drawGridBandsHorizontal ( Canvas canvas , RectShape plotArea , RectShape dataArea , boolean firstGridBandIsDark , List ticks ) { boolean currentGridBandIsDark = firstGridBandIsDark ; double yy = dataArea . getY ( ) ; double xx1 , xx2 ; float outlineStrokeWidth ; if ( getPlot ( ) . getOutlineStroke ( ) != 0.0f ) { outlineStrokeWidth = getPlot ( ) . getOutlineStroke ( ) ; } else { outlineStrokeWidth = 1f ; } Iterator iterator = ticks . iterator ( ) ; ValueTick tick ; RectShape band ; while ( iterator . hasNext ( ) ) { tick = ( ValueTick ) iterator . next ( ) ; xx1 = valueToJava2D ( tick . getValue ( ) - 0.5d , dataArea , RectangleEdge . BOTTOM ) ; xx2 = valueToJava2D ( tick . getValue ( ) + 0.5d , dataArea , RectangleEdge . BOTTOM ) ; PaintType paintType ; if ( currentGridBandIsDark ) { paintType = this . gridBandPaintType ; } else { paintType = this . gridBandAlternatePaintType ; } Paint paint = PaintUtility . createPaint ( Paint . ANTI_ALIAS_FLAG , paintType ) ; band = new RectShape ( xx1 , yy + outlineStrokeWidth , xx2 - xx1 , dataArea . getMaxY ( ) - yy - outlineStrokeWidth ) ; band . fill ( canvas , paint ) ; currentGridBandIsDark = ! currentGridBandIsDark ; } }
Draws the grid bands for the axis when it is at the top or bottom of
 the plot.
Draws the grid bands for the axis when it is at the top or bottom of the plot .
//gets the outline stroke width of the plot