Package org.jfree.chart
Class LegendItem
java.lang.Object
org.jfree.chart.LegendItem
- All Implemented Interfaces:
 Serializable
public class LegendItem extends Object implements Serializable
A legend item. Records all the properties of a legend item, but is not
 concerned about the display location. Instances of this class are immutable.
- See Also:
 - Serialized Form
 
- 
Constructor Summary
Constructors Constructor Description LegendItem(String label, Paint paint)Creates a new legend item.LegendItem(String label, String description, Shape shape, boolean shapeFilled, Paint paint, Paint outlinePaint, Stroke stroke)Deprecated.Use other constructor.LegendItem(String label, String description, Shape shape, boolean shapeFilled, Paint paint, Stroke stroke, Paint outlinePaint, Stroke outlineStroke)Creates a new legend item.LegendItem(String label, String description, Shape shape, Paint paint, Paint outlinePaint, Stroke stroke)Deprecated.Use the other constructor. - 
Method Summary
Modifier and Type Method Description booleanequals(Object obj)Tests this item for equality with an arbitrary object.StringgetLabel()Returns the label.PaintgetOutlinePaint()Returns the outline paint.StrokegetOutlineStroke()Returns the outline stroke.PaintgetPaint()Returns the paint.ShapegetShape()Returns the shape used to label the series represented by this legend item.StrokegetStroke()Returns the stroke used to render the shape for this series.booleanisShapeFilled()Returns a flag that controls whether or not the shape is filled. 
- 
Constructor Details
- 
LegendItem
Creates a new legend item.- Parameters:
 label- the label (nullnot permitted).paint- the fill paint (nullnot permitted).
 - 
LegendItem
public LegendItem(String label, String description, Shape shape, boolean shapeFilled, Paint paint, Stroke stroke, Paint outlinePaint, Stroke outlineStroke)Creates a new legend item.- Parameters:
 label- the label (nullnot permitted).description- the description (not currently used,nullpermitted).shape- the shape (nullpermitted).shapeFilled- a flag that controls whether or not the shape is filled.paint- the paint (nullnot permitted).stroke- the stroke (nullnot permitted).outlinePaint- the outline paint (nullnot permitted).outlineStroke- the outline stroke (nullnot permitted).
 - 
LegendItem
public LegendItem(String label, String description, Shape shape, Paint paint, Paint outlinePaint, Stroke stroke)Deprecated.Use the other constructor.Creates a new legend item.- Parameters:
 label- the label.description- the description (not used).shape- the shape.paint- the paint.outlinePaint- the outline paint.stroke- the stroke.
 - 
LegendItem
public LegendItem(String label, String description, Shape shape, boolean shapeFilled, Paint paint, Paint outlinePaint, Stroke stroke)Deprecated.Use other constructor.Creates a new legend item.- Parameters:
 label- the label.description- the description (not used).shape- the shape.shapeFilled- a flag that controls whether or not the shape is filled.paint- the paint.outlinePaint- the outline paint.stroke- the stroke.
 
 - 
 - 
Method Details
- 
getLabel
Returns the label.- Returns:
 - The label (never 
null). 
 - 
getShape
Returns the shape used to label the series represented by this legend item.- Returns:
 - The shape (never 
null). 
 - 
isShapeFilled
public boolean isShapeFilled()Returns a flag that controls whether or not the shape is filled.- Returns:
 - A boolean.
 
 - 
getPaint
Returns the paint.- Returns:
 - The paint (never 
null. 
 - 
getStroke
Returns the stroke used to render the shape for this series.- Returns:
 - The stroke (never 
null). 
 - 
getOutlinePaint
Returns the outline paint.- Returns:
 - The outline paint (never 
null). 
 - 
getOutlineStroke
Returns the outline stroke.- Returns:
 - The outline stroke (never 
null). 
 - 
equals
Tests this item for equality with an arbitrary object. 
 -