java.lang.Object | |||
↳ | org.jfree.chart.block.AbstractBlock | ||
↳ | org.jfree.chart.title.Title | ||
↳ | org.jfree.chart.title.LegendTitle |
A chart title that displays a legend for the data in the chart.
The title can be populated with legend items manually, or you can assign a reference to the plot, in which case the legend items will be automatically created to match the dataset(s).
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DEFAULT_ITEM_FONT | The default item font. | ||||||||||
DEFAULT_ITEM_PAINT | The default item paint. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.jfree.chart.title.Title
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new (empty) legend for the specified source.
| |||||||||||
Creates a new legend title with the specified arrangement.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Arranges the contents of the block, within the given constraints, and
returns the block size.
| |||||||||||
Draws the title on a Java 2D graphics device (such as the screen or a
printer).
| |||||||||||
Draws the block within the specified area.
| |||||||||||
Tests this title for equality with an arbitrary object.
| |||||||||||
Returns the background paint.
| |||||||||||
Returns the container that holds the legend items.
| |||||||||||
Returns the item font.
| |||||||||||
Returns the padding used for the items labels.
| |||||||||||
Returns the item paint.
| |||||||||||
Returns the legend item graphic anchor.
| |||||||||||
Returns the location of the shape within each legend item.
| |||||||||||
Returns the legend item graphic location.
| |||||||||||
Returns the padding that will be applied to each item graphic.
| |||||||||||
Returns the legend item sources.
| |||||||||||
Returns the wrapper container, if any.
| |||||||||||
Sets the background paint for the legend and sends a
TitleChangeEvent to all registered listeners. | |||||||||||
Sets the item font and sends a
TitleChangeEvent to
all registered listeners. | |||||||||||
Sets the padding used for the item labels in the legend.
| |||||||||||
Sets the item paint.
| |||||||||||
Sets the anchor point used for the graphic in each legend item.
| |||||||||||
Sets the location of the shape within each legend item.
| |||||||||||
Sets the legend item graphic location.
| |||||||||||
Sets the padding that will be applied to each item graphic in the
legend and sends a
TitleChangeEvent to all registered listeners. | |||||||||||
Sets the legend item sources and sends a
TitleChangeEvent to
all registered listeners. | |||||||||||
Sets the wrapper container for the legend.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a legend item block.
| |||||||||||
Fetches the latest legend items.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.jfree.chart.title.Title
| |||||||||||
From class
org.jfree.chart.block.AbstractBlock
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.jfree.chart.block.Block
|
Constructs a new (empty) legend for the specified source.
source | the source. |
---|
Creates a new legend title with the specified arrangement.
source | the source. |
---|---|
hLayout | the horizontal item arrangement (null not
permitted). |
vLayout | the vertical item arrangement (null not
permitted).
|
Arranges the contents of the block, within the given constraints, and returns the block size.
g2 | the graphics device. |
---|---|
constraint | the constraint (null not permitted). |
null
).
Draws the title on a Java 2D graphics device (such as the screen or a printer).
g2 | the graphics device. |
---|---|
area | the available area for the title. |
Draws the block within the specified area.
g2 | the graphics device. |
---|---|
area | the area. |
params | ignored (null permitted). |
EntityBlockResult
or
null
.
Tests this title for equality with an arbitrary object.
obj | the object (null permitted). |
---|
Returns the background paint.
null
).
Returns the container that holds the legend items.
Returns the padding used for the items labels.
null
).
Returns the legend item graphic anchor.
null
).
Returns the location of the shape within each legend item.
null
).
Returns the legend item graphic location.
null
).
Returns the padding that will be applied to each item graphic.
null
).
Returns the wrapper container, if any.
null
).Sets the background paint for the legend and sends a
TitleChangeEvent
to all registered listeners.
paint | the paint (null permitted).
|
---|
Sets the item font and sends a TitleChangeEvent
to
all registered listeners.
font | the font (null not permitted).
|
---|
Sets the padding used for the item labels in the legend.
padding | the padding (null not permitted).
|
---|
Sets the item paint.
paint | the paint (null not permitted).
|
---|
Sets the anchor point used for the graphic in each legend item.
anchor | the anchor point (null not permitted).
|
---|
Sets the location of the shape within each legend item.
edge | the edge (null not permitted).
|
---|
Sets the legend item graphic location.
anchor | the anchor (null not permitted).
|
---|
Sets the padding that will be applied to each item graphic in the
legend and sends a TitleChangeEvent
to all registered listeners.
padding | the padding (null not permitted).
|
---|
Sets the legend item sources and sends a TitleChangeEvent
to
all registered listeners.
sources | the sources (null not permitted).
|
---|
Sets the wrapper container for the legend.
wrapper | the wrapper container. |
---|
Creates a legend item block.
item | the legend item. |
---|
Fetches the latest legend items.