Class PieLabelRecord

java.lang.Object
org.jfree.chart.plot.PieLabelRecord
All Implemented Interfaces:
Comparable

public class PieLabelRecord
extends Object
implements Comparable
A structure that retains information about the label for a section in a pie chart.
  • Constructor Summary

    Constructors
    Constructor Description
    PieLabelRecord​(Comparable key, double angle, double baseY, org.jfree.text.TextBox label, double labelHeight, double gap, double linkPercent)
    Creates a new record.
  • Method Summary

    Modifier and Type Method Description
    int compareTo​(Object obj)
    Compares this object to an arbitrary object.
    double getAllocatedY()
    Returns the allocated y-coordinate.
    double getAngle()
    Returns the angle.
    double getBaseY()
    Returns the base y-coordinate.
    double getGap()
    Returns the gap.
    Comparable getKey()
    Returns the key for the section that the label applies to.
    org.jfree.text.TextBox getLabel()
    Returns the label.
    double getLabelHeight()
    Returns the label height.
    double getLinkPercent()
    Returns the link percent.
    double getLowerY()
    Returns the lower bound of the label.
    double getUpperY()
    Returns the upper bound of the label.
    void setAllocatedY​(double y)
    Sets the allocated y-coordinate.
    void setBaseY​(double base)
    Sets the base y-coordinate.
    String toString()
    Returns a string describing the object.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PieLabelRecord

      public PieLabelRecord​(Comparable key, double angle, double baseY, org.jfree.text.TextBox label, double labelHeight, double gap, double linkPercent)
      Creates a new record.
      Parameters:
      key - the key.
      angle - the angle.
      baseY - the base y-coordinate.
      label - the label.
      labelHeight - the label height (in Java2D units).
      gap - the gap.
      linkPercent - the link percent.
  • Method Details

    • getBaseY

      public double getBaseY()
      Returns the base y-coordinate. This is where the label will appear if there is no overlapping of labels.
      Returns:
      the base y-coordinate.
    • setBaseY

      public void setBaseY​(double base)
      Sets the base y-coordinate.
      Parameters:
      base - the base y-coordinate.
    • getLowerY

      public double getLowerY()
      Returns the lower bound of the label.
      Returns:
      the lower bound.
    • getUpperY

      public double getUpperY()
      Returns the upper bound of the label.
      Returns:
      the upper bound.
    • getAngle

      public double getAngle()
      Returns the angle.
      Returns:
      the angle.
    • getKey

      public Comparable getKey()
      Returns the key for the section that the label applies to.
      Returns:
      the key.
    • getLabel

      public org.jfree.text.TextBox getLabel()
      Returns the label.
      Returns:
      the label.
    • getLabelHeight

      public double getLabelHeight()
      Returns the label height.
      Returns:
      The label height (in Java2D units).
    • getAllocatedY

      public double getAllocatedY()
      Returns the allocated y-coordinate.
      Returns:
      the allocated y-coordinate.
    • setAllocatedY

      public void setAllocatedY​(double y)
      Sets the allocated y-coordinate.
      Parameters:
      y - the y-coordinate.
    • getGap

      public double getGap()
      Returns the gap.
      Returns:
      the gap.
    • getLinkPercent

      public double getLinkPercent()
      Returns the link percent.
      Returns:
      the link percent.
    • compareTo

      public int compareTo​(Object obj)
      Compares this object to an arbitrary object.
      Specified by:
      compareTo in interface Comparable
      Parameters:
      obj - the object to compare against.
      Returns:
      an integer that specifies the relative order of the two objects.
    • toString

      public String toString()
      Returns a string describing the object. This is used for debugging only.
      Overrides:
      toString in class Object
      Returns:
      a string.