Class LegendItem

java.lang.Object
org.jfree.chart.LegendItem
All Implemented Interfaces:
Serializable, Cloneable

public class LegendItem extends Object implements Cloneable, Serializable
A temporary storage object for recording the properties of a legend item, without any consideration for layout issues.
See Also:
  • Constructor Details

    • LegendItem

      public LegendItem(String label)
      Creates a legend item with the specified label. The remaining attributes take default values.
      Parameters:
      label - the label (null not permitted).
    • LegendItem

      public LegendItem(String label, Paint paint)
      Creates a legend item with the specified label and fill paint. The remaining attributes take default values.
      Parameters:
      label - the label (null not permitted).
      paint - the paint (null not permitted).
    • LegendItem

      public LegendItem(String label, String description, String toolTipText, String urlText, Shape shape, Paint fillPaint)
      Creates a legend item with a filled shape. The shape is not outlined, and no line is visible.
      Parameters:
      label - the label (null not permitted).
      description - the description (null permitted).
      toolTipText - the tool tip text (null permitted).
      urlText - the URL text (null permitted).
      shape - the shape (null not permitted).
      fillPaint - the paint used to fill the shape (null not permitted).
    • LegendItem

      public LegendItem(String label, String description, String toolTipText, String urlText, Shape shape, Paint fillPaint, Stroke outlineStroke, Paint outlinePaint)
      Creates a legend item with a filled and outlined shape.
      Parameters:
      label - the label (null not permitted).
      description - the description (null permitted).
      toolTipText - the tool tip text (null permitted).
      urlText - the URL text (null permitted).
      shape - the shape (null not permitted).
      fillPaint - the paint used to fill the shape (null not permitted).
      outlineStroke - the outline stroke (null not permitted).
      outlinePaint - the outline paint (null not permitted).
    • LegendItem

      public LegendItem(String label, String description, String toolTipText, String urlText, Shape line, Stroke lineStroke, Paint linePaint)
      Creates a legend item using a line.
      Parameters:
      label - the label (null not permitted).
      description - the description (null permitted).
      toolTipText - the tool tip text (null permitted).
      urlText - the URL text (null permitted).
      line - the line (null not permitted).
      lineStroke - the line stroke (null not permitted).
      linePaint - the line paint (null not permitted).
    • LegendItem

      public LegendItem(String label, String description, String toolTipText, String urlText, boolean shapeVisible, Shape shape, boolean shapeFilled, Paint fillPaint, boolean shapeOutlineVisible, Paint outlinePaint, Stroke outlineStroke, boolean lineVisible, Shape line, Stroke lineStroke, Paint linePaint)
      Creates a new legend item.
      Parameters:
      label - the label (null not permitted).
      description - the description (not currently used, null permitted).
      toolTipText - the tool tip text (null permitted).
      urlText - the URL text (null permitted).
      shapeVisible - a flag that controls whether or not the shape is displayed.
      shape - the shape (null permitted).
      shapeFilled - a flag that controls whether or not the shape is filled.
      fillPaint - the fill paint (null not permitted).
      shapeOutlineVisible - a flag that controls whether or not the shape is outlined.
      outlinePaint - the outline paint (null not permitted).
      outlineStroke - the outline stroke (null not permitted).
      lineVisible - a flag that controls whether or not the line is visible.
      line - the line.
      lineStroke - the stroke (null not permitted).
      linePaint - the line paint (null not permitted).
    • LegendItem

      public LegendItem(AttributedString label, String description, String toolTipText, String urlText, Shape shape, Paint fillPaint)
      Creates a legend item with a filled shape. The shape is not outlined, and no line is visible.
      Parameters:
      label - the label (null not permitted).
      description - the description (null permitted).
      toolTipText - the tool tip text (null permitted).
      urlText - the URL text (null permitted).
      shape - the shape (null not permitted).
      fillPaint - the paint used to fill the shape (null not permitted).
    • LegendItem

      public LegendItem(AttributedString label, String description, String toolTipText, String urlText, Shape shape, Paint fillPaint, Stroke outlineStroke, Paint outlinePaint)
      Creates a legend item with a filled and outlined shape.
      Parameters:
      label - the label (null not permitted).
      description - the description (null permitted).
      toolTipText - the tool tip text (null permitted).
      urlText - the URL text (null permitted).
      shape - the shape (null not permitted).
      fillPaint - the paint used to fill the shape (null not permitted).
      outlineStroke - the outline stroke (null not permitted).
      outlinePaint - the outline paint (null not permitted).
    • LegendItem

      public LegendItem(AttributedString label, String description, String toolTipText, String urlText, Shape line, Stroke lineStroke, Paint linePaint)
      Creates a legend item using a line.
      Parameters:
      label - the label (null not permitted).
      description - the description (null permitted).
      toolTipText - the tool tip text (null permitted).
      urlText - the URL text (null permitted).
      line - the line (null not permitted).
      lineStroke - the line stroke (null not permitted).
      linePaint - the line paint (null not permitted).
    • LegendItem

      public LegendItem(AttributedString label, String description, String toolTipText, String urlText, boolean shapeVisible, Shape shape, boolean shapeFilled, Paint fillPaint, boolean shapeOutlineVisible, Paint outlinePaint, Stroke outlineStroke, boolean lineVisible, Shape line, Stroke lineStroke, Paint linePaint)
      Creates a new legend item.
      Parameters:
      label - the label (null not permitted).
      description - the description (not currently used, null permitted).
      toolTipText - the tool tip text (null permitted).
      urlText - the URL text (null permitted).
      shapeVisible - a flag that controls whether or not the shape is displayed.
      shape - the shape (null permitted).
      shapeFilled - a flag that controls whether or not the shape is filled.
      fillPaint - the fill paint (null not permitted).
      shapeOutlineVisible - a flag that controls whether or not the shape is outlined.
      outlinePaint - the outline paint (null not permitted).
      outlineStroke - the outline stroke (null not permitted).
      lineVisible - a flag that controls whether or not the line is visible.
      line - the line (null not permitted).
      lineStroke - the stroke (null not permitted).
      linePaint - the line paint (null not permitted).
  • Method Details