com.ijchart.xychart.title
Class DateTitle

java.lang.Object
  extended by com.ijchart.xychart.title.AbstractTitle
      extended by com.ijchart.xychart.title.TextTitle
          extended by com.ijchart.xychart.title.DateTitle
All Implemented Interfaces:
ITitle, java.io.Serializable, java.lang.Cloneable

public class DateTitle
extends TextTitle
implements java.io.Serializable

Title: IJChart

Description: a chart library for the Java(tm) platform.

A chart title that displays the date.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ijchart.xychart.title.TextTitle
DEFAULT_EXPAND_TO_FIT_SPACE, DEFAULT_FONT, DEFAULT_TEXT_PAINT
 
Fields inherited from class com.ijchart.xychart.title.AbstractTitle
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_BORDER_VISIBLE, DEFAULT_FILL_BACKGROUND, DEFAULT_HORIZONTAL_ALIGNMENT, DEFAULT_NOTIFY, DEFAULT_PADDING, DEFAULT_TITLE_POSITION, DEFAULT_VERTICAL_ALIGNMENT
 
Constructor Summary
DateTitle(java.util.Calendar cal)
           The constructor.
DateTitle(java.util.Calendar cal, int style)
           The constructor.
 
Method Summary
 java.lang.Object clone()
           Returns a clone of this object.
 boolean equals(java.lang.Object obj)
           Tests this title for equality with another object.
 java.util.Calendar getCalendar()
           Returns the date object.
 int getStyle()
           Returns the constant for date format.
 int hashCode()
           Returns a hash code.
 void setCalendar(java.util.Calendar cal)
           Sets the date object and sends a TitleChangeEvent to all registered listeners.
 void setStyle(int style)
           Sets the constant for date format and sends a TitleChangeEvent to all registered listeners.
 
Methods inherited from class com.ijchart.xychart.title.TextTitle
draw, getExpandToFitSpace, getText, getTextFont, getTextPaint, setExpandToFitSpace, setText, setTextFont, setTextPaint
 
Methods inherited from class com.ijchart.xychart.title.AbstractTitle
addChangeListener, fireTitleChanged, getBackgroundAlpha, getBackgroundPaint, getBorderPaint, getBorderStroke, getHorizontalAlignment, getNotify, getPadding, getPosition, getToolTipText, getURLText, getVerticalAlignment, hasListener, isBorderVisible, isFillBackground, notifyListeners, removeAllChangeListener, removeChangeListener, setBackgroundAlpha, setBackgroundPaint, setBorderPaint, setBorderStroke, setBorderVisible, setFillBackground, setHorizontalAlignment, setNotify, setPadding, setPosition, setToolTipText, setURLText, setVerticalAlignment
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateTitle

public DateTitle(java.util.Calendar cal)
The constructor.

Parameters:
cal - Calendar The date object (null permitted).

DateTitle

public DateTitle(java.util.Calendar cal,
                 int style)
The constructor.

Parameters:
cal - Calendar The date object (null permitted).
style - int Constant for date format,The date style should be one of:SHORT,MEDIUM, LONG or FULL.
Method Detail

getCalendar

public java.util.Calendar getCalendar()
Returns the date object.

Returns:
Calendar The date object (maybe null).

setCalendar

public void setCalendar(java.util.Calendar cal)
Sets the date object and sends a TitleChangeEvent to all registered listeners.

Parameters:
cal - Calendar The date object.

getStyle

public int getStyle()
Returns the constant for date format.

Returns:
int Constant for date format.

setStyle

public void setStyle(int style)
Sets the constant for date format and sends a TitleChangeEvent to all registered listeners.

Parameters:
style - int Constant for date format.

equals

public boolean equals(java.lang.Object obj)
Tests this title for equality with another object.

Overrides:
equals in class TextTitle
Parameters:
obj - the object (null permitted).
Returns:
true or false.

hashCode

public int hashCode()
Returns a hash code.

Overrides:
hashCode in class TextTitle
Returns:
A hash code.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of this object.

Overrides:
clone in class TextTitle
Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException - never.