use of org.jfree.chart.renderer.xy.GradientXYBarPainter in project SIMVA-SoS by SESoS.
the class ChartFactory method setChartTheme.
/**
* Sets the current chart theme. This will be applied to all new charts
* created via methods in this class.
*
* @param theme the theme (<code>null</code> not permitted).
*
* @see #getChartTheme()
* @see ChartUtilities#applyCurrentTheme(JFreeChart)
*
* @since 1.0.11
*/
public static void setChartTheme(ChartTheme theme) {
ParamChecks.nullNotPermitted(theme, "theme");
currentTheme = theme;
// theme, and reset the bar painters in that case...
if (theme instanceof StandardChartTheme) {
StandardChartTheme sct = (StandardChartTheme) theme;
if (sct.getName().equals("Legacy")) {
BarRenderer.setDefaultBarPainter(new StandardBarPainter());
XYBarRenderer.setDefaultBarPainter(new StandardXYBarPainter());
} else {
BarRenderer.setDefaultBarPainter(new GradientBarPainter());
XYBarRenderer.setDefaultBarPainter(new GradientXYBarPainter());
}
}
}
Aggregations