public class

LegendItemEntity

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

Class Overview

An entity that represents an item within a legend.

Summary

Public Constructors
LegendItemEntity(Shape area)
Creates a legend item entity.
Public Methods
Object clone()
Returns a clone of the entity.
boolean equals(Object obj)
Tests this object for equality with an arbitrary object.
Dataset getDataset()
Returns a reference to the dataset that this legend item is derived from.
int getSeriesIndex()
This method is deprecated. As of 1.0.6, use the getSeriesKey() method.
Comparable getSeriesKey()
Returns the series key that identifies the legend item.
void setDataset(Dataset dataset)
Sets a reference to the dataset that this legend item is derived from.
void setSeriesIndex(int index)
This method is deprecated. As of 1.0.6, use the setSeriesKey(Comparable) method.
void setSeriesKey(Comparable key)
Sets the key for 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 LegendItemEntity (Shape area)

Creates a legend item entity.

Parameters
area the area.

Public Methods

public Object clone ()

Returns a clone of the entity.

Returns
  • A clone.
Throws
CloneNotSupportedException if there is a problem cloning the object.

public boolean equals (Object obj)

Tests this object for equality with an arbitrary object.

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

public Dataset getDataset ()

Returns a reference to the dataset that this legend item is derived from.

Returns
  • The dataset.

public int getSeriesIndex ()

This method is deprecated.
As of 1.0.6, use the getSeriesKey() method.

Returns the series index.

Returns
  • The series index.

public Comparable getSeriesKey ()

Returns the series key that identifies the legend item.

Returns
  • The series key.

public void setDataset (Dataset dataset)

Sets a reference to the dataset that this legend item is derived from.

Parameters
dataset the dataset.

public void setSeriesIndex (int index)

This method is deprecated.
As of 1.0.6, use the setSeriesKey(Comparable) method.

Sets the series index.

Parameters
index the series index.
See Also

public void setSeriesKey (Comparable key)

Sets the key for the series.

Parameters
key the key.
See Also

public String toString ()

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

Returns
  • A string (never null).