use of org.opennms.netmgt.config.charts.Blue in project opennms by OpenNMS.
the class ChartUtils method setChartBackgroundColor.
private static void setChartBackgroundColor(BarChart chartConfig, JFreeChart chart) {
if (chartConfig.getChartBackgroundColor().isPresent()) {
final ChartBackgroundColor bgColor = chartConfig.getChartBackgroundColor().get();
Red red = bgColor.getRgb().getRed();
Blue blue = bgColor.getRgb().getBlue();
Green green = bgColor.getRgb().getGreen();
chart.setBackgroundPaint(new Color(red.getRgbColor(), green.getRgbColor(), blue.getRgbColor()));
}
}
use of org.opennms.netmgt.config.charts.Blue in project opennms by OpenNMS.
the class ChartUtils method setPlotBackgroundColor.
private static void setPlotBackgroundColor(BarChart chartConfig, JFreeChart chart) {
if (chartConfig.getPlotBackgroundColor().isPresent()) {
final PlotBackgroundColor bgColor = chartConfig.getPlotBackgroundColor().get();
final Optional<Rgb> rgb = bgColor.getRgb();
if (rgb.isPresent()) {
final Red red = rgb.get().getRed();
final Blue blue = rgb.get().getBlue();
final Green green = rgb.get().getGreen();
chart.getPlot().setBackgroundPaint(new Color(red.getRgbColor(), green.getRgbColor(), blue.getRgbColor()));
}
}
}
Aggregations