afreechart/src/main/java/org/afree/chart/StandardChartTheme.java
/**
     * Applies the settings of this theme to the specified renderer.
     *
     * @param renderer  the renderer (<code>null</code> not permitted).
     */
Applies the settings of this theme to the specified renderer.
@param renderer  the renderer (null not permitted).
Applies the settings of this theme to the specified renderer . @param renderer the renderer ( null not permitted ) .
protected void applyToCategoryItemRenderer(CategoryItemRenderer renderer) {
        if (renderer == null) {
            throw new IllegalArgumentException("Null 'renderer' argument.");
        }
        if (renderer instanceof AbstractRenderer) {
            applyToAbstractRenderer((AbstractRenderer) renderer);
        }
        renderer.setBaseItemLabelFont(this.regularFont);
        renderer.setBaseItemLabelPaintType(this.itemLabelPaintType);
        if (renderer instanceof BarRenderer) {
            BarRenderer br = (BarRenderer) renderer;
            br.setBarPainter(this.barPainter);
            br.setShadowVisible(this.shadowVisible);
            br.setShadowPaintType(this.shadowPaintType);
        }
        3D
        if (renderer instanceof BarRenderer3D) {
            BarRenderer3D br3d = (BarRenderer3D) renderer;
            br3d.setWallPaintType(this.wallPaintType);
        }
          StatisticalBarRenderer
        if (renderer instanceof StatisticalBarRenderer) {
            StatisticalBarRenderer sbr = (StatisticalBarRenderer) renderer;
            sbr.setErrorIndicatorPaint(this.errorIndicatorPaint);
         MinMaxCategoryRenderer
        if (renderer instanceof MinMaxCategoryRenderer) {
            MinMaxCategoryRenderer mmcr = (MinMaxCategoryRenderer) renderer;
            mmcr.setGroupPaint(this.errorIndicatorPaint);
    }
protected void applyToCategoryItemRenderer ( CategoryItemRenderer renderer ) { if ( renderer == null ) { throw new IllegalArgumentException ( "Null 'renderer' argument." ) ; } if ( renderer instanceof AbstractRenderer ) { applyToAbstractRenderer ( ( AbstractRenderer ) renderer ) ; } renderer . setBaseItemLabelFont ( this . regularFont ) ; renderer . setBaseItemLabelPaintType ( this . itemLabelPaintType ) ; if ( renderer instanceof BarRenderer ) { BarRenderer br = ( BarRenderer ) renderer ; br . setBarPainter ( this . barPainter ) ; br . setShadowVisible ( this . shadowVisible ) ; br . setShadowPaintType ( this . shadowPaintType ) ; } if ( renderer instanceof BarRenderer3D ) { BarRenderer3D br3d = ( BarRenderer3D ) renderer ; br3d . setWallPaintType ( this . wallPaintType ) ; } }
Applies the settings of this theme to the specified renderer.
Applies the settings of this theme to the specified renderer .
// now we handle some special cases - yes, UGLY code alert! // BarRenderer // BarRenderer3D //        // LineRenderer3D //        if (renderer instanceof LineRenderer3D) { //            LineRenderer3D lr3d = (LineRenderer3D) renderer; //            lr3d.setWallPaint(this.wallPaint); //        } // //        //  StatisticalBarRenderer //        if (renderer instanceof StatisticalBarRenderer) { //            StatisticalBarRenderer sbr = (StatisticalBarRenderer) renderer; //            sbr.setErrorIndicatorPaint(this.errorIndicatorPaint); //        } // //        // MinMaxCategoryRenderer //        if (renderer instanceof MinMaxCategoryRenderer) { //            MinMaxCategoryRenderer mmcr = (MinMaxCategoryRenderer) renderer; //            mmcr.setGroupPaint(this.errorIndicatorPaint); //        }