public class

LegendItemBlockContainer

extends BlockContainer
java.lang.Object
   ↳ org.jfree.chart.block.AbstractBlock
     ↳ org.jfree.chart.block.BlockContainer
       ↳ org.jfree.chart.title.LegendItemBlockContainer

Class Overview

A container that holds all the pieces of a single legend item.

Summary

Public Constructors
LegendItemBlockContainer(Arrangement arrangement, int datasetIndex, int series)
This constructor is deprecated. As of 1.0.6, use the other constructor.
LegendItemBlockContainer(Arrangement arrangement, Dataset dataset, Comparable seriesKey)
Creates a new legend item block.
Public Methods
Object draw(Graphics2D g2, Rectangle2D area, Object params)
Draws the block within the specified area.
Dataset getDataset()
Returns a reference to the dataset for the associated legend item.
int getDatasetIndex()
This method is deprecated. As of 1.0.6, use the getDataset() method.
int getSeriesIndex()
Returns the series index.
Comparable getSeriesKey()
Returns the series key.
String getToolTipText()
Returns the tool tip text.
String getURLText()
Returns the URL text.
void setToolTipText(String text)
Sets the tool tip text.
void setURLText(String text)
Sets the URL text.
[Expand]
Inherited Methods
From class org.jfree.chart.block.BlockContainer
From class org.jfree.chart.block.AbstractBlock
From class java.lang.Object
From interface org.jfree.chart.block.Block

Public Constructors

public LegendItemBlockContainer (Arrangement arrangement, int datasetIndex, int series)

This constructor is deprecated.
As of 1.0.6, use the other constructor.

Creates a new legend item block.

Parameters
arrangement the arrangement.
datasetIndex the dataset index.
series the series index.

public LegendItemBlockContainer (Arrangement arrangement, Dataset dataset, Comparable seriesKey)

Creates a new legend item block.

Parameters
arrangement the arrangement.
dataset the dataset.
seriesKey the series key.

Public Methods

public Object draw (Graphics2D g2, Rectangle2D area, Object params)

Draws the block within the specified area.

Parameters
g2 the graphics device.
area the area.
params passed on to blocks within the container (null permitted).
Returns

public Dataset getDataset ()

Returns a reference to the dataset for the associated legend item.

Returns
  • A dataset reference.

public int getDatasetIndex ()

This method is deprecated.
As of 1.0.6, use the getDataset() method.

Returns the dataset index.

Returns
  • The dataset index.

public int getSeriesIndex ()

Returns the series index.

Returns
  • The series index.

public Comparable getSeriesKey ()

Returns the series key.

Returns
  • The series key.

public String getToolTipText ()

Returns the tool tip text.

Returns
  • The tool tip text (possibly null).

public String getURLText ()

Returns the URL text.

Returns
  • The URL text (possibly null).

public void setToolTipText (String text)

Sets the tool tip text.

Parameters
text the text (null permitted).

public void setURLText (String text)

Sets the URL text.

Parameters
text the text (null permitted).