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
,org.jfree.util.PublicCloneable
An entity that represents an item within a legend.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a clone of the entity.boolean
Tests this object for equality with an arbitrary object.Returns a reference to the dataset that this legend item is derived from.int
Deprecated.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) Deprecated.As of 1.0.6, use thesetSeriesKey(Comparable)
method.void
setSeriesKey
(Comparable key) Sets the key for the series.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.
- Since:
- 1.0.6
- See Also:
-
setDataset
Sets a reference to the dataset that this legend item is derived from.- Parameters:
dataset
- the dataset.- Since:
- 1.0.6
-
getSeriesKey
Returns the series key that identifies the legend item.- Returns:
- The series key.
- Since:
- 1.0.6
- See Also:
-
setSeriesKey
Sets the key for the series.- Parameters:
key
- the key.- Since:
- 1.0.6
- See Also:
-
getSeriesIndex
Deprecated.As of 1.0.6, use thegetSeriesKey()
method.Returns the series index.- Returns:
- The series index.
- See Also:
-
setSeriesIndex
Deprecated.As of 1.0.6, use thesetSeriesKey(Comparable)
method.Sets the series index.- Parameters:
index
- the series index.- See Also:
-
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 interfaceorg.jfree.util.PublicCloneable
- 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
).
-
getSeriesKey()
method.