public abstract class AbstractPieLabelDistributor extends java.lang.Object implements java.io.Serializable
PiePlot.setLabelDistributor(AbstractPieLabelDistributor)
method
if you want to customise the label distribution.Modifier and Type | Field and Description |
---|---|
protected java.util.List |
labels
The label records.
|
Constructor and Description |
---|
AbstractPieLabelDistributor()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addPieLabelRecord(PieLabelRecord record)
Adds a label record.
|
void |
clear()
Clears the list of labels.
|
abstract void |
distributeLabels(double minY,
double height)
Called by the
PiePlot class. |
int |
getItemCount()
Returns the number of items in the list.
|
PieLabelRecord |
getPieLabelRecord(int index)
Returns a label record from the list.
|
protected java.util.List labels
public AbstractPieLabelDistributor()
public PieLabelRecord getPieLabelRecord(int index)
index
- the index.public void addPieLabelRecord(PieLabelRecord record)
record
- the label record (null
not permitted).public int getItemCount()
public void clear()
public abstract void distributeLabels(double minY, double height)
PiePlot
class. Implementations should distribute
the labels in this.labels then return.minY
- the y-coordinate for the top of the label area.height
- the height of the label area.