public class

PieLabelRecord

extends Object
implements Serializable Comparable<T>
java.lang.Object
   ↳ org.jfree.chart.plot.PieLabelRecord

Class Overview

A structure that retains information about the label for a section in a pie chart.

Summary

Public Constructors
PieLabelRecord(Comparable key, double angle, double baseY, TextBox label, double labelHeight, double gap, double linkPercent)
Creates a new record.
Public Methods
int compareTo(Object obj)
Compares this object to an arbitrary object.
boolean equals(Object obj)
Tests this record for equality with an arbitrary object.
double getAllocatedY()
Returns the allocated y-coordinate.
double getAngle()
Returns the angle of the middle of the section, in radians.
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.
TextBox getLabel()
Returns the label.
double getLabelHeight()
Returns the label height (you could derive this from the label itself, but we cache the value so it can be retrieved quickly).
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.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.lang.Comparable

Public Constructors

public PieLabelRecord (Comparable key, double angle, double baseY, TextBox label, double labelHeight, double gap, double linkPercent)

Creates a new record.

Parameters
key the section key.
angle the angle to the middle of the section (in radians).
baseY the base y-coordinate.
label the section label.
labelHeight the label height (in Java2D units).
gap the offset to the left.
linkPercent the link percent.

Public Methods

public int compareTo (Object obj)

Compares this object to an arbitrary object.

Parameters
obj the object to compare against.
Returns
  • An integer that specifies the relative order of the two objects.

public boolean equals (Object obj)

Tests this record for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public double getAllocatedY ()

Returns the allocated y-coordinate.

Returns
  • The allocated y-coordinate.

public double getAngle ()

Returns the angle of the middle of the section, in radians.

Returns
  • The angle, in radians.

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.

public double getGap ()

Returns the gap.

Returns
  • The gap.

public Comparable getKey ()

Returns the key for the section that the label applies to.

Returns
  • The key.

public TextBox getLabel ()

Returns the label.

Returns
  • The label.

public double getLabelHeight ()

Returns the label height (you could derive this from the label itself, but we cache the value so it can be retrieved quickly).

Returns
  • The label height (in Java2D units).

public double getLinkPercent ()

Returns the link percent.

Returns
  • The link percent.

public double getLowerY ()

Returns the lower bound of the label.

Returns
  • The lower bound.

public double getUpperY ()

Returns the upper bound of the label.

Returns
  • The upper bound.

public void setAllocatedY (double y)

Sets the allocated y-coordinate.

Parameters
y the y-coordinate.

public void setBaseY (double base)

Sets the base y-coordinate.

Parameters
base the base y-coordinate.

public String toString ()

Returns a string describing the object. This is used for debugging only.

Returns
  • A string.