Package org.jfree.chart
Class LegendItemCollection
java.lang.Object
org.jfree.chart.LegendItemCollection
public class LegendItemCollection extends Object
A collection of legend items.
- 
Constructor Summary
Constructors Constructor Description LegendItemCollection()Constructs a new legend item collection, initially empty. - 
Method Summary
Modifier and Type Method Description voidadd(LegendItem item)Adds a legend item to the collection.voidaddAll(LegendItemCollection collection)Adds the legend items from another collection to this collection.LegendItemget(int index)Returns a legend item from the collection.intgetItemCount()Returns the number of legend items in the collection.Iteratoriterator()Returns an iterator that provides access to all the legend items. 
- 
Constructor Details
- 
LegendItemCollection
public LegendItemCollection()Constructs a new legend item collection, initially empty. 
 - 
 - 
Method Details
- 
add
Adds a legend item to the collection.- Parameters:
 item- the item to add.
 - 
addAll
Adds the legend items from another collection to this collection.- Parameters:
 collection- the other collection.
 - 
get
Returns a legend item from the collection.- Parameters:
 index- the legend item index (zero-based).- Returns:
 - the legend item.
 
 - 
getItemCount
public int getItemCount()Returns the number of legend items in the collection.- Returns:
 - the item count.
 
 - 
iterator
Returns an iterator that provides access to all the legend items.- Returns:
 - an iterator.
 
 
 -