java.lang.Object | ||||
↳ | org.jfree.chart.block.AbstractBlock | |||
↳ | org.jfree.chart.title.Title | |||
↳ | org.jfree.chart.title.TextTitle | |||
↳ | org.jfree.chart.title.DateTitle |
A chart title that displays the date.
Keep in mind that a chart can have several titles, and that they can appear
at the top, left, right or bottom of the chart - a DateTitle
will commonly appear at the bottom of a chart, although you can place it
anywhere.
By specifying the locale, dates are formatted to the correct standard for the given locale. For example, a date would appear as "January 17, 2000" in the US, but "17 January 2000" in most European locales.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new chart title that displays the current date in the default
(LONG) format for the locale, positioned to the bottom right of the
chart.
| |||||||||||
Creates a new chart title that displays the current date with the
specified style (for the default locale).
| |||||||||||
Creates a new chart title that displays the current date.
| |||||||||||
Creates a new chart title that displays the current date.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Set the format of the date.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a new chart title that displays the current date in the default (LONG) format for the locale, positioned to the bottom right of the chart.
The color will be black in 12 point, plain Helvetica font (maps to Arial on Win32 systems without Helvetica).
Creates a new chart title that displays the current date with the specified style (for the default locale).
The date style should be one of: SHORT
,
MEDIUM
, LONG
or FULL
(defined in java.util.DateFormat
).
style | the date style. |
---|
Creates a new chart title that displays the current date.
The date style should be one of:
For the locale, you can use SHORT
,
MEDIUM
, LONG
or FULL
(defined
in java.util.DateFormat
).
Locale.getDefault()
for the
default locale.
style | the date style. |
---|---|
locale | the locale. |
font | the font. |
paint | the text color. |
Creates a new chart title that displays the current date.
The date style should be one of:
For the locale, you can use SHORT
,
MEDIUM
, LONG
or FULL
(defined
in java.util.DateFormat
).
Locale.getDefault()
for the
default locale.
style | the date style. |
---|---|
locale | the locale. |
font | the font (not null). |
paint | the text color (not null). |
position | the relative location of this title (use constants in Title). |
horizontalAlignment | the horizontal text alignment of this title (use constants in Title). |
verticalAlignment | the vertical text alignment of this title (use constants in Title). |
padding | determines the blank space around the outside of the title (not null). |
Set the format of the date.
The date style should be one of:
For the locale, you can use SHORT
,
MEDIUM
, LONG
or FULL
(defined
in java.util.DateFormat
).
Locale.getDefault()
for the
default locale.
style | the date style. |
---|---|
locale | the locale. |