1 | |
|
2 | |
|
3 | |
|
4 | |
package org.homeunix.thecave.buddi.plugin.builtin.report; |
5 | |
|
6 | |
import java.text.AttributedString; |
7 | |
|
8 | |
import org.homeunix.thecave.buddi.plugin.api.util.TextFormatter; |
9 | |
import org.jfree.chart.labels.StandardPieSectionLabelGenerator; |
10 | |
import org.jfree.data.general.PieDataset; |
11 | |
|
12 | 0 | public class BuddiPieSectionLabelGenerator extends StandardPieSectionLabelGenerator { |
13 | |
public static final long serialVersionUID = 0; |
14 | |
|
15 | |
@SuppressWarnings("rawtypes") |
16 | |
public AttributedString generateAttributedSectionLabel(PieDataset arg0, Comparable arg1) { |
17 | 0 | return new AttributedString(generateSectionLabel(arg0, arg1)); |
18 | |
} |
19 | |
|
20 | |
@SuppressWarnings("rawtypes") |
21 | |
public String generateSectionLabel(PieDataset arg0, Comparable arg1) { |
22 | 0 | return super.generateSectionLabel(arg0, arg1) + ": " + TextFormatter.getFormattedCurrency(arg0.getValue(arg1).longValue(), false, false); |
23 | |
} |
24 | |
} |