org.jfree.chart.plot

Class PieLabelRecord

public class PieLabelRecord extends Object implements Comparable

A structure that retains information about the label for a section in a pie chart.
Constructor Summary
PieLabelRecord(Comparable key, double angle, double baseY, TextBox label, double labelHeight, double gap, double linkPercent)
Creates a new record.
Method Summary
intcompareTo(Object obj)
Compares this object to an arbitrary object.
doublegetAllocatedY()
Returns the allocated y-coordinate.
doublegetAngle()
Returns the angle.
doublegetBaseY()
Returns the base y-coordinate.
doublegetGap()
Returns the gap.
ComparablegetKey()
Returns the key for the section that the label applies to.
TextBoxgetLabel()
Returns the label.
doublegetLabelHeight()
Returns the label height.
doublegetLinkPercent()
Returns the link percent.
doublegetLowerY()
Returns the lower bound of the label.
doublegetUpperY()
Returns the upper bound of the label.
voidsetAllocatedY(double y)
Sets the allocated y-coordinate.
voidsetBaseY(double base)
Sets the base y-coordinate.
StringtoString()
Returns a string describing the object.

Constructor Detail

PieLabelRecord

public PieLabelRecord(Comparable key, double angle, double baseY, 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 Detail

compareTo

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.

getAllocatedY

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

Returns: The allocated y-coordinate.

getAngle

public double getAngle()
Returns the angle.

Returns: The angle.

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.

getGap

public double getGap()
Returns the gap.

Returns: The gap.

getKey

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

Returns: The key.

getLabel

public TextBox getLabel()
Returns the label.

Returns: The label.

getLabelHeight

public double getLabelHeight()
Returns the label height.

Returns: The label height (in Java2D units).

getLinkPercent

public double getLinkPercent()
Returns the link percent.

Returns: The link percent.

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.

setAllocatedY

public void setAllocatedY(double y)
Sets the allocated y-coordinate.

Parameters: y the y-coordinate.

setBaseY

public void setBaseY(double base)
Sets the base y-coordinate.

Parameters: base the base y-coordinate.

toString

public String toString()
Returns a string describing the object. This is used for debugging only.

Returns: A string.