Package org.jfree.chart.entity
Class LegendItemEntity
java.lang.Object
org.jfree.chart.entity.ChartEntity
org.jfree.chart.entity.LegendItemEntity
- All Implemented Interfaces:
Serializable
,Cloneable
,PublicCloneable
public class LegendItemEntity extends ChartEntity implements Cloneable, Serializable
An entity that represents an item within a legend.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description LegendItemEntity(Shape area)
Creates a legend item entity. -
Method Summary
Modifier and Type Method Description 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.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
setSeriesKey(Comparable key)
Sets the key for the series.String
toString()
Returns a string representing this object (useful for debugging purposes).Methods inherited from class org.jfree.chart.entity.ChartEntity
getArea, getImageMapAreaTag, getShapeCoords, getShapeType, getToolTipText, getURLText, hashCode, setArea, setToolTipText, setURLText
-
Constructor Details
-
LegendItemEntity
Creates a legend item entity.- Parameters:
area
- the area.
-
-
Method Details
-
getDataset
Returns a reference to the dataset that this legend item is derived from.- Returns:
- The dataset.
- See Also:
setDataset(Dataset)
-
setDataset
Sets a reference to the dataset that this legend item is derived from.- Parameters:
dataset
- the dataset.
-
getSeriesKey
Returns the series key that identifies the legend item.- Returns:
- The series key.
- See Also:
setSeriesKey(Comparable)
-
setSeriesKey
Sets the key for the series.- Parameters:
key
- the key.- See Also:
getSeriesKey()
-
equals
Tests this object for equality with an arbitrary object.- Overrides:
equals
in classChartEntity
- Parameters:
obj
- the object (null
permitted).- Returns:
- A boolean.
-
clone
Returns a clone of the entity.- Specified by:
clone
in interfacePublicCloneable
- Overrides:
clone
in classChartEntity
- Returns:
- A clone.
- Throws:
CloneNotSupportedException
- if there is a problem cloning the object.
-
toString
Returns a string representing this object (useful for debugging purposes).- Overrides:
toString
in classChartEntity
- Returns:
- A string (never
null
).
-