Package org.jfree.chart.entity
Class CategoryItemEntity
java.lang.Object
org.jfree.chart.entity.ChartEntity
org.jfree.chart.entity.CategoryItemEntity
- All Implemented Interfaces:
Serializable,Cloneable
public class CategoryItemEntity extends ChartEntity implements Cloneable, Serializable
A chart entity that represents one item within a category plot.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description CategoryItemEntity(Shape area, String toolTipText, int series, Object category, int categoryIndex)Deprecated.Use alternative constructor.CategoryItemEntity(Shape area, String toolTipText, String urlText, int series, Object category, int categoryIndex)Deprecated.Use alternative constructor.CategoryItemEntity(Shape area, String toolTipText, String urlText, CategoryDataset dataset, int series, Object category, int categoryIndex)Creates a new category item entity. -
Method Summary
Modifier and Type Method Description booleanequals(Object obj)Tests the entity for equality with an arbitrary object.ObjectgetCategory()Returns the category.intgetCategoryIndex()Returns the category index.CategoryDatasetgetDataset()Returns the datset this entity refers to.intgetSeries()Returns the series index.voidsetCategory(Object category)Sets the category.voidsetCategoryIndex(int index)Sets the category index.voidsetDataset(CategoryDataset dataset)Sets the datset this entity refers to.voidsetSeries(int series)Sets the series index.StringtoString()Returns a string representing this object (useful for debugging purposes).Methods inherited from class org.jfree.chart.entity.ChartEntity
clone, getArea, getImageMapAreaTag, getShapeCoords, getShapeType, getToolTipText, getURLText, setArea, setToolTipText, setURLText
-
Constructor Details
-
CategoryItemEntity
public CategoryItemEntity(Shape area, String toolTipText, String urlText, CategoryDataset dataset, int series, Object category, int categoryIndex)Creates a new category item entity.- Parameters:
area- the area.toolTipText- the tool tip text.urlText- the URL text for HTML image maps.dataset- the dataset.series- the series (zero-based index).category- the category.categoryIndex- the category index.
-
CategoryItemEntity
public CategoryItemEntity(Shape area, String toolTipText, int series, Object category, int categoryIndex)Deprecated.Use alternative constructor.Creates a new category item entity.- Parameters:
area- the area.toolTipText- the tool tip text.series- the series (zero-based index).category- the category.categoryIndex- the index of the category.
-
CategoryItemEntity
public CategoryItemEntity(Shape area, String toolTipText, String urlText, int series, Object category, int categoryIndex)Deprecated.Use alternative constructor.Creates a new category item entity.- Parameters:
area- the area.toolTipText- the tool tip text.urlText- the URL text for HTML image maps.series- the series (zero-based index).category- the category.categoryIndex- the category index.
-
-
Method Details
-
getDataset
Returns the datset this entity refers to.- Returns:
- The dataset (possibly
null).
-
setDataset
Sets the datset this entity refers to.- Parameters:
dataset- the dataset (nullpermited).
-
getSeries
public int getSeries()Returns the series index.- Returns:
- The series index.
-
setSeries
public void setSeries(int series)Sets the series index.- Parameters:
series- the series index (zero-based).
-
getCategory
Returns the category.- Returns:
- The category (possibly
null).
-
setCategory
Sets the category.- Parameters:
category- the category (nullpermitted).
-
getCategoryIndex
public int getCategoryIndex()Returns the category index.- Returns:
- The index.
-
setCategoryIndex
public void setCategoryIndex(int index)Sets the category index.- Parameters:
index- the category index.
-
toString
Returns a string representing this object (useful for debugging purposes). -
equals
Tests the entity for equality with an arbitrary object.- Overrides:
equalsin classChartEntity- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-