|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jfree.chart.labels.AbstractPieItemLabelGenerator
org.jfree.chart.labels.StandardPieSectionLabelGenerator
public class StandardPieSectionLabelGenerator
A standard item label generator for plots that use data from a PieDataset.
For the label format, use {0} where the pie section key should be inserted,
{1} for the absolute section value and {2} for the percent amount of the pie
section, e.g. "{0} = {1} ({2})" will display as
apple = 120 (5%).
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_SECTION_LABEL_FORMAT
The default section label format. |
| Constructor Summary | |
|---|---|
StandardPieSectionLabelGenerator()
Creates an item label generator using default number formatters. |
|
StandardPieSectionLabelGenerator(java.lang.String labelFormat)
Creates an item label generator. |
|
StandardPieSectionLabelGenerator(java.lang.String labelFormat,
java.text.NumberFormat numberFormat,
java.text.NumberFormat percentFormat)
Creates an item label generator using the specified number formatters. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Returns an independent copy of the generator. |
boolean |
equals(java.lang.Object obj)
Tests the generator for equality with an arbitrary object. |
java.lang.String |
generateSectionLabel(PieDataset dataset,
java.lang.Comparable key)
Generates a label for a pie section. |
java.lang.String |
generateToolTip(PieDataset dataset,
java.lang.Comparable key)
Generates a tool tip text item for one section in a pie chart. |
| Methods inherited from class org.jfree.chart.labels.AbstractPieItemLabelGenerator |
|---|
createItemArray, getLabelFormat, getNumberFormat, getPercentFormat |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_SECTION_LABEL_FORMAT
| Constructor Detail |
|---|
public StandardPieSectionLabelGenerator()
public StandardPieSectionLabelGenerator(java.lang.String labelFormat)
labelFormat - the label format.
public StandardPieSectionLabelGenerator(java.lang.String labelFormat,
java.text.NumberFormat numberFormat,
java.text.NumberFormat percentFormat)
labelFormat - the label format string (null not permitted).numberFormat - the format object for the values (null not permitted).percentFormat - the format object for the percentages (null not
permitted).| Method Detail |
|---|
public java.lang.String generateSectionLabel(PieDataset dataset,
java.lang.Comparable key)
generateSectionLabel in interface PieSectionLabelGeneratorgenerateSectionLabel in class AbstractPieItemLabelGeneratordataset - the dataset (null not permitted).key - the section key (null not permitted).
null).
public java.lang.String generateToolTip(PieDataset dataset,
java.lang.Comparable key)
dataset - the dataset (null not permitted).key - the section key (null not permitted).
null).public boolean equals(java.lang.Object obj)
equals in class AbstractPieItemLabelGeneratorobj - the object to test against (null permitted).
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class AbstractPieItemLabelGeneratorjava.lang.CloneNotSupportedException - should not happen.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||