/** * Called when it is time to finish the * initialization of the framework. */ @Override public void finishInitialization() { log.debug("finishInitialization"); // make charts look like they looked in jfreechart-0.9.x by default if(ERXProperties.booleanForKeyWithDefault("er.plot.useLegacyTheme", false)) { ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme()); } } }
/** * Creates and returns the default 'JFree' chart theme. * * @return A chart theme. */ public static ChartTheme createJFreeTheme() { return new StandardChartTheme("JFree"); }
/** * Applies the attributes of this theme to a {@link MultiplePiePlot}. * * @param plot the plot (<code>null</code> not permitted). */ protected void applyToMultiplePiePlot(MultiplePiePlot plot) { apply(plot.getPieChart()); }
Args.nullNotPermitted(plot, "plot"); if (plot.getDrawingSupplier() != null) { plot.setDrawingSupplier(getDrawingSupplier()); applyToPiePlot((PiePlot) plot); applyToMultiplePiePlot((MultiplePiePlot) plot); applyToCategoryPlot((CategoryPlot) plot); applyToXYPlot((XYPlot) plot); applyToFastScatterPlot((FastScatterPlot) plot); applyToMeterPlot((MeterPlot) plot); applyToThermometerPlot((ThermometerPlot) plot); applyToSpiderWebPlot((SpiderWebPlot) plot); applyToPolarPlot((PolarPlot) plot);
CategoryAxis axis = plot.getDomainAxis(i); if (axis != null) { applyToCategoryAxis(axis); ValueAxis axis = (ValueAxis) plot.getRangeAxis(i); if (axis != null) { applyToValueAxis(axis); CategoryItemRenderer r = plot.getRenderer(i); if (r != null) { applyToCategoryItemRenderer(r); CategoryPlot subplot = (CategoryPlot) iterator.next(); if (subplot != null) { applyToPlot(subplot); CategoryPlot subplot = (CategoryPlot) iterator.next(); if (subplot != null) { applyToPlot(subplot);
lt.setItemPaint(this.legendItemPaint); if (lt.getWrapper() != null) { applyToBlockContainer(lt.getWrapper()); ValueAxis axis = psl.getAxis(); if (axis != null) { applyToValueAxis(axis); Block b = (Block) iterator.next(); if (b instanceof Title) { applyToTitle((Title) b);
/** * Applies the settings of this theme to the specified renderer. * * @param renderer the renderer (<code>null</code> not permitted). */ protected void applyToXYItemRenderer(XYItemRenderer renderer) { if (renderer == null) { throw new IllegalArgumentException("Null 'renderer' argument."); } 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); } }
/** * Applies the attributes of this theme to the specified container. * * @param bc a block container ({@code null} not permitted). */ protected void applyToBlockContainer(BlockContainer bc) { Iterator iterator = bc.getBlocks().iterator(); while (iterator.hasNext()) { Block b = (Block) iterator.next(); applyToBlock(b); } }
plot.setDrawingSupplier(getDrawingSupplier()); applyToPiePlot((PiePlot) plot); applyToMultiplePiePlot((MultiplePiePlot) plot); applyToCategoryPlot((CategoryPlot) plot); applyToXYPlot((XYPlot) plot); applyToFastScatterPlot((FastScatterPlot) plot); applyToMeterPlot((MeterPlot) plot); applyToThermometerPlot((ThermometerPlot) plot); applyToSpiderWebPlot((SpiderWebPlot) plot); applyToPolarPlot((PolarPlot) plot);
CategoryAxis axis = plot.getDomainAxis(i); if (axis != null) { applyToCategoryAxis(axis); ValueAxis axis = plot.getRangeAxis(i); if (axis != null) { applyToValueAxis(axis); CategoryItemRenderer r = plot.getRenderer(i); if (r != null) { applyToCategoryItemRenderer(r); CategoryPlot subplot = (CategoryPlot) iterator.next(); if (subplot != null) { applyToPlot(subplot); CategoryPlot subplot = (CategoryPlot) iterator.next(); if (subplot != null) { applyToPlot(subplot);
lt.setItemPaint(this.legendItemPaint); if (lt.getWrapper() != null) { applyToBlockContainer(lt.getWrapper()); ValueAxis axis = psl.getAxis(); if (axis != null) { applyToValueAxis(axis); Block b = (Block) iterator.next(); if (b instanceof Title) { applyToTitle((Title) b);
/** * Applies the settings of this theme to the specified renderer. * * @param renderer the renderer ({@code null} not permitted). */ protected void applyToXYItemRenderer(XYItemRenderer renderer) { Args.nullNotPermitted(renderer, "renderer"); if (renderer instanceof AbstractRenderer) { applyToAbstractRenderer((AbstractRenderer) renderer); } renderer.setDefaultItemLabelFont(this.regularFont); renderer.setDefaultItemLabelPaint(this.itemLabelPaint); if (renderer instanceof XYBarRenderer) { XYBarRenderer br = (XYBarRenderer) renderer; br.setBarPainter(this.xyBarPainter); br.setShadowVisible(this.shadowVisible); } }
/** * Applies the attributes of this theme to the specified container. * * @param bc a block container (<code>null</code> not permitted). */ protected void applyToBlockContainer(BlockContainer bc) { Iterator iterator = bc.getBlocks().iterator(); while (iterator.hasNext()) { Block b = (Block) iterator.next(); applyToBlock(b); } }
ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme()); BarChart chartConfig = getBarChartConfigByName(chartName); JFreeChart chart = getBarChart(chartName);
/** * Creates and returns the default 'JFree' chart theme. * * @return A chart theme. */ public static ChartTheme createJFreeTheme() { return new StandardChartTheme("JFree"); }
applyToAbstractRenderer((AbstractRenderer) renderer);
/** * Applies the attributes of this theme to a {@link MultiplePiePlot}. * * @param plot the plot ({@code null} not permitted). */ protected void applyToMultiplePiePlot(MultiplePiePlot plot) { apply(plot.getPieChart()); }
ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme()); BarChart chartConfig = getBarChartConfigByName(chartName); JFreeChart chart = getBarChart(chartName);
StandardChartTheme theme = new StandardChartTheme("Darkness"); theme.titlePaint = Color.WHITE; theme.subtitlePaint = Color.WHITE;
applyToAbstractRenderer((AbstractRenderer) renderer);