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,org.jfree.util.PublicCloneable
A chart entity that represents one item within a category plot.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCategoryItemEntity(Shape area, String toolTipText, String urlText, CategoryDataset dataset, int series, Object category, int categoryIndex) Deprecated.CategoryItemEntity(Shape area, String toolTipText, String urlText, CategoryDataset dataset, Comparable rowKey, Comparable columnKey) Creates a new entity instance for an item in the specified dataset. -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests the entity for equality with an arbitrary object.Deprecated.The return type for this method should beComparable, so it has been deprecated as of version 1.0.6 and replaced bygetColumnKey().intDeprecated.As of 1.0.6, you can derive this information from thegetColumnKey()method.Returns the column key.Returns the dataset this entity refers to.Returns the row key.intDeprecated.As of 1.0.6, you can derive this information from thegetRowKey()method.voidsetCategory(Object category) Deprecated.As of version 1.0.6, usesetColumnKey(Comparable).voidsetCategoryIndex(int index) Deprecated.As of 1.0.6, usesetColumnKey(Comparable)to designate the category.voidsetColumnKey(Comparable columnKey) Sets the column key.voidsetDataset(CategoryDataset dataset) Sets the dataset this entity refers to.voidsetRowKey(Comparable rowKey) Sets the row key.voidsetSeries(int series) Deprecated.As of 1.0.6, you should usesetRowKey(Comparable)to designate the series.toString()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, hashCode, setArea, setToolTipText, setURLText
-
Constructor Details
-
CategoryItemEntity
public CategoryItemEntity(Shape area, String toolTipText, String urlText, CategoryDataset dataset, int series, Object category, int categoryIndex) Deprecated.Creates a new category item entity.- Parameters:
area- the area (nullnot permitted).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, String urlText, CategoryDataset dataset, Comparable rowKey, Comparable columnKey) Creates a new entity instance for an item in the specified dataset.- Parameters:
area- the 'hotspot' area (nullnot permitted).toolTipText- the tool tip text.urlText- the URL text.dataset- the dataset (nullnot permitted).rowKey- the row key (nullnot permitted).columnKey- the column key (nullnot permitted).- Since:
- 1.0.6
-
-
Method Details
-
getDataset
Returns the dataset this entity refers to. This can be used to differentiate between items in a chart that displays more than one dataset.- Returns:
- The dataset (never
null). - See Also:
-
setDataset
Sets the dataset this entity refers to.- Parameters:
dataset- the dataset (nullnot permitted).- See Also:
-
getRowKey
Returns the row key.- Returns:
- The row key (never
null). - Since:
- 1.0.6
- See Also:
-
setRowKey
Sets the row key.- Parameters:
rowKey- the row key (nullnot permitted).- Since:
- 1.0.6
- See Also:
-
getColumnKey
Returns the column key.- Returns:
- The column key (never
null). - Since:
- 1.0.6
- See Also:
-
setColumnKey
Sets the column key.- Parameters:
columnKey- the column key (nullnot permitted).- Since:
- 1.0.6
- See Also:
-
getSeries
Deprecated.As of 1.0.6, you can derive this information from thegetRowKey()method.Returns the series index.- Returns:
- The series index.
- See Also:
-
setSeries
Deprecated.As of 1.0.6, you should usesetRowKey(Comparable)to designate the series.Sets the series index.- Parameters:
series- the series index (zero-based).- See Also:
-
getCategory
Deprecated.The return type for this method should beComparable, so it has been deprecated as of version 1.0.6 and replaced bygetColumnKey().Returns the category.- Returns:
- The category (possibly
null). - See Also:
-
setCategory
Deprecated.As of version 1.0.6, usesetColumnKey(Comparable).Sets the category.- Parameters:
category- the category (nullpermitted).- See Also:
-
getCategoryIndex
Deprecated.As of 1.0.6, you can derive this information from thegetColumnKey()method.Returns the category index.- Returns:
- The index.
- See Also:
-
setCategoryIndex
Deprecated.As of 1.0.6, usesetColumnKey(Comparable)to designate the category.Sets the category index.- Parameters:
index- the category index.- See Also:
-
toString
Returns a string representing this object (useful for debugging purposes).- Overrides:
toStringin classChartEntity- Returns:
- A string (never
null).
-
equals
Tests the entity for equality with an arbitrary object.- Overrides:
equalsin classChartEntity- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
CategoryItemEntity(Shape, String, String, CategoryDataset, Comparable, Comparable).