## org.jfree.chart
Class LegendItem

    java.lang.Object
      org.jfree.chart.LegendItem

All Implemented Interfaces:
  java.io.Serializable

public class LegendItem
extends java.lang.Object
implements java.io.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
`LegendItem(java.lang.String label, java.awt.Paint paint)` Creates a new legend item.
`LegendItem(java.lang.String label, java.lang.String description, java.awt.Shape shape, boolean shapeFilled, java.awt.Paint paint, java.awt.Paint outlinePaint, java.awt.Stroke stroke)` Deprecated. Use other constructor.
`LegendItem(java.lang.String label, java.lang.String description, java.awt.Shape shape, boolean shapeFilled, java.awt.Paint paint, java.awt.Stroke stroke, java.awt.Paint outlinePaint, java.awt.Stroke outlineStroke)` Creates a new legend item.
`LegendItem(java.lang.String label, java.lang.String description, java.awt.Shape shape, java.awt.Paint paint, java.awt.Paint outlinePaint, java.awt.Stroke stroke)` Deprecated. Use the other constructor.

Method Summary
`boolean` `equals(java.lang.Object obj)` Tests this item for equality with an arbitrary object.
`java.lang.String` `getLabel()` Returns the label.
`java.awt.Paint` `getOutlinePaint()` Returns the outline paint.
`java.awt.Stroke` `getOutlineStroke()` Returns the outline stroke.
`java.awt.Paint` `getPaint()` Returns the paint.
`java.awt.Shape` `getShape()` Returns the shape used to label the series represented by this legend item.
`java.awt.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.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LegendItem

    public LegendItem(java.lang.String label,
                      java.awt.Paint paint)

  Creates a new legend item.

Parameters:
  `label` - the label (`null` not permitted).
  `paint` - the fill paint (`null` not permitted).

### LegendItem

    public LegendItem(java.lang.String label,
                      java.lang.String description,
                      java.awt.Shape shape,
                      boolean shapeFilled,
                      java.awt.Paint paint,
                      java.awt.Stroke stroke,
                      java.awt.Paint outlinePaint,
                      java.awt.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(java.lang.String label,
                      java.lang.String description,
                      java.awt.Shape shape,
                      java.awt.Paint paint,
                      java.awt.Paint outlinePaint,
                      java.awt.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(java.lang.String label,
                      java.lang.String description,
                      java.awt.Shape shape,
                      boolean shapeFilled,
                      java.awt.Paint paint,
                      java.awt.Paint outlinePaint,
                      java.awt.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 Detail

### getLabel

    public java.lang.String getLabel()

  Returns the label.

  Returns:
    The label (never `null`).

### getShape

    public java.awt.Shape 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

    public java.awt.Paint getPaint()

  Returns the paint.

  Returns:
    The paint (never `null`.

### getStroke

    public java.awt.Stroke getStroke()

  Returns the stroke used to render the shape for this series.

  Returns:
    The stroke (never `null`).

### getOutlinePaint

    public java.awt.Paint getOutlinePaint()

  Returns the outline paint.

  Returns:
    The outline paint (never `null`).

### getOutlineStroke

    public java.awt.Stroke getOutlineStroke()

  Returns the outline stroke.

  Returns:
    The outline stroke (never `null`).

### equals

    public boolean equals(java.lang.Object obj)

  Tests this item for equality with an arbitrary object.

  Parameters:
    `obj` - the object (`null` permitted).
  Returns:
    A boolean.