public class

CategoryItemEntity

extends ChartEntity
implements Serializable Cloneable
java.lang.Object
   ↳ org.jfree.chart.entity.ChartEntity
     ↳ org.jfree.chart.entity.CategoryItemEntity

Class Overview

A chart entity that represents one item within a category plot.

Summary

Public Constructors
CategoryItemEntity(Shape area, String toolTipText, String urlText, CategoryDataset dataset, int series, Object category, int categoryIndex)
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.
Public Methods
boolean equals(Object obj)
Tests the entity for equality with an arbitrary object.
Object getCategory()
This method is deprecated. The return type for this method should be Comparable, so it has been deprecated as of version 1.0.6 and replaced by getColumnKey().
int getCategoryIndex()
This method is deprecated. As of 1.0.6, you can derive this information from the getColumnKey() method.
Comparable getColumnKey()
Returns the column key.
CategoryDataset getDataset()
Returns the dataset this entity refers to.
Comparable getRowKey()
Returns the row key.
int getSeries()
This method is deprecated. As of 1.0.6, you can derive this information from the getRowKey() method.
void setCategory(Object category)
This method is deprecated. As of version 1.0.6, use setColumnKey(Comparable).
void setCategoryIndex(int index)
This method is deprecated. As of 1.0.6, use setColumnKey(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)
This method is deprecated. As of 1.0.6, you should use setRowKey(Comparable) to designate the series.
String toString()
Returns a string representing this object (useful for debugging purposes).
[Expand]
Inherited Methods
From class org.jfree.chart.entity.ChartEntity
From class java.lang.Object

Public Constructors

public CategoryItemEntity (Shape area, String toolTipText, String urlText, CategoryDataset dataset, int series, Object category, int categoryIndex)

This constructor is deprecated.
As of 1.0.6, use CategoryItemEntity(Shape, String, String, CategoryDataset, Comparable, Comparable).

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.

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).

Public Methods

public boolean equals (Object obj)

Tests the entity for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public Object getCategory ()

This method is deprecated.
The return type for this method should be Comparable, so it has been deprecated as of version 1.0.6 and replaced by getColumnKey().

Returns the category.

Returns
  • The category (possibly null).

public int getCategoryIndex ()

This method is deprecated.
As of 1.0.6, you can derive this information from the getColumnKey() method.

Returns the category index.

Returns
  • The index.

public Comparable getColumnKey ()

Returns the column key.

Returns
  • The column key (never null).

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).

public Comparable getRowKey ()

Returns the row key.

Returns
  • The row key (never null).

public int getSeries ()

This method is deprecated.
As of 1.0.6, you can derive this information from the getRowKey() method.

Returns the series index.

Returns
  • The series index.
See Also

public void setCategory (Object category)

This method is deprecated.
As of version 1.0.6, use setColumnKey(Comparable).

Sets the category.

Parameters
category the category (null permitted).
See Also

public void setCategoryIndex (int index)

This method is deprecated.
As of 1.0.6, use setColumnKey(Comparable) to designate the category.

Sets the category index.

Parameters
index the category index.

public void setColumnKey (Comparable columnKey)

Sets the column key.

Parameters
columnKey the column key (null not permitted).
See Also

public void setDataset (CategoryDataset dataset)

Sets the dataset this entity refers to.

Parameters
dataset the dataset (null not permitted).
See Also

public void setRowKey (Comparable rowKey)

Sets the row key.

Parameters
rowKey the row key (null not permitted).
See Also

public void setSeries (int series)

This method is deprecated.
As of 1.0.6, you should use setRowKey(Comparable) to designate the series.

Sets the series index.

Parameters
series the series index (zero-based).
See Also

public String toString ()

Returns a string representing this object (useful for debugging purposes).

Returns
  • A string (never null).