/** * Sets the paint used to fill a section of the pie and sends a * {@link PlotChangeEvent} to all registered listeners. * * @param section the section index (zero-based). * @param paint the paint (<code>null</code> permitted). * * @deprecated Use {@link #setSectionOutlinePaint(Comparable, Paint)} * instead. */ public void setSectionOutlinePaint(int section, Paint paint) { Comparable key = getSectionKey(section); setSectionOutlinePaint(key, paint); }
private static void setSectionColor(PieDataset dataset, PiePlot plot, int section, Color outline, Color paint ) { try { Comparable key = dataset.getKey(section); plot.setSectionOutlinePaint(key, outline); plot.setSectionPaint(key, paint); } catch (IndexOutOfBoundsException ie) { // This item hasn't been created, in the dataset so we skip it and don't set its colours // No further action is currently required in this case. } } }
plot.setSectionOutlinePaint(getKey(), UIChart.findColor(getSectionOutlinePaint()));