com.ijchart.xychart.render.noaxis.pie
Class PieLabelRecord

java.lang.Object
  extended by com.ijchart.xychart.render.noaxis.pie.PieLabelRecord
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class PieLabelRecord
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

Title: IJChart

Description: a chart library for the Java(tm) platform.

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

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Constructor Summary
PieLabelRecord(java.lang.Comparable key, double angle, double baseY, java.awt.geom.Rectangle2D labelRect, java.lang.String label, double labelHeight, double gap, double linkPercent)
           The constructor.
 
Method Summary
 java.lang.Object clone()
           Creates and returns a copy of this object.
 int compareTo(java.lang.Object obj)
           Compares this object to an arbitrary object.
 boolean equals(java.lang.Object obj)
           Tests this instance for equality with an arbitrary object.
 double getAllocatedY()
           Returns the allocated y-coordinate.
 double getAngle()
           Returns the angle of the centre of the section (in radians).
 double getBaseY()
           Returns the base y-coordinate.
 double getGap()
           Returns the gap.
 java.lang.Comparable getKey()
           Returns the section key.
 java.lang.String getLabel()
           The label.
 double getLabelHeight()
           Returns the label height.
 java.awt.geom.Rectangle2D getLabelRect()
           Returns the rectangle containing the label.
 double getLinkPercent()
           Returns the link percent.
 double getLowerY()
           Returns the lower bound of the label.
 double getUpperY()
           Returns the upper bound of the label.
 int hashCode()
           Returns a hash code value for the object.
 void setAllocatedY(double y)
           Sets the allocated y-coordinate.
 void setAngle(double angle)
           Sets the angle of the centre of the section (in radians).
 void setBaseY(double y)
           Returns the base y-coordinate.
 void setGap(double gap)
           Sets the gap.
 void setKey(java.lang.Comparable key)
           Sets the section key.
 void setLabel(java.lang.String label)
           The label.
 void setLabelHeight(double height)
           Sets the label height.
 void setLabelRect(java.awt.geom.Rectangle2D labelRect)
           Sets the rectangle containing the label.
 void setLinkPercent(double percent)
           Sets the link percent.
 java.lang.String toString()
           Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PieLabelRecord

public PieLabelRecord(java.lang.Comparable key,
                      double angle,
                      double baseY,
                      java.awt.geom.Rectangle2D labelRect,
                      java.lang.String label,
                      double labelHeight,
                      double gap,
                      double linkPercent)
The constructor.

Parameters:
key - Comparable The section key.
angle - double The angle of the centre of the section (in radians).
baseY - double The base y-coordinate.
labelRect - Rectangle2D Rectangle containing the label.
label - String The label.
labelHeight - double The label height.
gap - double The gap.
linkPercent - double The link percent.
Method Detail

getKey

public java.lang.Comparable getKey()
Returns the section key.

Returns:
Comparable The key.

setKey

public void setKey(java.lang.Comparable key)
Sets the section key.

Parameters:
key - Comparable The key.

getAngle

public double getAngle()
Returns the angle of the centre of the section (in radians).

Returns:
double The angle.

setAngle

public void setAngle(double angle)
Sets the angle of the centre of the section (in radians).

Parameters:
angle - double The angle.

getBaseY

public double getBaseY()
Returns the base y-coordinate.

Returns:
double The base y-coordinate.

setBaseY

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

Parameters:
y - double The base y-coordinate.

getAllocatedY

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

Returns:
double The base y-coordinate.

setAllocatedY

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

Parameters:
y - double The base y-coordinate.

getLabelRect

public java.awt.geom.Rectangle2D getLabelRect()
Returns the rectangle containing the label.

Returns:
TextBox The label.

setLabelRect

public void setLabelRect(java.awt.geom.Rectangle2D labelRect)
Sets the rectangle containing the label.

Parameters:
labelRect - Rectangle2D Rectangle containing the label.

setLabel

public void setLabel(java.lang.String label)
The label.

Parameters:
label - String The label (null permitted).

getLabel

public java.lang.String getLabel()
The label.

Returns:
String The label.

getLabelHeight

public double getLabelHeight()
Returns the label height.

Returns:
double The height.

setLabelHeight

public void setLabelHeight(double height)
Sets the label height.

Parameters:
height - double The height.

getGap

public double getGap()
Returns the gap.

Returns:
double The gap.

setGap

public void setGap(double gap)
Sets the gap.

Parameters:
gap - double The gap.

getLinkPercent

public double getLinkPercent()
Returns the link percent.

Returns:
double The percent.

setLinkPercent

public void setLinkPercent(double percent)
Sets the link percent.

Parameters:
percent - double The percent.

getLowerY

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

Returns:
double The lower bound.

getUpperY

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

Returns:
double The upper bound.

compareTo

public int compareTo(java.lang.Object obj)
Compares this object to an arbitrary object.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - The object to compare against.
Returns:
An integer that specifies the relative order of the two objects.

equals

public boolean equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object (null permitted).
Returns:
A boolean.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class java.lang.Object
Returns:
int A hash code value for this object.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.

Overrides:
clone in class java.lang.Object
Returns:
object a clone of this instance.
Throws:
java.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.