public class DateGraphFormat
extends java.text.DecimalFormat
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
applyLocalizedPattern, applyPattern, clone, equals, format, format, formatToCharacterIterator, getCurrency, getDecimalFormatSymbols, getGroupingSize, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getMultiplier, getNegativePrefix, getNegativeSuffix, getPositivePrefix, getPositiveSuffix, getRoundingMode, hashCode, isDecimalSeparatorAlwaysShown, isParseBigDecimal, parse, setCurrency, setDecimalFormatSymbols, setDecimalSeparatorAlwaysShown, setGroupingSize, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setMultiplier, setNegativePrefix, setNegativeSuffix, setParseBigDecimal, setPositivePrefix, setPositiveSuffix, setRoundingMode, toLocalizedPattern, toPattern
format, format, getAvailableLocales, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setParseIntegerOnly
public DateGraphFormat()
public DateGraphFormat(java.lang.String pattern)
public DateGraphFormat(java.text.DateFormat dateFormatIn)
public java.lang.StringBuffer format(double t_sec, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
format
in class java.text.DecimalFormat
public 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)