public class AbstractPieItemLabelGenerator extends java.lang.Object implements java.io.Serializable
Modifier | Constructor and Description |
---|---|
protected |
AbstractPieItemLabelGenerator(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.
|
protected java.lang.Object[] |
createItemArray(PieDataset dataset,
java.lang.Comparable key)
Creates the array of items that can be passed to the
MessageFormat class for creating labels. |
boolean |
equals(java.lang.Object obj)
Tests the generator for equality with an arbitrary object.
|
protected java.lang.String |
generateSectionLabel(PieDataset dataset,
java.lang.Comparable key)
Generates a label for a pie section.
|
java.lang.String |
getLabelFormat()
Returns the label format string.
|
java.text.NumberFormat |
getNumberFormat()
Returns the number formatter.
|
java.text.NumberFormat |
getPercentFormat()
Returns the percent formatter.
|
int |
hashCode()
Returns a hash code for this instance.
|
protected AbstractPieItemLabelGenerator(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 getLabelFormat()
null
).public java.text.NumberFormat getNumberFormat()
null
).public java.text.NumberFormat getPercentFormat()
null
).protected java.lang.Object[] createItemArray(PieDataset dataset, java.lang.Comparable key)
MessageFormat
class for creating labels. The returned array
contains four values:
String
;dataset
- the dataset (null
not permitted).key
- the key (null
not permitted).null
).protected java.lang.String generateSectionLabel(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 java.lang.Object
obj
- the object to test against (null
permitted).public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- should not happen.