| java.lang.Object org.jfree.chart.labels.AbstractPieItemLabelGenerator
All known Subclasses: org.jfree.chart.labels.StandardPieToolTipGenerator, org.jfree.chart.labels.StandardPieSectionLabelGenerator,
AbstractPieItemLabelGenerator | public class AbstractPieItemLabelGenerator implements Serializable(Code) | | A base class used for generating pie chart item labels.
|
AbstractPieItemLabelGenerator | protected AbstractPieItemLabelGenerator(String labelFormat, NumberFormat numberFormat, NumberFormat percentFormat)(Code) | | Creates an item label generator using the specified number formatters.
Parameters: labelFormat - the label format string (null notpermitted). Parameters: numberFormat - the format object for the values (null not permitted). Parameters: percentFormat - the format object for the percentages(null not permitted). |
createItemArray | protected Object[] createItemArray(PieDataset dataset, Comparable key)(Code) | | Creates the array of items that can be passed to the
MessageFormat class for creating labels. The returned array
contains four values:
- result[0] = the section key converted to a
String ;
- result[1] = the formatted data value;
- result[2] = the formatted percentage (of the total);
- result[3] = the formatted total value.
Parameters: dataset - the dataset (null not permitted). Parameters: key - the key (null not permitted). The items (never null ). |
equals | public boolean equals(Object obj)(Code) | | Tests the generator for equality with an arbitrary object.
Parameters: obj - the object to test against (null permitted). A boolean. |
generateSectionLabel | protected String generateSectionLabel(PieDataset dataset, Comparable key)(Code) | | Generates a label for a pie section.
Parameters: dataset - the dataset (null not permitted). Parameters: key - the section key (null not permitted). The label (possibly null ). |
getLabelFormat | public String getLabelFormat()(Code) | | Returns the label format string.
The label format string (never null ). |
getNumberFormat | public NumberFormat getNumberFormat()(Code) | | Returns the number formatter.
The formatter (never null ). |
getPercentFormat | public NumberFormat getPercentFormat()(Code) | | Returns the percent formatter.
The formatter (never null ). |
|
|