public interface PieSectionLabelGenerator
PieDataset
.Modifier and Type | Method and Description |
---|---|
java.text.AttributedString |
generateAttributedSectionLabel(PieDataset dataset,
java.lang.Comparable key)
Generates an attributed label for the specified series, or
null if no attributed label is available (in which case,
the string returned by
generateSectionLabel(PieDataset, Comparable) will
provide the fallback). |
java.lang.String |
generateSectionLabel(PieDataset dataset,
java.lang.Comparable key)
Generates a label for a pie section.
|
java.lang.String generateSectionLabel(PieDataset dataset, java.lang.Comparable key)
dataset
- the dataset (null
not permitted).key
- the section key (null
not permitted).null
).java.text.AttributedString generateAttributedSectionLabel(PieDataset dataset, java.lang.Comparable key)
null
if no attributed label is available (in which case,
the string returned by
generateSectionLabel(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 of
TextAttribute.POSTURE_OBLIQUE
will add Font.ITALIC
to
the current font;TextAttribute.WEIGHT
: a value of
TextAttribute.WEIGHT_BOLD
will add Font.BOLD
to the
current font;TextAttribute.FOREGROUND
: this will set the Paint
for the currentTextAttribute.SUPERSCRIPT
: the values
TextAttribute.SUPERSCRIPT_SUB
and
TextAttribute.SUPERSCRIPT_SUPER
are recognised.dataset
- the dataset.key
- the key.null
).