Save This Page
Home » jcommon-1.0.13 » org.jfree » chart » title » [javadoc | source]
org.jfree.chart.title
public class: DateTitle [javadoc | source]
java.lang.Object
   org.jfree.chart.block.AbstractBlock
      org.jfree.chart.title.Title
         org.jfree.chart.title.TextTitle
            org.jfree.chart.title.DateTitle

All Implemented Interfaces:
    Serializable, PublicCloneable, Cloneable, Block

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.
Fields inherited from org.jfree.chart.title.TextTitle:
DEFAULT_FONT,  DEFAULT_TEXT_PAINT
Fields inherited from org.jfree.chart.title.Title:
DEFAULT_POSITION,  DEFAULT_HORIZONTAL_ALIGNMENT,  DEFAULT_VERTICAL_ALIGNMENT,  DEFAULT_PADDING
Constructor:
 public DateTitle() 
 public DateTitle(int style) 
 public DateTitle(int style,
    Locale locale,
    Font font,
    Paint paint) 
    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) 
    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).
Method from org.jfree.chart.title.DateTitle Summary:
setDateFormat
Methods from org.jfree.chart.title.TextTitle:
arrange,   arrangeFN,   arrangeNN,   arrangeRN,   arrangeRR,   clone,   draw,   draw,   drawHorizontal,   drawVertical,   equals,   getBackgroundPaint,   getExpandToFitSpace,   getFont,   getMaximumLinesToDisplay,   getPaint,   getText,   getTextAlignment,   getToolTipText,   getURLText,   hashCode,   setBackgroundPaint,   setExpandToFitSpace,   setFont,   setMaximumLinesToDisplay,   setPaint,   setText,   setTextAlignment,   setToolTipText,   setURLText
Methods from org.jfree.chart.title.Title:
addChangeListener,   clone,   draw,   equals,   getHorizontalAlignment,   getNotify,   getPosition,   getVerticalAlignment,   hashCode,   notifyListeners,   removeChangeListener,   setHorizontalAlignment,   setNotify,   setPosition,   setVerticalAlignment
Methods from org.jfree.chart.block.AbstractBlock:
arrange,   arrange,   calculateTotalHeight,   calculateTotalWidth,   clone,   drawBorder,   equals,   getBorder,   getBounds,   getContentXOffset,   getContentYOffset,   getFrame,   getHeight,   getID,   getMargin,   getPadding,   getWidth,   setBorder,   setBorder,   setBounds,   setFrame,   setHeight,   setID,   setMargin,   setMargin,   setPadding,   setPadding,   setWidth,   toContentConstraint,   trimBorder,   trimMargin,   trimPadding,   trimToContentHeight,   trimToContentWidth
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.chart.title.DateTitle Detail:
 public  void setDateFormat(int style,
    Locale locale) 
    Set the format of the 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.