org.jfree.chart.entity
Class PieSectionEntity

java.lang.Object
  |
  +--org.jfree.chart.entity.ChartEntity
        |
        +--org.jfree.chart.entity.PieSectionEntity

public class PieSectionEntity
extends ChartEntity

A chart entity that represents one section within a pie plot.

Author:
David Gilbert

Constructor Summary
PieSectionEntity(int pieIndex, int sectionIndex, java.lang.Comparable sectionKey, java.awt.Shape area, java.lang.String toolTipText)
          Creates a new pie section entity.
PieSectionEntity(int pieIndex, int sectionIndex, java.lang.Comparable sectionKey, java.awt.Shape area, java.lang.String toolTipText, java.lang.String urlText)
          Creates a new pie section entity.
 
Method Summary
 int getPieIndex()
          Returns the pie index.
 int getSectionIndex()
          Returns the section index.
 java.lang.Comparable getSectionKey()
          Returns the section key.
 void setPieIndex(int index)
          Sets the pie index.
 void setSectionIndex(int index)
          Sets the section index.
 void setSectionKey(java.lang.Comparable key)
          Sets the section key.
 java.lang.String toString()
          Returns a string representing the entity.
 
Methods inherited from class org.jfree.chart.entity.ChartEntity
getArea, getImageMapAreaTag, getImageMapAreaTag, getShapeCoords, getShapeType, getToolTipText, getURLText, setArea, setToolTipText, setURLText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PieSectionEntity

public PieSectionEntity(int pieIndex,
                        int sectionIndex,
                        java.lang.Comparable sectionKey,
                        java.awt.Shape area,
                        java.lang.String toolTipText)
Creates a new pie section entity.

Parameters:
pieIndex - the pie index (zero-based).
sectionIndex - the section index (zero-based).
sectionKey - the section key.
area - the area.
toolTipText - the tool tip text.

PieSectionEntity

public PieSectionEntity(int pieIndex,
                        int sectionIndex,
                        java.lang.Comparable sectionKey,
                        java.awt.Shape area,
                        java.lang.String toolTipText,
                        java.lang.String urlText)
Creates a new pie section entity.

Parameters:
pieIndex - the pie index (zero-based).
sectionIndex - the section index (zero-based).
sectionKey - the section key.
area - the area.
toolTipText - the tool tip text.
urlText - the URL text for HTML image maps.
Method Detail

getPieIndex

public int getPieIndex()
Returns the pie index.

For a regular pie chart, the section index is 0. For a pie chart containing multiple pie plots, the pie index is the row or column index from which the pie data is extracted.

Returns:
The pie index.

setPieIndex

public void setPieIndex(int index)
Sets the pie index.

Parameters:
index - the new index value.

getSectionIndex

public int getSectionIndex()
Returns the section index.

Returns:
The section index.

setSectionIndex

public void setSectionIndex(int index)
Sets the section index.

Parameters:
index - the section index.

getSectionKey

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

Returns:
The section key.

setSectionKey

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

Parameters:
key - the section key.

toString

public java.lang.String toString()
Returns a string representing the entity.

Overrides:
toString in class java.lang.Object
Returns:
a string representing the entity.