afreechart/src/main/java/org/afree/chart/StandardChartTheme.java
/**
     * Applies the attributes of this theme to a {@link XYPlot}.
     *
     * @param plot  the plot (<code>null</code> not permitted).
     */
Applies the attributes of this theme to a  XYPlot.
@param plot  the plot (null not permitted).
Applies the attributes of this theme to a XYPlot . @param plot the plot ( null not permitted ) .
protected void applyToXYPlot(XYPlot plot) {
        plot.setAxisOffset(this.axisOffset);
        plot.setDomainZeroBaselinePaintType(this.baselinePaintType);
        plot.setRangeZeroBaselinePaintType(this.baselinePaintType);
        plot.setDomainGridlinePaintType(this.domainGridlinePaintType);
        plot.setRangeGridlinePaintType(this.rangeGridlinePaintType);
        plot.setDomainCrosshairPaintType(this.crosshairPaintType);
        plot.setRangeCrosshairPaintType(this.crosshairPaintType);
        int domainAxisCount = plot.getDomainAxisCount();
        for (int i = 0; i < domainAxisCount; i++) {
            ValueAxis axis = plot.getDomainAxis(i);
            if (axis != null) {
                applyToValueAxis(axis);
            }
        }
        int rangeAxisCount = plot.getRangeAxisCount();
        for (int i = 0; i < rangeAxisCount; i++) {
            ValueAxis axis = (ValueAxis) plot.getRangeAxis(i);
            if (axis != null) {
                applyToValueAxis(axis);
            }
        }
        int rendererCount = plot.getRendererCount();
        for (int i = 0; i < rendererCount; i++) {
            XYItemRenderer r = plot.getRenderer(i);
            if (r != null) {
                applyToXYItemRenderer(r);
            }
        }
        Iterator iter = plot.getAnnotations().iterator();
        while (iter.hasNext()) {
            XYAnnotation a = (XYAnnotation) iter.next();
            applyToXYAnnotation(a);
        }
        if (plot instanceof CombinedDomainXYPlot) {
            CombinedDomainXYPlot cp = (CombinedDomainXYPlot) plot;
            Iterator iterator = cp.getSubplots().iterator();
            while (iterator.hasNext()) {
                XYPlot subplot = (XYPlot) iterator.next();
                if (subplot != null) {
                    applyToPlot(subplot);
                }
            }
        }
        if (plot instanceof CombinedRangeXYPlot) {
            CombinedRangeXYPlot cp = (CombinedRangeXYPlot) plot;
            Iterator iterator = cp.getSubplots().iterator();
            while (iterator.hasNext()) {
                XYPlot subplot = (XYPlot) iterator.next();
                if (subplot != null) {
                    applyToPlot(subplot);
                }
            }
        }
    }
protected void applyToXYPlot ( XYPlot plot ) { plot . setAxisOffset ( this . axisOffset ) ; plot . setDomainZeroBaselinePaintType ( this . baselinePaintType ) ; plot . setRangeZeroBaselinePaintType ( this . baselinePaintType ) ; plot . setDomainGridlinePaintType ( this . domainGridlinePaintType ) ; plot . setRangeGridlinePaintType ( this . rangeGridlinePaintType ) ; plot . setDomainCrosshairPaintType ( this . crosshairPaintType ) ; plot . setRangeCrosshairPaintType ( this . crosshairPaintType ) ; int domainAxisCount = plot . getDomainAxisCount ( ) ; for ( int i = 0 ; i < domainAxisCount ; i ++ ) { ValueAxis axis = plot . getDomainAxis ( i ) ; if ( axis != null ) { applyToValueAxis ( axis ) ; } } int rangeAxisCount = plot . getRangeAxisCount ( ) ; for ( int i = 0 ; i < rangeAxisCount ; i ++ ) { ValueAxis axis = ( ValueAxis ) plot . getRangeAxis ( i ) ; if ( axis != null ) { applyToValueAxis ( axis ) ; } } int rendererCount = plot . getRendererCount ( ) ; for ( int i = 0 ; i < rendererCount ; i ++ ) { XYItemRenderer r = plot . getRenderer ( i ) ; if ( r != null ) { applyToXYItemRenderer ( r ) ; } } Iterator iter = plot . getAnnotations ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { XYAnnotation a = ( XYAnnotation ) iter . next ( ) ; applyToXYAnnotation ( a ) ; } if ( plot instanceof CombinedDomainXYPlot ) { CombinedDomainXYPlot cp = ( CombinedDomainXYPlot ) plot ; Iterator iterator = cp . getSubplots ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { XYPlot subplot = ( XYPlot ) iterator . next ( ) ; if ( subplot != null ) { applyToPlot ( subplot ) ; } } } if ( plot instanceof CombinedRangeXYPlot ) { CombinedRangeXYPlot cp = ( CombinedRangeXYPlot ) plot ; Iterator iterator = cp . getSubplots ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { XYPlot subplot = ( XYPlot ) iterator . next ( ) ; if ( subplot != null ) { applyToPlot ( subplot ) ; } } } }
Applies the attributes of this theme to a {@link XYPlot}.
Applies the attributes of this theme to a { @link XYPlot } .
// process all domain axes // process all range axes // process all renderers // process all annotations