- java.lang.Object
-
- org.jfree.chart.plot.pie.AbstractPieLabelDistributor
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PieLabelDistributor
public abstract class AbstractPieLabelDistributor extends Object implements Serializable
A base class for handling the distribution of pie section labels. Create your own subclass and set it using thePiePlot.setLabelDistributor(AbstractPieLabelDistributor)method if you want to customise the label distribution.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractPieLabelDistributor()Creates a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddPieLabelRecord(PieLabelRecord record)Adds a label record.voidclear()Clears the list of labels.abstract voiddistributeLabels(double minY, double height)Called by thePiePlotclass.intgetItemCount()Returns the number of items in the list.PieLabelRecordgetPieLabelRecord(int index)Returns a label record from the list.
-
-
-
Constructor Detail
-
AbstractPieLabelDistributor
public AbstractPieLabelDistributor()
Creates a new instance.
-
-
Method Detail
-
getPieLabelRecord
public PieLabelRecord getPieLabelRecord(int index)
Returns a label record from the list.- Parameters:
index- the index.- Returns:
- The label record.
-
addPieLabelRecord
public void addPieLabelRecord(PieLabelRecord record)
Adds a label record.- Parameters:
record- the label record (nullnot permitted).
-
getItemCount
public int getItemCount()
Returns the number of items in the list.- Returns:
- The item count.
-
clear
public void clear()
Clears the list of labels.
-
distributeLabels
public abstract void distributeLabels(double minY, double height)
Called by thePiePlotclass. Implementations should distribute the labels in this.labels then return.- Parameters:
minY- the y-coordinate for the top of the label area.height- the height of the label area.
-
-