public DateTitle(int style) {
this(style, Locale.getDefault(), new Font("Dialog", Font.PLAIN, 12),
Color.black);
}
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). Parameters:
style - the date style.
|
public DateTitle(int style,
Locale locale,
Font font,
Paint paint) {
this(style, locale, font, paint, RectangleEdge.BOTTOM,
HorizontalAlignment.RIGHT, VerticalAlignment.CENTER,
Title.DEFAULT_PADDING);
}
Creates a new chart title that displays the current date.
The date style should be one of: SHORT,
MEDIUM, LONG or FULL (defined
in java.util.DateFormat).
For the locale, you can use Locale.getDefault() for the
default locale. Parameters:
style - the date style.
locale - the locale.
font - the font.
paint - the text color.
|
public DateTitle(int style,
Locale locale,
Font font,
Paint paint,
RectangleEdge position,
HorizontalAlignment horizontalAlignment,
VerticalAlignment verticalAlignment,
RectangleInsets padding) {
super(DateFormat.getDateInstance(style, locale).format(new Date()),
font, paint, position, horizontalAlignment, verticalAlignment,
padding);
}
Creates a new chart title that displays the current date.
The date style should be one of: SHORT,
MEDIUM, LONG or FULL (defined
in java.util.DateFormat).
For the locale, you can use Locale.getDefault() for the
default locale. Parameters:
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).
|