public class

LegendItemCollection

extends Object
implements Serializable Cloneable
java.lang.Object
   ↳ org.jfree.chart.LegendItemCollection

Class Overview

A collection of legend items.

Summary

Public Constructors
LegendItemCollection()
Constructs a new legend item collection, initially empty.
Public Methods
void add(LegendItem item)
Adds a legend item to the collection.
void addAll(LegendItemCollection collection)
Adds the legend items from another collection to this collection.
Object clone()
Returns a clone of the collection.
boolean equals(Object obj)
Tests this collection for equality with an arbitrary object.
LegendItem get(int index)
Returns a legend item from the collection.
int getItemCount()
Returns the number of legend items in the collection.
Iterator iterator()
Returns an iterator that provides access to all the legend items.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LegendItemCollection ()

Constructs a new legend item collection, initially empty.

Public Methods

public void add (LegendItem item)

Adds a legend item to the collection.

Parameters
item the item to add.

public void addAll (LegendItemCollection collection)

Adds the legend items from another collection to this collection.

Parameters
collection the other collection.

public Object clone ()

Returns a clone of the collection.

Returns
  • A clone.
Throws
CloneNotSupportedException if an item in the collection is not cloneable.

public boolean equals (Object obj)

Tests this collection for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public LegendItem get (int index)

Returns a legend item from the collection.

Parameters
index the legend item index (zero-based).
Returns
  • The legend item.

public int getItemCount ()

Returns the number of legend items in the collection.

Returns
  • The item count.

public Iterator iterator ()

Returns an iterator that provides access to all the legend items.

Returns
  • An iterator.