com.ijchart.xychart.data
Class AbstractChartData

java.lang.Object
  extended by com.ijchart.xychart.data.AbstractChartData
All Implemented Interfaces:
IChartData, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable
Direct Known Subclasses:
BoxAndWhiskerData, DateChartData, DateNumberChartData, ErrorChartData, GranttChartData, IntervalChartData, IntervalXNumberYBaseChartData, IntervalXYNumberChartData, NumberChartData, OHLCChartData, StartEndNumberChartData, StatisticalChartData, WindChartData, XYNumberChartData, YIntervalChartData

public abstract class AbstractChartData
extends java.lang.Object
implements IChartData, java.io.Serializable, java.lang.Cloneable

Title: IJChart

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

The abstract class for all IChartData object.

Copyright: Copyright (c) 2013

Company:

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

Field Summary
static java.lang.String DATE_MASK_LONG
           The date mask of long type.
 
Constructor Summary
AbstractChartData()
           The constructor.
 
Method Summary
 java.lang.Object clone()
           Creates and returns a copy of this object.
 boolean equals(java.lang.Object obj)
           Tests this instance for equality with an arbitrary object.
protected  java.lang.String formatDate(java.util.Date date)
           Format date object.
protected  java.lang.String formatDateForFunction(java.util.Date date)
           Format date object for function argument.
protected  java.lang.String formatNumber(double value)
           Format number object.
protected  java.lang.String formatNumber(java.lang.Number num)
           Format number object.
protected  java.lang.String formatNumberForFunction(double value)
           Format number object for function argument.
protected  java.lang.String formatNumberForFunction(java.lang.Number num)
           Format number object for function argument.
 java.lang.String getAreaFunctionArguments()
           Returns the function arguments of hotspot area.
 java.lang.String getAreaURLFragment()
           Returns the url for hotspot area.
 java.text.DateFormat getDateFormat()
           Returns the formater for date object.
 java.lang.String getLabelText()
           Returns the label text.
 java.text.NumberFormat getNumberFormat()
           Returns the formater for number object.
 int hashCode()
           Returns a hash code value for the object.
 void setDateFormat(java.text.DateFormat dateFormat)
           Sets the formater for date object.
 void setNumberFormat(java.text.NumberFormat numberFormat)
           Sets the formater for number object.
 java.lang.String toString()
           Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

DATE_MASK_LONG

public static final java.lang.String DATE_MASK_LONG
The date mask of long type.

See Also:
Constant Field Values
Constructor Detail

AbstractChartData

public AbstractChartData()
The constructor.

Method Detail

getDateFormat

public java.text.DateFormat getDateFormat()
Returns the formater for date object.

Returns:
DateFormat The formater for date object.

setDateFormat

public void setDateFormat(java.text.DateFormat dateFormat)
Sets the formater for date object.

Parameters:
dateFormat - DateFormat The formater for date object (null permitted).

getNumberFormat

public java.text.NumberFormat getNumberFormat()
Returns the formater for number object.

Returns:
NumberFormat The formater for number object.

setNumberFormat

public void setNumberFormat(java.text.NumberFormat numberFormat)
Sets the formater for number object.

Parameters:
numberFormat - NumberFormat The formater for number object.

getLabelText

public java.lang.String getLabelText()
Returns the label text.

Specified by:
getLabelText in interface IChartData
Returns:
String The label text (maybe null).

getAreaFunctionArguments

public java.lang.String getAreaFunctionArguments()
Returns the function arguments of hotspot area.

Specified by:
getAreaFunctionArguments in interface IChartData
Returns:
String The function arguments (maybe null).

getAreaURLFragment

public java.lang.String getAreaURLFragment()
Returns the url for hotspot area.

Specified by:
getAreaURLFragment in interface IChartData
Returns:
String The url fragment (maybe null).

formatDate

protected java.lang.String formatDate(java.util.Date date)
Format date object.

Parameters:
date - Date
Returns:
String The formatted string.

formatDateForFunction

protected java.lang.String formatDateForFunction(java.util.Date date)
Format date object for function argument.

Parameters:
date - Date
Returns:
String The formatted string.

formatNumber

protected java.lang.String formatNumber(double value)
Format number object.

Parameters:
value - double
Returns:
String The formatted string.

formatNumber

protected java.lang.String formatNumber(java.lang.Number num)
Format number object.

Parameters:
num - Number
Returns:
String The formatted string.

formatNumberForFunction

protected java.lang.String formatNumberForFunction(double value)
Format number object for function argument.

Parameters:
value - double
Returns:
String The formatted string.

formatNumberForFunction

protected java.lang.String formatNumberForFunction(java.lang.Number num)
Format number object for function argument.

Parameters:
num - Number
Returns:
String The formatted string.

equals

public boolean equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object (null permitted).
Returns:
A boolean.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class java.lang.Object
Returns:
int A hash code value for this object.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.

Overrides:
clone in class java.lang.Object
Returns:
object a clone of this instance.
Throws:
java.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.