Class DateTitle
- All Implemented Interfaces:
- Serializable,- Cloneable
public class DateTitle extends TextTitle
 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.
- Author:
- David Berry
- See Also:
- Serialized Form
- 
Field SummaryFields inherited from class org.jfree.chart.title.TextTitleDEFAULT_FONT, DEFAULT_TEXT_PAINTFields inherited from class org.jfree.chart.title.TitleBOTTOM, CENTER, DEFAULT_HORIZONTAL_ALIGNMENT, DEFAULT_POSITION, DEFAULT_SPACER, DEFAULT_VERTICAL_ALIGNMENT, EAST, LEFT, MIDDLE, NORTH, RIGHT, SOUTH, TOP, WEST
- 
Constructor SummaryConstructors Constructor Description DateTitle()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.DateTitle(int style)Creates a new chart title that displays the current date with the specified style (for the default locale).DateTitle(int style, Locale locale, Font font, Paint paint)Creates a new chart title that displays the current date.DateTitle(int style, Locale locale, Font font, Paint paint, org.jfree.ui.RectangleEdge position, org.jfree.ui.HorizontalAlignment horizontalAlignment, org.jfree.ui.VerticalAlignment verticalAlignment, org.jfree.ui.Spacer spacer)Creates a new chart title that displays the current date.
- 
Method SummaryModifier and Type Method Description voidsetDateFormat(int style, Locale locale)Set the format of the date.Methods inherited from class org.jfree.chart.title.TextTitleclone, draw, equals, getBackgroundPaint, getFont, getPaint, getPreferredHeight, getPreferredWidth, getText, hashCode, setBackgroundPaint, setFont, setPaint, setTextMethods inherited from class org.jfree.chart.title.TitleaddChangeListener, getHorizontalAlignment, getNotify, getPosition, getSpacer, getVerticalAlignment, removeChangeListener, setHorizontalAlignment, setNotify, setPosition, setSpacer, setVerticalAlignment
- 
Constructor Details- 
DateTitlepublic DateTitle()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). 
- 
DateTitlepublic DateTitle(int style)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,LONGorFULL(defined injava.util.DateFormat).- Parameters:
- style- the date style.
 
- 
DateTitleCreates a new chart title that displays the current date.The date style should be one of: SHORT,MEDIUM,LONGorFULL(defined injava.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.
 
- 
DateTitlepublic DateTitle(int style, Locale locale, Font font, Paint paint, org.jfree.ui.RectangleEdge position, org.jfree.ui.HorizontalAlignment horizontalAlignment, org.jfree.ui.VerticalAlignment verticalAlignment, org.jfree.ui.Spacer spacer)Creates a new chart title that displays the current date.The date style should be one of: SHORT,MEDIUM,LONGorFULL(defined injava.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).
- spacer- determines the blank space around the outside of the title (not null).
 
 
- 
- 
Method Details- 
setDateFormatSet the format of the date.The date style should be one of: SHORT,MEDIUM,LONGorFULL(defined injava.util.DateFormat).For the locale, you can use Locale.getDefault()for the default locale.- Parameters:
- style- the date style.
- locale- the locale.
 
 
-