java.lang.Object | |||
↳ | org.jfree.chart.block.AbstractBlock | ||
↳ | org.jfree.chart.title.Title | ||
↳ | org.jfree.chart.title.TextTitle |
![]() |
A chart title that displays a text string with automatic wrapping as required.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DEFAULT_FONT | The default font. | ||||||||||
DEFAULT_TEXT_PAINT | The default text color. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new title, using default attributes where necessary.
| |||||||||||
Creates a new title, using default attributes where necessary.
| |||||||||||
Creates a new title, using default attributes where necessary.
| |||||||||||
Creates a new title.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Arranges the contents of the block, within the given constraints, and
returns the block size.
| |||||||||||
Returns a clone of this object.
| |||||||||||
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 another object.
| |||||||||||
Returns the background paint.
| |||||||||||
Returns the flag that controls whether or not the title expands to fit
the available space.
| |||||||||||
Returns the font used to display the title string.
| |||||||||||
Returns the maximum number of lines to display.
| |||||||||||
Returns the paint used to display the title string.
| |||||||||||
Returns the title text.
| |||||||||||
Returns the text alignment.
| |||||||||||
Returns the tool tip text.
| |||||||||||
Returns the URL text.
| |||||||||||
Returns a hash code.
| |||||||||||
Sets the background paint and sends a
TitleChangeEvent to all
registered listeners. | |||||||||||
Sets the flag that controls whether the title expands to fit the
available space, and sends a
TitleChangeEvent to all registered
listeners. | |||||||||||
Sets the font used to display the title string.
| |||||||||||
Sets the maximum number of lines to display and sends a
TitleChangeEvent to all registered listeners. | |||||||||||
Sets the paint used to display the title string.
| |||||||||||
Sets the title to the specified text and sends a
TitleChangeEvent to all registered listeners. | |||||||||||
Sets the text alignment and sends a
TitleChangeEvent to
all registered listeners. | |||||||||||
Sets the tool tip text to the specified text and sends a
TitleChangeEvent to all registered listeners. | |||||||||||
Sets the URL text to the specified text and sends a
TitleChangeEvent to all registered listeners. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Arranges the content for this title assuming a fixed width and no bounds
on the height, and returns the required size.
| |||||||||||
Arranges the content for this title assuming no bounds on the width
or the height, and returns the required size.
| |||||||||||
Arranges the content for this title assuming a range constraint for the
width and no bounds on the height, and returns the required size.
| |||||||||||
Returns the content size for the title.
| |||||||||||
Draws a the title horizontally within the specified area.
| |||||||||||
Draws a the title vertically within the specified area.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a new title, using default attributes where necessary.
Creates a new title, using default attributes where necessary.
text | the title text (null not permitted).
|
---|
Creates a new title, using default attributes where necessary.
text | the title text (null not permitted). |
---|---|
font | the title font (null not permitted).
|
Creates a new title.
text | the text for the title (null not permitted). |
---|---|
font | the title font (null not permitted). |
paint | the title paint (null not permitted). |
position | the title position (null not permitted). |
horizontalAlignment | the horizontal alignment (null
not permitted). |
verticalAlignment | the vertical alignment (null not
permitted). |
padding | the space to leave around the outside of the title. |
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 area allocated for the title. |
Draws the block within the specified area.
g2 | the graphics device. |
---|---|
area | the area. |
params | if this is an instance of EntityBlockParams it
is used to determine whether or not an
EntityCollection is returned by this method. |
EntityCollection
containing a chart entity for the
title, or null
.
Tests this title for equality with another object.
obj | the object (null permitted). |
---|
true
or false
.
Returns the flag that controls whether or not the title expands to fit the available space.
Returns the font used to display the title string.
null
).Returns the maximum number of lines to display.
Returns the paint used to display the title string.
null
).Returns the text alignment. This controls how the text is aligned within the title's bounds, whereas the title's horizontal alignment controls how the title's bounding rectangle is aligned within the drawing space.
Returns the tool tip text.
null
).
Returns a hash code.
Sets the background paint and sends a TitleChangeEvent
to all
registered listeners. If you set this attribute to null
,
no background is painted (which makes the title background transparent).
paint | the background paint (null permitted).
|
---|
Sets the flag that controls whether the title expands to fit the
available space, and sends a TitleChangeEvent
to all registered
listeners.
expand | the flag. |
---|
Sets the font used to display the title string. Registered listeners are notified that the title has been modified.
font | the new font (null not permitted). |
---|
Sets the maximum number of lines to display and sends a
TitleChangeEvent
to all registered listeners.
max | the maximum. |
---|
Sets the paint used to display the title string. Registered listeners are notified that the title has been modified.
paint | the new paint (null not permitted). |
---|
Sets the title to the specified text and sends a
TitleChangeEvent
to all registered listeners.
text | the text (null not permitted).
|
---|
Sets the text alignment and sends a TitleChangeEvent
to
all registered listeners.
alignment | the alignment (null not permitted).
|
---|
Sets the tool tip text to the specified text and sends a
TitleChangeEvent
to all registered listeners.
text | the text (null permitted).
|
---|
Sets the URL text to the specified text and sends a
TitleChangeEvent
to all registered listeners.
text | the text (null permitted).
|
---|
Arranges the content for this title assuming a fixed width and no bounds on the height, and returns the required size. This will reflect the fact that a text title positioned on the left or right of a chart will be rotated by 90 degrees.
g2 | the graphics target. |
---|---|
w | the width. |
Arranges the content for this title assuming no bounds on the width or the height, and returns the required size. This will reflect the fact that a text title positioned on the left or right of a chart will be rotated by 90 degrees.
g2 | the graphics target. |
---|
Arranges the content for this title assuming a range constraint for the width and no bounds on the height, and returns the required size. This will reflect the fact that a text title positioned on the left or right of a chart will be rotated by 90 degrees.
g2 | the graphics target. |
---|---|
widthRange | the range for the width. |
Returns the content size for the title. This will reflect the fact that a text title positioned on the left or right of a chart will be rotated 90 degrees.
g2 | the graphics device. |
---|---|
widthRange | the width range. |
heightRange | the height range. |
Draws a the title horizontally within the specified area. This method
will be called from the draw
method.
g2 | the graphics device. |
---|---|
area | the area for the title. |
Draws a the title vertically within the specified area. This method
will be called from the draw
method.
g2 | the graphics device. |
---|---|
area | the area for the title. |