|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jfree.chart.plot.PieLabelDistributor
This class distributes the section labels for one side of a pie chart so that they do not overlap.
| Constructor Summary | |
PieLabelDistributor(int labelCount)
Creates a new distributor. |
|
| Method Summary | |
void |
addPieLabelRecord(PieLabelRecord record)
Adds a label record. |
protected void |
adjustDownwards(double minY,
double height)
Any labels that are overlapping are moved down in an attempt to eliminate the overlaps. |
protected void |
adjustInwards()
Adjusts the y-coordinate for the labels in towards the center in an attempt to fix overlapping. |
protected void |
adjustUpwards(double minY,
double height)
Any labels that are overlapping are moved up in an attempt to eliminate the overlaps. |
void |
distributeLabels(double minY,
double height)
Distributes the labels. |
int |
getItemCount()
Returns the number of items in the list. |
PieLabelRecord |
getPieLabelRecord(int index)
Returns a label record from the list. |
void |
sort()
Sorts the label records into ascending order by y-value. |
protected void |
spreadEvenly(double minY,
double height)
Labels are spaced evenly in the available space in an attempt to eliminate the overlaps. |
java.lang.String |
toString()
Returns a string containing a description of the object for debugging purposes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PieLabelDistributor(int labelCount)
labelCount - the number of labels.| Method Detail |
public PieLabelRecord getPieLabelRecord(int index)
index - the index.
public void addPieLabelRecord(PieLabelRecord record)
record - the label record.public int getItemCount()
public void distributeLabels(double minY,
double height)
minY - the minimum y-coordinate in Java2D-space.height - the height.protected void adjustInwards()
protected void adjustDownwards(double minY,
double height)
minY - the minimum y value (in Java2D coordinate space).height - the height available for all labels.
protected void adjustUpwards(double minY,
double height)
minY - the minimum y value (in Java2D coordinate space).height - the height available for all labels.
protected void spreadEvenly(double minY,
double height)
minY - the minimum y value (in Java2D coordinate space).height - the height available for all labels.public void sort()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||