- All Known Implementing Classes:
StandardPieSectionLabelGenerator
public interface PieSectionLabelGenerator
Interface for a label generator for plots that use data from
a
PieDataset
.-
Method Summary
Modifier and TypeMethodDescriptiongenerateAttributedSectionLabel
(PieDataset dataset, Comparable key) Generates an attributed label for the specified series, ornull
if no attributed label is available (in which case, the string returned bygenerateSectionLabel(PieDataset, Comparable)
will provide the fallback).generateSectionLabel
(PieDataset dataset, Comparable key) Generates a label for a pie section.
-
Method Details
-
generateSectionLabel
Generates a label for a pie section.- Parameters:
dataset
- the dataset (null
not permitted).key
- the section key (null
not permitted).- Returns:
- The label (possibly
null
).
-
generateAttributedSectionLabel
Generates an attributed label for the specified series, ornull
if no attributed label is available (in which case, the string returned bygenerateSectionLabel(PieDataset, Comparable)
will provide the fallback). Only certain attributes are recognised by the code that ultimately displays the labels:TextAttribute.FONT
: will set the font;TextAttribute.POSTURE
: a value ofTextAttribute.POSTURE_OBLIQUE
will addFont.ITALIC
to the current font;TextAttribute.WEIGHT
: a value ofTextAttribute.WEIGHT_BOLD
will addFont.BOLD
to the current font;TextAttribute.FOREGROUND
: this will set thePaint
for the currentTextAttribute.SUPERSCRIPT
: the valuesTextAttribute.SUPERSCRIPT_SUB
andTextAttribute.SUPERSCRIPT_SUPER
are recognised.
- Parameters:
dataset
- the dataset.key
- the key.- Returns:
- An attributed label (possibly
null
).
-