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:
Serializable
,Cloneable
,Block
,Drawable
,PublicCloneable
A container that holds all the pieces of a single legend item.
- See Also:
-
Constructor Summary
ConstructorDescriptionLegendItemBlockContainer
(Arrangement arrangement, Dataset dataset, Comparable seriesKey) Creates a new legend item block. -
Method Summary
Modifier and TypeMethodDescriptiondraw
(Graphics2D g2, Rectangle2D area, Object params) Draws the block within the specified area.Returns a reference to the dataset for the associated legend item.int
Returns the series index.Returns the series key.Returns the tool tip text.Returns the URL text.void
setToolTipText
(String text) Sets the tool tip text.void
setURLText
(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
-
Constructor Details
-
LegendItemBlockContainer
Creates a new legend item block.- Parameters:
arrangement
- the arrangement.dataset
- the dataset.seriesKey
- the series key.
-
-
Method Details
-
getDataset
Returns a reference to the dataset for the associated legend item.- Returns:
- A dataset reference.
-
getSeriesKey
Returns the series key.- Returns:
- The series key.
-
getSeriesIndex
Returns the series index.- Returns:
- The series index.
-
getToolTipText
Returns the tool tip text.- Returns:
- The tool tip text (possibly
null
).
-
setToolTipText
Sets the tool tip text.- Parameters:
text
- the text (null
permitted).
-
getURLText
Returns the URL text.- Returns:
- The URL text (possibly
null
).
-
setURLText
Sets the URL text.- Parameters:
text
- the text (null
permitted).
-
draw
Draws the block within the specified area.- Specified by:
draw
in interfaceBlock
- Overrides:
draw
in classBlockContainer
- Parameters:
g2
- the graphics device.area
- the area.params
- passed on to blocks within the container (null
permitted).- Returns:
- An instance of
EntityBlockResult
, ornull
.
-