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
An entity that represents an item within a legend.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanEnsures symmetry between super/subclass implementations of equals.clone()Returns a clone of the entity.booleanTests this object for equality with an arbitrary object.Returns a reference to the dataset that this legend item is derived from.Returns the series key that identifies the legend item.inthashCode()Returns a hash code for this instance.voidsetDataset(Dataset dataset) Sets a reference to the dataset that this legend item is derived from.voidsetSeriesKey(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, 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
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
Sets the key for the series.- Parameters:
key- the key.- See Also:
-
equals
Tests this object for equality with an arbitrary object.- Overrides:
equalsin classChartEntity- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
canEqual
Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.- Overrides:
canEqualin classChartEntity- Parameters:
other- Object- Returns:
- true ONLY if the parameter is THIS class type
-
hashCode
Description copied from class:ChartEntityReturns a hash code for this instance.- Overrides:
hashCodein classChartEntity- Returns:
- A hash code.
-
clone
Returns a clone of the entity.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein 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:
toStringin classChartEntity- Returns:
- A string (never
null).
-