org.jfree.chart.util
public class RelativeDateFormat extends DateFormat
Since: 1.0.3
Constructor Summary | |
---|---|
RelativeDateFormat()
Creates a new instance. | |
RelativeDateFormat(Date time)
Creates a new instance.
| |
RelativeDateFormat(long baseMillis)
Creates a new instance.
|
Method Summary | |
---|---|
Object | clone()
Returns a clone of this instance.
|
boolean | equals(Object obj)
Tests this formatter for equality with an arbitrary object.
|
StringBuffer | format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition)
Formats the given date as the amount of elapsed time (relative to the
base date specified in the constructor).
|
long | getBaseMillis()
Returns the base date/time used to calculate the elapsed time for
display.
|
String | getDaySuffix()
Returns the string that is appended to the day count.
|
String | getHourSuffix()
Returns the string that is appended to the hour count.
|
String | getMinuteSuffix()
Returns the string that is appended to the minute count.
|
String | getSecondSuffix()
Returns the string that is appended to the second count.
|
boolean | getShowZeroDays()
Returns the flag that controls whether or not zero day counts are
shown in the formatted output.
|
int | hashCode()
Returns a hash code for this instance.
|
static void | main(String[] args)
Some test code.
|
Date | parse(String source, ParsePosition pos)
Parses the given string (not implemented).
|
void | setBaseMillis(long baseMillis)
Sets the base date/time used to calculate the elapsed time for display.
|
void | setDaySuffix(String suffix)
Sets the string that is appended to the day count.
|
void | setHourSuffix(String suffix)
Sets the string that is appended to the hour count.
|
void | setMinuteSuffix(String suffix)
Sets the string that is appended to the minute count.
|
void | setSecondFormatter(NumberFormat formatter)
Sets the formatter for the seconds and milliseconds.
|
void | setSecondSuffix(String suffix)
Sets the string that is appended to the second count.
|
void | setShowZeroDays(boolean show)
Sets the flag that controls whether or not zero day counts are shown
in the formatted output.
|
Parameters: time the date/time (null
not permitted).
Parameters: baseMillis the time zone (null
not permitted).
Returns: A clone.
Parameters: obj the object (null
permitted).
Returns: A boolean.
Parameters: date the date. toAppendTo the string buffer. fieldPosition the field position.
Returns: The formatted date.
Returns: The base date/time in milliseconds since 1-Jan-1970.
See Also: RelativeDateFormat
Returns: The string.
See Also: setDaySuffix
Returns: The string.
See Also: setHourSuffix
Returns: The string.
See Also: setMinuteSuffix
Returns: The string.
See Also: setSecondSuffix
Returns: The flag.
See Also: RelativeDateFormat
Returns: A hash code.
Parameters: args ignored.
Parameters: source the date string. pos the parse position.
Returns: null
, as this method has not been implemented.
java.util.Date
.
Parameters: baseMillis the base date/time in milliseconds.
See Also: getBaseMillis
Parameters: suffix the suffix (null
not permitted).
See Also: getDaySuffix
Parameters: suffix the suffix (null
not permitted).
See Also: getHourSuffix
Parameters: suffix the suffix (null
not permitted).
See Also: getMinuteSuffix
Parameters: formatter the formatter (null
not permitted).
Parameters: suffix the suffix (null
not permitted).
See Also: getSecondSuffix
Parameters: show the flag.
See Also: getShowZeroDays