org.jfree.chart.labels
public class StandardPieToolTipGenerator extends AbstractPieItemLabelGenerator implements PieToolTipGenerator, Cloneable, PublicCloneable, Serializable
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 String | DEFAULT_SECTION_LABEL_FORMAT
The default section label format.
|
| static String | DEFAULT_TOOLTIP_FORMAT The default tooltip format. |
| Constructor Summary | |
|---|---|
| StandardPieToolTipGenerator()
Creates an item label generator using default number formatters. | |
| StandardPieToolTipGenerator(Locale locale)
Creates a pie tool tip generator for the specified locale, using the
default format string.
| |
| StandardPieToolTipGenerator(String labelFormat)
Creates a pie tool tip generator for the default locale.
| |
| StandardPieToolTipGenerator(String labelFormat, Locale locale)
Creates a pie tool tip generator for the specified locale.
| |
| StandardPieToolTipGenerator(String labelFormat, NumberFormat numberFormat, NumberFormat percentFormat)
Creates an item label generator using the specified number formatters.
| |
| Method Summary | |
|---|---|
| Object | clone()
Returns an independent copy of the generator.
|
| String | generateToolTip(PieDataset dataset, Comparable key)
Generates a tool tip text item for one section in a pie chart.
|
Deprecated: As of 1.0.7, use DEFAULT_TOOLTIP_FORMAT instead.
The default section label format.Parameters: locale the locale (null not permitted).
Since: 1.0.7
Parameters: labelFormat the label format (null not permitted).
Parameters: labelFormat the label format (null not permitted). locale the locale (null not permitted).
Since: 1.0.7
Parameters: 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).
Returns: A clone.
Throws: CloneNotSupportedException should not happen.
Parameters: dataset the dataset (null not permitted). key the section key (null not permitted).
Returns: The tool tip text (possibly null).