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 boolean
equals(Object obj)
Tests this item for equality with an arbitrary object.String
getLabel()
Returns the label.Paint
getOutlinePaint()
Returns the outline paint.Stroke
getOutlineStroke()
Returns the outline stroke.Paint
getPaint()
Returns the paint.Shape
getShape()
Returns the shape used to label the series represented by this legend item.Stroke
getStroke()
Returns the stroke used to render the shape for this series.boolean
isShapeFilled()
Returns a flag that controls whether or not the shape is filled.
-
Constructor Details
-
LegendItem
Creates a new legend item.- Parameters:
label
- the label (null
not permitted).paint
- the fill paint (null
not 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 (null
not permitted).description
- the description (not currently used,null
permitted).shape
- the shape (null
permitted).shapeFilled
- a flag that controls whether or not the shape is filled.paint
- the paint (null
not permitted).stroke
- the stroke (null
not permitted).outlinePaint
- the outline paint (null
not permitted).outlineStroke
- the outline stroke (null
not 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.
-