Package org.jfree.chart.entity
Class PieSectionEntity
java.lang.Object
org.jfree.chart.entity.ChartEntity
org.jfree.chart.entity.PieSectionEntity
- All Implemented Interfaces:
Serializable
,Cloneable
public class PieSectionEntity extends ChartEntity
A chart entity that represents one section within a pie plot.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description PieSectionEntity(int pieIndex, int sectionIndex, Comparable sectionKey, Shape area, String toolTipText)
Deprecated.Use alternative constructor.PieSectionEntity(int pieIndex, int sectionIndex, Comparable sectionKey, Shape area, String toolTipText, String urlText)
Deprecated.Use alternative constructor.PieSectionEntity(Shape area, PieDataset dataset, int pieIndex, int sectionIndex, Comparable sectionKey, String toolTipText, String urlText)
Creates a new pie section entity. -
Method Summary
Modifier and Type Method Description PieDataset
getDataset()
Returns the datset this entity refers to.int
getPieIndex()
Returns the pie index.int
getSectionIndex()
Returns the section index.Comparable
getSectionKey()
Returns the section key.void
setDataset(PieDataset dataset)
Sets the datset this entity refers to.void
setPieIndex(int index)
Sets the pie index.void
setSectionIndex(int index)
Sets the section index.void
setSectionKey(Comparable key)
Sets the section key.String
toString()
Returns a string representing the entity.Methods inherited from class org.jfree.chart.entity.ChartEntity
clone, equals, getArea, getImageMapAreaTag, getShapeCoords, getShapeType, getToolTipText, getURLText, setArea, setToolTipText, setURLText
-
Constructor Details
-
PieSectionEntity
public PieSectionEntity(int pieIndex, int sectionIndex, Comparable sectionKey, Shape area, String toolTipText)Deprecated.Use alternative constructor.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, Comparable sectionKey, Shape area, String toolTipText, String urlText)Deprecated.Use alternative constructor.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.
-
PieSectionEntity
public PieSectionEntity(Shape area, PieDataset dataset, int pieIndex, int sectionIndex, Comparable sectionKey, String toolTipText, String urlText)Creates a new pie section entity.- Parameters:
area
- the area.dataset
- the pie dataset.pieIndex
- the pie index (zero-based).sectionIndex
- the section index (zero-based).sectionKey
- the section key.toolTipText
- the tool tip text.urlText
- the URL text for HTML image maps.
-
-
Method Details
-
getDataset
Returns the datset this entity refers to.- Returns:
- the dataset.
-
setDataset
Sets the datset this entity refers to.- Parameters:
dataset
- the dataset.
-
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
Returns the section key.- Returns:
- The section key.
-
setSectionKey
Sets the section key.- Parameters:
key
- the section key.
-
toString
Returns a string representing the entity.
-