}
public void configure(ChartView view, ConfigurableRenderer configurableRenderer) {
GridChartView chartView = (GridChartView) view;
boolean outlinesSpecified = chartView.getOutlines() != null && !chartView.getOutlines().isEmpty();
AbstractRenderer renderer = (AbstractRenderer) configurableRenderer;
if (chartView.getDefaultOutlineStyle() != null || outlinesSpecified) {
if (renderer instanceof BarRenderer) {
((BarRenderer) renderer).setDrawBarOutline(true);
} else if (renderer instanceof XYBarRendererAdapter) {
((XYBarRendererAdapter) renderer).setDrawBarOutline(true);
} else if (renderer instanceof LineAndShapeRenderer) {
((LineAndShapeRenderer) renderer).setDrawOutlines(true);
((LineAndShapeRenderer) renderer).setUseOutlinePaint(true);
} else if (renderer instanceof XYRendererAdapter) {
((XYRendererAdapter) renderer).setDrawOutlines(true);
((XYRendererAdapter) renderer).setUseOutlinePaint(true);
}
}
if (chartView.getDefaultOutlineStyle() != null && !outlinesSpecified) {
renderer.setBaseOutlinePaint(chartView.getDefaultOutlineStyle().getColor());
renderer.setBaseOutlineStroke(chartView.getDefaultOutlineStyle().getStroke());
for (int seriesIndex = 0; seriesIndex < seriesCount; seriesIndex++) {
renderer.setSeriesOutlinePaint(seriesIndex, chartView.getDefaultOutlineStyle().getColor());
renderer.setSeriesOutlineStroke(seriesIndex, chartView.getDefaultOutlineStyle().getStroke());
}
} else if (outlinesSpecified) {
final Iterator outlinesIterator = chartView.getOutlines().iterator();
for (int seriesIndex = 0; seriesIndex < seriesCount; seriesIndex++) {
if (outlinesIterator.hasNext()) {
final LineStyle lineStyle = (LineStyle) outlinesIterator.next();
renderer.setSeriesOutlinePaint(seriesIndex, lineStyle.getColor());
renderer.setSeriesOutlineStroke(seriesIndex, lineStyle.getStroke());
}
}
}
}