java.lang.Object | |||
↳ | java.text.Format | ||
↳ | java.text.DateFormat | ||
↳ | org.jfree.chart.util.RelativeDateFormat |
A formatter that formats dates to show the elapsed time relative to some base date.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new instance with base milliseconds set to zero.
| |||||||||||
Creates a new instance.
| |||||||||||
Creates a new instance.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a clone of this instance.
| |||||||||||
Tests this formatter for equality with an arbitrary object.
| |||||||||||
Formats the given date as the amount of elapsed time (relative to the
base date specified in the constructor).
| |||||||||||
Returns the base date/time used to calculate the elapsed time for
display.
| |||||||||||
Returns the string that is appended to the day count.
| |||||||||||
Returns the string that is appended to the hour count.
| |||||||||||
Returns the string that is appended to the minute count.
| |||||||||||
Returns the string that is prepended to the format if the relative time
is positive.
| |||||||||||
Returns the string that is appended to the second count.
| |||||||||||
Returns the flag that controls whether or not zero day counts are
shown in the formatted output.
| |||||||||||
Returns the flag that controls whether or not zero hour counts are
shown in the formatted output.
| |||||||||||
Returns a hash code for this instance.
| |||||||||||
Some test code.
| |||||||||||
Parses the given string (not implemented).
| |||||||||||
Sets the base date/time used to calculate the elapsed time for display.
| |||||||||||
Sets the formatter for the days.
| |||||||||||
Sets the string that is appended to the day count.
| |||||||||||
Sets the formatter for the hours.
| |||||||||||
Sets the string that is appended to the hour count.
| |||||||||||
Sets the formatter for the minutes.
| |||||||||||
Sets the string that is appended to the minute count.
| |||||||||||
Sets the string that is prepended to the format if the relative time is
positive.
| |||||||||||
Sets the formatter for the seconds and milliseconds.
| |||||||||||
Sets the string that is appended to the second count.
| |||||||||||
Sets the flag that controls whether or not zero day counts are shown
in the formatted output.
| |||||||||||
Sets the flag that controls whether or not zero hour counts are shown
in the formatted output.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a new instance with base milliseconds set to zero.
Creates a new instance.
time | the date/time (null not permitted).
|
---|
Creates a new instance.
baseMillis | the time zone (null not permitted).
|
---|
Tests this formatter for equality with an arbitrary object.
obj | the object (null permitted). |
---|
Formats the given date as the amount of elapsed time (relative to the base date specified in the constructor).
date | the date. |
---|---|
toAppendTo | the string buffer. |
fieldPosition | the field position. |
Returns the base date/time used to calculate the elapsed time for display.
Returns the string that is appended to the day count.
Returns the string that is appended to the hour count.
Returns the string that is appended to the minute count.
Returns the string that is prepended to the format if the relative time is positive.
null
).Returns the string that is appended to the second count.
Returns the flag that controls whether or not zero day counts are shown in the formatted output.
Returns the flag that controls whether or not zero hour counts are shown in the formatted output.
Returns a hash code for this instance.
Parses the given string (not implemented).
source | the date string. |
---|---|
pos | the parse position. |
null
, as this method has not been implemented.
Sets the base date/time used to calculate the elapsed time for display.
This should be specified in milliseconds using the same encoding as
java.util.Date
.
baseMillis | the base date/time in milliseconds. |
---|
Sets the formatter for the days.
formatter | the formatter (null not permitted). |
---|
Sets the string that is appended to the day count.
suffix | the suffix (null not permitted). |
---|
Sets the formatter for the hours.
formatter | the formatter (null not permitted). |
---|
Sets the string that is appended to the hour count.
suffix | the suffix (null not permitted). |
---|
Sets the formatter for the minutes.
formatter | the formatter (null not permitted). |
---|
Sets the string that is appended to the minute count.
suffix | the suffix (null not permitted). |
---|
Sets the string that is prepended to the format if the relative time is positive.
prefix | the prefix (null not permitted). |
---|
Sets the formatter for the seconds and milliseconds.
formatter | the formatter (null not permitted).
|
---|
Sets the string that is appended to the second count.
suffix | the suffix (null not permitted). |
---|
Sets the flag that controls whether or not zero day counts are shown in the formatted output.
show | the flag. |
---|
Sets the flag that controls whether or not zero hour counts are shown in the formatted output.
show | the flag. |
---|