public class StandardPieToolTipGenerator extends AbstractPieItemLabelGenerator implements PieToolTipGenerator, java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable
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%).
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_SECTION_LABEL_FORMAT
Deprecated.
As of 1.0.7, use
DEFAULT_TOOLTIP_FORMAT instead. |
static java.lang.String |
DEFAULT_TOOLTIP_FORMAT
The default tooltip format.
|
| Constructor and Description |
|---|
StandardPieToolTipGenerator()
Creates an item label generator using default number formatters.
|
StandardPieToolTipGenerator(java.util.Locale locale)
Creates a pie tool tip generator for the specified locale, using the
default format string.
|
StandardPieToolTipGenerator(java.lang.String labelFormat)
Creates a pie tool tip generator for the default locale.
|
StandardPieToolTipGenerator(java.lang.String labelFormat,
java.util.Locale locale)
Creates a pie tool tip generator for the specified locale.
|
StandardPieToolTipGenerator(java.lang.String labelFormat,
java.text.NumberFormat numberFormat,
java.text.NumberFormat percentFormat)
Creates an item label generator using the specified number formatters.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns an independent copy of the generator.
|
java.lang.String |
generateToolTip(PieDataset dataset,
java.lang.Comparable key)
Generates a tool tip text item for one section in a pie chart.
|
createItemArray, equals, generateSectionLabel, getLabelFormat, getNumberFormat, getPercentFormat, hashCodepublic static final java.lang.String DEFAULT_TOOLTIP_FORMAT
public static final java.lang.String DEFAULT_SECTION_LABEL_FORMAT
DEFAULT_TOOLTIP_FORMAT instead.public StandardPieToolTipGenerator()
public StandardPieToolTipGenerator(java.util.Locale locale)
locale - the locale (null not permitted).public StandardPieToolTipGenerator(java.lang.String labelFormat)
labelFormat - the label format (null not permitted).public StandardPieToolTipGenerator(java.lang.String labelFormat, java.util.Locale locale)
labelFormat - the label format (null not permitted).locale - the locale (null not permitted).public StandardPieToolTipGenerator(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).public java.lang.String generateToolTip(PieDataset dataset, java.lang.Comparable key)
generateToolTip in interface PieToolTipGeneratordataset - the dataset (null not permitted).key - the section key (null not permitted).null).public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone in interface org.jfree.util.PublicCloneableclone in class AbstractPieItemLabelGeneratorjava.lang.CloneNotSupportedException - should not happen.