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
,PublicCloneable
A chart entity that represents one item within a category plot.
- See Also:
-
Constructor Summary
ConstructorDescriptionCategoryItemEntity
(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
Ensures symmetry between super/subclass implementations of equals.boolean
Tests the entity for equality with an arbitrary object.Returns the column key.Returns the dataset this entity refers to.Returns the row key.int
hashCode()
Returns a hash code for this instance.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.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, setArea, setToolTipText, setURLText
-
Constructor Details
-
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).
-
-
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
). - See Also:
-
setRowKey
Sets the row key.- Parameters:
rowKey
- the row key (null
not permitted).- See Also:
-
getColumnKey
Returns the column key.- Returns:
- The column key (never
null
). - See Also:
-
setColumnKey
Sets the column key.- Parameters:
columnKey
- the column key (null
not permitted).- 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.
-
canEqual
Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.- Overrides:
canEqual
in classChartEntity
- Parameters:
other
- Object- Returns:
- true ONLY if the parameter is THIS class type
-
hashCode
Description copied from class:ChartEntity
Returns a hash code for this instance.- Overrides:
hashCode
in classChartEntity
- Returns:
- A hash code.
-