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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Object
Deprecated.private int
Deprecated.As of 1.0.6, this field is redundant as you can derive the index from thecolumnKey
field.private Comparable
The column key.private CategoryDataset
The dataset.private Comparable
The row key.private static final long
For serialization.private int
Deprecated.As of 1.0.6, this field is redundant as you can derive the index from therowKey
field. -
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 TypeMethodDescriptionboolean
Tests 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()
.int
Deprecated.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.int
Deprecated.As of 1.0.6, you can derive this information from thegetRowKey()
method.void
setCategory
(Object category) Deprecated.As of version 1.0.6, usesetColumnKey(Comparable)
.void
setCategoryIndex
(int index) Deprecated.As of 1.0.6, usesetColumnKey(Comparable)
to designate the category.void
setColumnKey
(Comparable columnKey) Sets the column key.void
setDataset
(CategoryDataset dataset) Sets the dataset this entity refers to.void
setRowKey
(Comparable rowKey) Sets the row key.void
setSeries
(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
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor serialization.- See Also:
-
dataset
The dataset. -
series
private int seriesDeprecated.As of 1.0.6, this field is redundant as you can derive the index from therowKey
field.The series (zero-based index). -
category
Deprecated.As of 1.0.6, this field is deprecated in favour of thecolumnKey
field.The category. -
categoryIndex
private int categoryIndexDeprecated.As of 1.0.6, this field is redundant as you can derive the index from thecolumnKey
field.The category index. -
rowKey
The row key.- Since:
- 1.0.6
-
columnKey
The column key.- Since:
- 1.0.6
-
-
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 (null
not 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 (null
not permitted).toolTipText
- the tool tip text.urlText
- the URL text.dataset
- the dataset (null
not permitted).rowKey
- the row key (null
not permitted).columnKey
- the column key (null
not 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 (null
not 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 (null
not 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 (null
not permitted).- Since:
- 1.0.6
- See Also:
-
getSeries
public int 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
public void setSeries(int series) 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 (null
permitted).- See Also:
-
getCategoryIndex
public int 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
public void setCategoryIndex(int index) 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:
toString
in classChartEntity
- Returns:
- A string (never
null
).
-
equals
Tests the entity for equality with an arbitrary object.- Overrides:
equals
in classChartEntity
- Parameters:
obj
- the object (null
permitted).- Returns:
- A boolean.
-
columnKey
field.