java.lang.Object | ||
↳ | org.jfree.chart.axis.TickUnit | |
↳ | org.jfree.chart.axis.DateTickUnit |
A tick unit for use by subclasses of DateAxis
. Instances of this
class are immutable.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | DAY |
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType instead.
|
|||||||||
int | HOUR |
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType instead.
|
|||||||||
int | MILLISECOND |
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType instead.
|
|||||||||
int | MINUTE |
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType instead.
|
|||||||||
int | MONTH |
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType instead.
|
|||||||||
int | SECOND |
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType instead.
|
|||||||||
int | YEAR |
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType instead.
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new date tick unit.
| |||||||||||
Creates a new date tick unit.
| |||||||||||
Creates a new unit.
| |||||||||||
This constructor is deprecated.
As of version 1.0.13, use
DateTickUnit(DateTickUnitType, int, DateFormat) .
| |||||||||||
This constructor is deprecated.
As of version 1.0.13, use
DateTickUnit(DateTickUnitType, int) .
| |||||||||||
This constructor is deprecated.
As of version 1.0.13, use
DateTickUnit(DateTickUnitType, int, DateTickUnitType, int, DateFormat) .
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
As of JFreeChart 1.0.10, this method is deprecated - you
should use
addToDate(Date, TimeZone) instead.
| |||||||||||
Calculates a new date by adding this unit to the base date.
| |||||||||||
Formats a date using the tick unit's formatter.
| |||||||||||
Tests this unit for equality with another object.
| |||||||||||
Returns a field code that can be used with the
Calendar
class. | |||||||||||
This method is deprecated.
As of version 1.0.13, use
getMultiple() .
| |||||||||||
Returns the unit multiple.
| |||||||||||
This method is deprecated.
As of version 1.0.13, use the
getRollMultiple()
| |||||||||||
Returns the roll unit multiple.
| |||||||||||
This method is deprecated.
As of version 1.0.13, use
getRollUnitType() .
| |||||||||||
Returns the roll unit type.
| |||||||||||
This method is deprecated.
As of 1.0.13, use the getUnitType() method.
| |||||||||||
Returns the unit type.
| |||||||||||
Returns a hash code for this object.
| |||||||||||
Rolls the date forward by the amount specified by the roll unit and
count.
| |||||||||||
Rolls the date forward by the amount specified by the roll unit and
count.
| |||||||||||
Returns a string representation of this instance, primarily used for
debugging purposes.
| |||||||||||
Formats a value.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType
instead.
A constant for days.
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType
instead.
A constant for hours.
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType
instead.
A constant for milliseconds.
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType
instead.
A constant for minutes.
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType
instead.
A constant for months.
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType
instead.
A constant for seconds.
This constant is deprecated.
As of version 1.0.13, use DateTickUnitType
instead.
A constant for years.
Creates a new date tick unit.
unitType | the unit type (null not permitted). |
---|---|
multiple | the multiple (of the unit type, must be > 0). |
Creates a new date tick unit.
unitType | the unit type (null not permitted). |
---|---|
multiple | the multiple (of the unit type, must be > 0). |
formatter | the date formatter (null not permitted). |
Creates a new unit.
unitType | the unit. |
---|---|
multiple | the multiple. |
rollUnitType | the roll unit. |
rollMultiple | the roll multiple. |
formatter | the date formatter (null not permitted). |
This constructor is deprecated.
As of version 1.0.13, use DateTickUnit(DateTickUnitType, int, DateFormat)
.
Creates a new date tick unit. You can specify the units using one of the constants YEAR, MONTH, DAY, HOUR, MINUTE, SECOND or MILLISECOND. In addition, you can specify a unit count, and a date format.
unit | the unit. |
---|---|
count | the unit count. |
formatter | the date formatter (defaults to DateFormat.SHORT). |
This constructor is deprecated.
As of version 1.0.13, use DateTickUnit(DateTickUnitType, int)
.
Creates a new date tick unit. The dates will be formatted using a SHORT format for the default locale.
unit | the unit. |
---|---|
count | the unit count. |
This constructor is deprecated.
As of version 1.0.13, use DateTickUnit(DateTickUnitType, int, DateTickUnitType, int, DateFormat)
.
Creates a new unit.
unit | the unit. |
---|---|
count | the count. |
rollUnit | the roll unit. |
rollCount | the roll count. |
formatter | the date formatter (defaults to DateFormat.SHORT). |
This method is deprecated.
As of JFreeChart 1.0.10, this method is deprecated - you
should use addToDate(Date, TimeZone)
instead.
Calculates a new date by adding this unit to the base date, with calculations performed in the default timezone and locale.
base | the base date. |
---|
Calculates a new date by adding this unit to the base date.
base | the base date. |
---|---|
zone | the time zone for the date calculation. |
Formats a date using the tick unit's formatter.
date | the date. |
---|
Tests this unit for equality with another object.
obj | the object (null permitted). |
---|
true
or false
.
Returns a field code that can be used with the Calendar
class.
This method is deprecated.
As of version 1.0.13, use getMultiple()
.
Returns the unit count.
Returns the unit multiple.
This method is deprecated.
As of version 1.0.13, use the getRollMultiple()
Returns the roll count.
Returns the roll unit multiple.
This method is deprecated.
As of version 1.0.13, use getRollUnitType()
.
Returns the roll unit. This is the amount by which the tick advances if it is "hidden" when displayed on a segmented date axis. Typically the roll will be smaller than the regular tick unit (for example, a 7 day tick unit might use a 1 day roll).
Returns the roll unit type.
null
).
This method is deprecated.
As of 1.0.13, use the getUnitType() method.
Returns the date unit. This will be one of the constants
YEAR
, MONTH
, DAY
,
HOUR
, MINUTE
, SECOND
or
MILLISECOND
, defined by this class. Note that these
constants do NOT correspond to those defined in Java's
Calendar
class.
Returns a hash code for this object.
Rolls the date forward by the amount specified by the roll unit and count.
base | the base date. |
---|---|
zone | the time zone. |
Rolls the date forward by the amount specified by the roll unit and count.
base | the base date. |
---|
Returns a string representation of this instance, primarily used for debugging purposes.
Formats a value.
milliseconds | date in milliseconds since 01-01-1970. |
---|