|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.text.Format
|
+--java.text.NumberFormat
|
+--java.text.DecimalFormat
|
+--gov.sns.tools.plot.DateGraphFormat
DateGraphFormat is the subclass of the DecimalFormat class. It produces the x-axis markers as a date by using an internal date format. X-axis values are supposed to be the number of seconds since January 1, 1970, 00:00:00 GMT. To use this format for the x-axis call the method setNumberFormatX(DecimalFormat df) of the instance of FunctionGraphsJPanel class with the DateGraphFormat instance instead of DecimalFormat.
| Field Summary |
| Fields inherited from class java.text.NumberFormat |
FRACTION_FIELD, INTEGER_FIELD |
| Constructor Summary | |
DateGraphFormat()
Constructor with a default DateFormat (it is SimpleDateFormat("HH:mm:ss")). |
|
DateGraphFormat(java.text.DateFormat dateFormatIn)
Constructor with a DateFormat as a parameter. |
|
DateGraphFormat(java.lang.String pattern)
Constructor with a date format pattern as the parameter. |
|
| Method Summary | |
java.lang.StringBuffer |
format(double t_sec,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
The overridden format method of the DecimalFormat class. |
static java.util.Date |
getDate(double seconds)
Transforms the seconds since January 1, 1970, 00:00:00 GMT to the date. |
java.text.DateFormat |
getDateFormat()
Returns the instance of the DateFormat class that is used to format the seconds to the date. |
static double |
getSeconds(java.util.Date date)
Transforms the date to the seconds since January 1, 1970, 00:00:00 GMT. |
void |
setDateFormat(java.text.DateFormat dateFormat)
Sets the instance of the DateFormat class that will be used to format the seconds to the date. |
| Methods inherited from class java.text.DecimalFormat |
applyLocalizedPattern, applyPattern, clone, equals, format, formatToCharacterIterator, getCurrency, getDecimalFormatSymbols, getGroupingSize, getMultiplier, getNegativePrefix, getNegativeSuffix, getPositivePrefix, getPositiveSuffix, hashCode, isDecimalSeparatorAlwaysShown, parse, setCurrency, setDecimalFormatSymbols, setDecimalSeparatorAlwaysShown, setGroupingSize, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setMultiplier, setNegativePrefix, setNegativeSuffix, setPositivePrefix, setPositiveSuffix, toLocalizedPattern, toPattern |
| Methods inherited from class java.text.NumberFormat |
format, format, format, getAvailableLocales, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setGroupingUsed, setParseIntegerOnly |
| Methods inherited from class java.text.Format |
format, parseObject |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DateGraphFormat()
public DateGraphFormat(java.lang.String pattern)
public DateGraphFormat(java.text.DateFormat dateFormatIn)
| Method Detail |
public java.lang.StringBuffer format(double t_sec,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
format in class java.text.DecimalFormatpublic java.text.DateFormat getDateFormat()
public void setDateFormat(java.text.DateFormat dateFormat)
public static double getSeconds(java.util.Date date)
public static java.util.Date getDate(double seconds)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||