Package org.jfree.chart.entity
Class CategoryItemEntity
- java.lang.Object
-
- org.jfree.chart.entity.ChartEntity
-
- org.jfree.chart.entity.CategoryItemEntity
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,org.jfree.util.PublicCloneable
public class CategoryItemEntity extends ChartEntity implements java.lang.Cloneable, java.io.Serializable
A chart entity that represents one item within a category plot.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CategoryItemEntity(java.awt.Shape area, java.lang.String toolTipText, java.lang.String urlText, CategoryDataset dataset, int series, java.lang.Object category, int categoryIndex)Deprecated.CategoryItemEntity(java.awt.Shape area, java.lang.String toolTipText, java.lang.String urlText, CategoryDataset dataset, java.lang.Comparable rowKey, java.lang.Comparable columnKey)Creates a new entity instance for an item in the specified dataset.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Tests the entity for equality with an arbitrary object.java.lang.ObjectgetCategory()Deprecated.The return type for this method should beComparable, so it has been deprecated as of version 1.0.6 and replaced bygetColumnKey().intgetCategoryIndex()Deprecated.As of 1.0.6, you can derive this information from thegetColumnKey()method.java.lang.ComparablegetColumnKey()Returns the column key.CategoryDatasetgetDataset()Returns the dataset this entity refers to.java.lang.ComparablegetRowKey()Returns the row key.intgetSeries()Deprecated.As of 1.0.6, you can derive this information from thegetRowKey()method.voidsetCategory(java.lang.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(java.lang.Comparable columnKey)Sets the column key.voidsetDataset(CategoryDataset dataset)Sets the dataset this entity refers to.voidsetRowKey(java.lang.Comparable rowKey)Sets the row key.voidsetSeries(int series)Deprecated.As of 1.0.6, you should usesetRowKey(Comparable)to designate the series.java.lang.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, hashCode, setArea, setToolTipText, setURLText
-
-
-
-
Constructor Detail
-
CategoryItemEntity
public CategoryItemEntity(java.awt.Shape area, java.lang.String toolTipText, java.lang.String urlText, CategoryDataset dataset, int series, java.lang.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(java.awt.Shape area, java.lang.String toolTipText, java.lang.String urlText, CategoryDataset dataset, java.lang.Comparable rowKey, java.lang.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 Detail
-
getDataset
public CategoryDataset 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(CategoryDataset)
-
setDataset
public void setDataset(CategoryDataset dataset)
Sets the dataset this entity refers to.- Parameters:
dataset- the dataset (nullnot permitted).- See Also:
getDataset()
-
getRowKey
public java.lang.Comparable getRowKey()
Returns the row key.- Returns:
- The row key (never
null). - Since:
- 1.0.6
- See Also:
setRowKey(Comparable)
-
setRowKey
public void setRowKey(java.lang.Comparable rowKey)
Sets the row key.- Parameters:
rowKey- the row key (nullnot permitted).- Since:
- 1.0.6
- See Also:
getRowKey()
-
getColumnKey
public java.lang.Comparable getColumnKey()
Returns the column key.- Returns:
- The column key (never
null). - Since:
- 1.0.6
- See Also:
setColumnKey(Comparable)
-
setColumnKey
public void setColumnKey(java.lang.Comparable columnKey)
Sets the column key.- Parameters:
columnKey- the column key (nullnot permitted).- Since:
- 1.0.6
- See Also:
getColumnKey()
-
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(int)
-
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:
getSeries()
-
getCategory
public java.lang.Object 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(Object)
-
setCategory
public void setCategory(java.lang.Object category)
Deprecated.As of version 1.0.6, usesetColumnKey(Comparable).Sets the category.- Parameters:
category- the category (nullpermitted).- See Also:
getCategory()
-
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(int)
-
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:
getCategoryIndex()
-
toString
public java.lang.String toString()
Returns a string representing this object (useful for debugging purposes).- Overrides:
toStringin classChartEntity- Returns:
- A string (never
null).
-
equals
public boolean equals(java.lang.Object obj)
Tests the entity for equality with an arbitrary object.- Overrides:
equalsin classChartEntity- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
-