org.jfree.chart.entity

Class CategoryItemEntity

public class CategoryItemEntity extends ChartEntity implements Cloneable, Serializable

A chart entity that represents one item within a category plot.
Constructor Summary
CategoryItemEntity(Shape area, String toolTipText, String urlText, CategoryDataset dataset, int series, Object category, int categoryIndex)
Creates a new category item entity.
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
booleanequals(Object obj)
Tests the entity for equality with an arbitrary object.
ObjectgetCategory()
Returns the category.
intgetCategoryIndex()
Returns the category index.
ComparablegetColumnKey()
Returns the column key.
CategoryDatasetgetDataset()
Returns the dataset this entity refers to.
ComparablegetRowKey()
Returns the row key.
intgetSeries()
Returns the series index.
voidsetCategory(Object category)
Sets the category.
voidsetCategoryIndex(int index)
Sets the category index.
voidsetColumnKey(Comparable columnKey)
Sets the column key.
voidsetDataset(CategoryDataset dataset)
Sets the dataset this entity refers to.
voidsetRowKey(Comparable rowKey)
Sets the row key.
voidsetSeries(int series)
Sets the series index.
StringtoString()
Returns a string representing this object (useful for debugging purposes).

Constructor Detail

CategoryItemEntity

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

Deprecated: As of 1.0.6, use CategoryItemEntity.

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 Detail

equals

public boolean equals(Object obj)
Tests the entity for equality with an arbitrary object.

Parameters: obj the object (null permitted).

Returns: A boolean.

getCategory

public Object getCategory()

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

See Also:

getCategoryIndex

public int getCategoryIndex()

Deprecated: As of 1.0.6, you can derive this information from the getColumnKey method.

Returns the category index.

Returns: The index.

See Also:

getColumnKey

public Comparable getColumnKey()
Returns the column key.

Returns: The column key (never null).

Since: 1.0.6

See Also: setColumnKey

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

getRowKey

public Comparable getRowKey()
Returns the row key.

Returns: The row key (never null).

Since: 1.0.6

See Also: setRowKey

getSeries

public int getSeries()

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:

setCategory

public void setCategory(Object category)

Deprecated: As of version 1.0.6, use setColumnKey.

Sets the category.

Parameters: category the category (null permitted).

See Also:

setCategoryIndex

public void setCategoryIndex(int index)

Deprecated: As of 1.0.6, use setColumnKey to designate the category.

Sets the category index.

Parameters: index the category index.

See Also:

setColumnKey

public void setColumnKey(Comparable columnKey)
Sets the column key.

Parameters: columnKey the column key (null not permitted).

Since: 1.0.6

See Also: getColumnKey

setDataset

public void setDataset(CategoryDataset dataset)
Sets the dataset this entity refers to.

Parameters: dataset the dataset (null not permitted).

See Also: getDataset

setRowKey

public void setRowKey(Comparable rowKey)
Sets the row key.

Parameters: rowKey the row key (null not permitted).

Since: 1.0.6

See Also: getRowKey

setSeries

public void setSeries(int series)

Deprecated: As of 1.0.6, you should use setRowKey to designate the series.

Sets the series index.

Parameters: series the series index (zero-based).

See Also:

toString

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

Returns: A string (never null).

Copyright © 2000-2009 by Object Refinery Limited. All Rights Reserved.