Class PieLabelDistributor

java.lang.Object
org.jfree.chart.plot.PieLabelDistributor

public class PieLabelDistributor
extends Object
This class distributes the section labels for one side of a pie chart so that they do not overlap.
  • Constructor Details

    • PieLabelDistributor

      public PieLabelDistributor​(int labelCount)
      Creates a new distributor.
      Parameters:
      labelCount - the number of labels.
  • Method Details

    • 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.
    • getItemCount

      public int getItemCount()
      Returns the number of items in the list.
      Returns:
      the item count.
    • distributeLabels

      public void distributeLabels​(double minY, double height)
      Distributes the labels.
      Parameters:
      minY - the minimum y-coordinate in Java2D-space.
      height - the height.
    • sort

      public void sort()
      Sorts the label records into ascending order by y-value.
    • toString

      public String toString()
      Returns a string containing a description of the object for debugging purposes.
      Overrides:
      toString in class Object
      Returns:
      a string.