Package org.jfree.chart.title
Class LegendItemBlockContainer
- java.lang.Object
-
- org.jfree.chart.block.AbstractBlock
-
- org.jfree.chart.block.BlockContainer
-
- org.jfree.chart.title.LegendItemBlockContainer
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,Block,Drawable,PublicCloneable
public class LegendItemBlockContainer extends BlockContainer
A container that holds all the pieces of a single legend item.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private DatasetdatasetThe dataset.private intdatasetIndexThe dataset index.private intseriesThe series index.private java.lang.ComparableseriesKeyThe series key.private java.lang.StringtoolTipTextThe tool tip text (can benull).private java.lang.StringurlTextThe URL text (can benull).
-
Constructor Summary
Constructors Constructor Description LegendItemBlockContainer(Arrangement arrangement, Dataset dataset, java.lang.Comparable seriesKey)Creates a new legend item block.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectdraw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area, java.lang.Object params)Draws the block within the specified area.DatasetgetDataset()Returns a reference to the dataset for the associated legend item.intgetSeriesIndex()Returns the series index.java.lang.ComparablegetSeriesKey()Returns the series key.java.lang.StringgetToolTipText()Returns the tool tip text.java.lang.StringgetURLText()Returns the URL text.voidsetToolTipText(java.lang.String text)Sets the tool tip text.voidsetURLText(java.lang.String text)Sets the URL text.-
Methods inherited from class org.jfree.chart.block.BlockContainer
add, add, arrange, canEqual, clear, clone, draw, equals, getArrangement, getBlocks, hashCode, isEmpty, setArrangement
-
Methods inherited from class org.jfree.chart.block.AbstractBlock
arrange, calculateTotalHeight, calculateTotalWidth, drawBorder, getBounds, getContentXOffset, getContentYOffset, getFrame, getHeight, getID, getMargin, getPadding, getWidth, setBorder, setBounds, setFrame, setHeight, setID, setMargin, setMargin, setPadding, setPadding, setWidth, toContentConstraint, trimBorder, trimMargin, trimPadding, trimToContentHeight, trimToContentWidth
-
-
-
-
Field Detail
-
dataset
private Dataset dataset
The dataset.
-
seriesKey
private java.lang.Comparable seriesKey
The series key.
-
datasetIndex
private int datasetIndex
The dataset index.
-
series
private int series
The series index.
-
toolTipText
private java.lang.String toolTipText
The tool tip text (can benull).
-
urlText
private java.lang.String urlText
The URL text (can benull).
-
-
Constructor Detail
-
LegendItemBlockContainer
public LegendItemBlockContainer(Arrangement arrangement, Dataset dataset, java.lang.Comparable seriesKey)
Creates a new legend item block.- Parameters:
arrangement- the arrangement.dataset- the dataset.seriesKey- the series key.
-
-
Method Detail
-
getDataset
public Dataset getDataset()
Returns a reference to the dataset for the associated legend item.- Returns:
- A dataset reference.
-
getSeriesKey
public java.lang.Comparable getSeriesKey()
Returns the series key.- Returns:
- The series key.
-
getSeriesIndex
public int getSeriesIndex()
Returns the series index.- Returns:
- The series index.
-
getToolTipText
public java.lang.String getToolTipText()
Returns the tool tip text.- Returns:
- The tool tip text (possibly
null).
-
setToolTipText
public void setToolTipText(java.lang.String text)
Sets the tool tip text.- Parameters:
text- the text (nullpermitted).
-
getURLText
public java.lang.String getURLText()
Returns the URL text.- Returns:
- The URL text (possibly
null).
-
setURLText
public void setURLText(java.lang.String text)
Sets the URL text.- Parameters:
text- the text (nullpermitted).
-
draw
public java.lang.Object draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area, java.lang.Object params)Draws the block within the specified area.- Specified by:
drawin interfaceBlock- Overrides:
drawin classBlockContainer- Parameters:
g2- the graphics device.area- the area.params- passed on to blocks within the container (nullpermitted).- Returns:
- An instance of
EntityBlockResult, ornull.
-
-