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 drawArea  the area within which the chart should be drawn.
     * @param plotArea  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  a list of 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 drawArea  the area within which the chart should be drawn.
@param plotArea  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  a list of 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 drawArea the area within which the chart should be drawn . @param plotArea 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 a list of ticks .
protected void drawGridBandsVertical(Canvas canvas,
                                         RectShape drawArea,
                                         RectShape plotArea,
                                         boolean firstGridBandIsDark,
                                         List ticks) {
        boolean currentGridBandIsDark = firstGridBandIsDark;
        double xx = plotArea.getX();
        double yy1, yy2;
        double outlineStrokeWidth;
        float outlineStroke = getPlot().getOutlineStroke();
        if (outlineStroke != 0.0f) {
            outlineStrokeWidth = outlineStroke;
        }
        else {
            outlineStrokeWidth = 1f;
        }
        Iterator iterator = ticks.iterator();
        ValueTick tick;
        RectShape band;
        while (iterator.hasNext()) {
            tick = (ValueTick) iterator.next();
            yy1 = valueToJava2D(tick.getValue() + 0.5d, plotArea,
                    RectangleEdge.LEFT);
            yy2 = valueToJava2D(tick.getValue() - 0.5d, plotArea,
                    RectangleEdge.LEFT);
            PaintType paintType;
            if (currentGridBandIsDark) {
                paintType = this.gridBandPaintType;
            }
            else {
                paintType = this.gridBandAlternatePaintType;
            }
            Paint paint = PaintUtility.createPaint(Paint.ANTI_ALIAS_FLAG, paintType);
            band = new RectShape(xx + outlineStrokeWidth, yy1,
                    plotArea.getMaxX() - xx - outlineStrokeWidth, yy2 - yy1);
            band.fill(canvas, paint);
            currentGridBandIsDark = !currentGridBandIsDark;
        }
    }
protected void drawGridBandsVertical ( Canvas canvas , RectShape drawArea , RectShape plotArea , boolean firstGridBandIsDark , List ticks ) { boolean currentGridBandIsDark = firstGridBandIsDark ; double xx = plotArea . getX ( ) ; double yy1 , yy2 ; double outlineStrokeWidth ; float outlineStroke = getPlot ( ) . getOutlineStroke ( ) ; if ( outlineStroke != 0.0f ) { outlineStrokeWidth = outlineStroke ; } else { outlineStrokeWidth = 1f ; } Iterator iterator = ticks . iterator ( ) ; ValueTick tick ; RectShape band ; while ( iterator . hasNext ( ) ) { tick = ( ValueTick ) iterator . next ( ) ; yy1 = valueToJava2D ( tick . getValue ( ) + 0.5d , plotArea , RectangleEdge . LEFT ) ; yy2 = valueToJava2D ( tick . getValue ( ) - 0.5d , plotArea , RectangleEdge . LEFT ) ; PaintType paintType ; if ( currentGridBandIsDark ) { paintType = this . gridBandPaintType ; } else { paintType = this . gridBandAlternatePaintType ; } Paint paint = PaintUtility . createPaint ( Paint . ANTI_ALIAS_FLAG , paintType ) ; band = new RectShape ( xx + outlineStrokeWidth , yy1 , plotArea . getMaxX ( ) - xx - outlineStrokeWidth , yy2 - yy1 ) ; 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