org.jfree.chart.entity

Class LegendItemEntity

public class LegendItemEntity extends ChartEntity implements Cloneable, Serializable

An entity that represents an item within a legend.
Constructor Summary
LegendItemEntity(Shape area)
Creates a legend item entity.
Method Summary
Objectclone()
Returns a clone of the entity.
booleanequals(Object obj)
Tests this object for equality with an arbitrary object.
DatasetgetDataset()
Returns a reference to the dataset that this legend item is derived from.
intgetSeriesIndex()
Returns the series index.
ComparablegetSeriesKey()
Returns the series key that identifies the legend item.
voidsetDataset(Dataset dataset)
Sets a reference to the dataset that this legend item is derived from.
voidsetSeriesIndex(int index)
Sets the series index.
voidsetSeriesKey(Comparable key)
Sets the key for the series.
StringtoString()
Returns a string representing this object (useful for debugging purposes).

Constructor Detail

LegendItemEntity

public LegendItemEntity(Shape area)
Creates a legend item entity.

Parameters: area the area.

Method Detail

clone

public Object clone()
Returns a clone of the entity.

Returns: A clone.

Throws: CloneNotSupportedException if there is a problem cloning the object.

equals

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

Parameters: obj the object (null permitted).

Returns: A boolean.

getDataset

public Dataset getDataset()
Returns a reference to the dataset that this legend item is derived from.

Returns: The dataset.

Since: 1.0.6

See Also: setDataset

getSeriesIndex

public int getSeriesIndex()

Deprecated: As of 1.0.6, use the getSeriesKey method.

Returns the series index.

Returns: The series index.

See Also:

getSeriesKey

public Comparable getSeriesKey()
Returns the series key that identifies the legend item.

Returns: The series key.

Since: 1.0.6

See Also: setSeriesKey

setDataset

public void setDataset(Dataset dataset)
Sets a reference to the dataset that this legend item is derived from.

Parameters: dataset the dataset.

Since: 1.0.6

setSeriesIndex

public void setSeriesIndex(int index)

Deprecated: As of 1.0.6, use the setSeriesKey method.

Sets the series index.

Parameters: index the series index.

See Also:

setSeriesKey

public void setSeriesKey(Comparable key)
Sets the key for the series.

Parameters: key the key.

Since: 1.0.6

See Also: getSeriesKey

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.