com.jrefinery.chart
Class DateUnit

java.lang.Object
  |
  +--com.jrefinery.chart.DateUnit

Deprecated. use DateTickUnit instead.

public class DateUnit
extends java.lang.Object

Represents a fixed unit of time, used to represent the tick units on a DateAxis.

Author:
DG

Constructor Summary
DateUnit(int field, int count)
          Deprecated. Constructs a DateUnit.
 
Method Summary
 java.util.Date addToDate(java.util.Date base)
          Deprecated. Calculates a new date by adding this DateUnit to the base date.
 int getCount()
          Deprecated. Returns the number of units.
 int getField()
          Deprecated. Returns the field used to define the DateUnit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateUnit

public DateUnit(int field,
                int count)
Deprecated. 
Constructs a DateUnit.

The DateUnit is specified using one of the following fields from the java.util.Calendar class: YEAR, MONTH, DATE or DAY_OF_MONTH, HOUR_OF_DAY (not HOUR!), MINUTE, SECOND or MILLISECOND.

You also specify the number of units (for example, you might specify 3 months if you have quarterly data, or 7 days, or 1 hour).

Parameters:
field - the date field.
count - the number of units.
Method Detail

getField

public int getField()
Deprecated. 
Returns the field used to define the DateUnit. This should be one of the following constants defined in the java.util.Calendar class: YEAR, MONTH, DATE or DAY_OF_MONTH, HOUR_OF_DAY (not HOUR!), MINUTE, SECOND or MILLISECOND.
Returns:
the field used to define the DateUnit.

getCount

public int getCount()
Deprecated. 
Returns the number of units.
Returns:
the number of units.

addToDate

public java.util.Date addToDate(java.util.Date base)
Deprecated. 
Calculates a new date by adding this DateUnit to the base date.
Parameters:
base - the base date.
Returns:
a new date one DateUnit after the base date.