package net.sf.jasperreports.charts.util; import java.io.Serializable; import java.text.AttributedString; import java.util.Map; import org.jfree.chart.labels.PieSectionLabelGenerator; import org.jfree.data.general.PieDataset; public class PieLabelGenerator implements PieSectionLabelGenerator, Serializable { private static final long serialVersionUID = 10200L; private Map labels = null; public PieLabelGenerator(Map labels) { this.labels = labels; } public String generateSectionLabel(PieDataset arg0, Comparable arg1) { return (String)this.labels.get(arg1); } public AttributedString generateAttributedSectionLabel(PieDataset arg0, Comparable arg1) { return new AttributedString(generateSectionLabel(arg0, arg1)); } }