Search in sources :

Example 1 with AbstractRenderer

use of org.jfree.chart.renderer.AbstractRenderer in project SIMVA-SoS by SESoS.

the class StandardChartTheme method applyToCategoryItemRenderer.

/**
 * Applies the settings of this theme to the specified renderer.
 *
 * @param renderer  the renderer (<code>null</code> not permitted).
 */
protected void applyToCategoryItemRenderer(CategoryItemRenderer renderer) {
    ParamChecks.nullNotPermitted(renderer, "renderer");
    if (renderer instanceof AbstractRenderer) {
        applyToAbstractRenderer((AbstractRenderer) renderer);
    }
    renderer.setBaseItemLabelFont(this.regularFont);
    renderer.setBaseItemLabelPaint(this.itemLabelPaint);
    // BarRenderer
    if (renderer instanceof BarRenderer) {
        BarRenderer br = (BarRenderer) renderer;
        br.setBarPainter(this.barPainter);
        br.setShadowVisible(this.shadowVisible);
        br.setShadowPaint(this.shadowPaint);
    }
    // BarRenderer3D
    if (renderer instanceof BarRenderer3D) {
        BarRenderer3D br3d = (BarRenderer3D) renderer;
        br3d.setWallPaint(this.wallPaint);
    }
    // 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);
    }
}
Also used : MinMaxCategoryRenderer(org.jfree.chart.renderer.category.MinMaxCategoryRenderer) BarRenderer3D(org.jfree.chart.renderer.category.BarRenderer3D) LineRenderer3D(org.jfree.chart.renderer.category.LineRenderer3D) StatisticalBarRenderer(org.jfree.chart.renderer.category.StatisticalBarRenderer) AbstractRenderer(org.jfree.chart.renderer.AbstractRenderer) StatisticalBarRenderer(org.jfree.chart.renderer.category.StatisticalBarRenderer) BarRenderer(org.jfree.chart.renderer.category.BarRenderer) XYBarRenderer(org.jfree.chart.renderer.xy.XYBarRenderer)

Example 2 with AbstractRenderer

use of org.jfree.chart.renderer.AbstractRenderer in project SIMVA-SoS by SESoS.

the class StandardChartTheme method applyToXYItemRenderer.

/**
 * Applies the settings of this theme to the specified renderer.
 *
 * @param renderer  the renderer (<code>null</code> not permitted).
 */
protected void applyToXYItemRenderer(XYItemRenderer renderer) {
    ParamChecks.nullNotPermitted(renderer, "renderer");
    if (renderer instanceof AbstractRenderer) {
        applyToAbstractRenderer((AbstractRenderer) renderer);
    }
    renderer.setBaseItemLabelFont(this.regularFont);
    renderer.setBaseItemLabelPaint(this.itemLabelPaint);
    if (renderer instanceof XYBarRenderer) {
        XYBarRenderer br = (XYBarRenderer) renderer;
        br.setBarPainter(this.xyBarPainter);
        br.setShadowVisible(this.shadowVisible);
    }
}
Also used : AbstractRenderer(org.jfree.chart.renderer.AbstractRenderer) XYBarRenderer(org.jfree.chart.renderer.xy.XYBarRenderer)

Aggregations

AbstractRenderer (org.jfree.chart.renderer.AbstractRenderer)2 XYBarRenderer (org.jfree.chart.renderer.xy.XYBarRenderer)2 BarRenderer (org.jfree.chart.renderer.category.BarRenderer)1 BarRenderer3D (org.jfree.chart.renderer.category.BarRenderer3D)1 LineRenderer3D (org.jfree.chart.renderer.category.LineRenderer3D)1 MinMaxCategoryRenderer (org.jfree.chart.renderer.category.MinMaxCategoryRenderer)1 StatisticalBarRenderer (org.jfree.chart.renderer.category.StatisticalBarRenderer)1