public class

PieSectionEntity

extends ChartEntity
implements Serializable
java.lang.Object
   ↳ org.jfree.chart.entity.ChartEntity
     ↳ org.jfree.chart.entity.PieSectionEntity

Class Overview

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

Summary

Public Constructors
PieSectionEntity(Shape area, PieDataset dataset, int pieIndex, int sectionIndex, Comparable sectionKey, String toolTipText, String urlText)
Creates a new pie section entity.
Public Methods
boolean equals(Object obj)
Tests this entity for equality with an arbitrary object.
PieDataset getDataset()
Returns the dataset this entity refers to.
int getPieIndex()
Returns the pie index.
int getSectionIndex()
Returns the section index.
Comparable getSectionKey()
Returns the section key.
int hashCode()
Returns a hash code for this instance.
void setDataset(PieDataset dataset)
Sets the dataset 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.
[Expand]
Inherited Methods
From class org.jfree.chart.entity.ChartEntity
From class java.lang.Object

Public Constructors

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.

Public Methods

public boolean equals (Object obj)

Tests this entity for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public PieDataset getDataset ()

Returns the dataset this entity refers to.

Returns
  • The dataset.

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.
See Also

public int getSectionIndex ()

Returns the section index.

Returns
  • The section index.

public Comparable getSectionKey ()

Returns the section key.

Returns
  • The section key.

public int hashCode ()

Returns a hash code for this instance.

Returns
  • A hash code.

public void setDataset (PieDataset dataset)

Sets the dataset this entity refers to.

Parameters
dataset the dataset.
See Also

public void setPieIndex (int index)

Sets the pie index.

Parameters
index the new index value.
See Also

public void setSectionIndex (int index)

Sets the section index.

Parameters
index the section index.

public void setSectionKey (Comparable key)

Sets the section key.

Parameters
key the section key.
See Also

public String toString ()

Returns a string representing the entity.

Returns
  • A string representing the entity.