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
ConstructorsConstructorDescriptionCategoryItemEntity(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 TypeMethodDescriptionbooleanEnsures symmetry between super/subclass implementations of equals.booleanTests the entity for equality with an arbitrary object.Returns the column key.Returns the dataset this entity refers to.Returns the row key.inthashCode()Returns a hash code for this instance.voidsetColumnKey(Comparable columnKey) Sets the column key.voidsetDataset(CategoryDataset dataset) Sets the dataset this entity refers to.voidsetRowKey(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 (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).
-
-
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). - See Also:
-
setRowKey
Sets the row key.- Parameters:
rowKey- the row key (nullnot 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 (nullnot permitted).- 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.
-
canEqual
Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.- Overrides:
canEqualin classChartEntity- Parameters:
other- Object- Returns:
- true ONLY if the parameter is THIS class type
-
hashCode
Description copied from class:ChartEntityReturns a hash code for this instance.- Overrides:
hashCodein classChartEntity- Returns:
- A hash code.
-