public class PieLabelRecord
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private double |
allocatedY
The allocated y-coordinate.
|
private double |
angle
The angle of the centre of the section (in radians).
|
private double |
baseY
The base y-coordinate.
|
private double |
gap
The gap.
|
private java.lang.Comparable |
key
The section key.
|
private org.jfree.text.TextBox |
label
The label.
|
private double |
labelHeight
The label height.
|
private double |
linkPercent
The link percent.
|
| Constructor and Description |
|---|
PieLabelRecord(java.lang.Comparable key,
double angle,
double baseY,
org.jfree.text.TextBox label,
double labelHeight,
double gap,
double linkPercent)
Creates a new record.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object obj)
Compares this object to an arbitrary object.
|
boolean |
equals(java.lang.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.
|
java.lang.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 (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.
|
java.lang.String |
toString()
Returns a string describing the object.
|
private java.lang.Comparable key
private double angle
private double baseY
private double allocatedY
private org.jfree.text.TextBox label
private double labelHeight
private double gap
private double linkPercent
public PieLabelRecord(java.lang.Comparable key,
double angle,
double baseY,
org.jfree.text.TextBox label,
double labelHeight,
double gap,
double linkPercent)
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 double getBaseY()
public void setBaseY(double base)
base - the base y-coordinate.public double getLowerY()
public double getUpperY()
public double getAngle()
public java.lang.Comparable getKey()
public org.jfree.text.TextBox getLabel()
public double getLabelHeight()
public double getAllocatedY()
public void setAllocatedY(double y)
y - the y-coordinate.public double getGap()
public double getLinkPercent()
public int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparableobj - the object to compare against.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).public java.lang.String toString()
toString in class java.lang.Object