|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.jrefinery.chart.DateUnit
public class DateUnit
Represents a fixed period of time, used to represent the tick units on a DateAxis.
| Field Summary | |
|---|---|
protected int |
count
The number of units. |
protected int |
field
The field (see java.util.Calendar) used to define the DateUnit. |
| Constructor Summary | |
|---|---|
DateUnit(int field,
int count)
Constructs a DateUnit. |
|
| Method Summary | |
|---|---|
java.util.Date |
addToDate(java.util.Date base)
Calculates a new date by adding this DateUnit to the base date. |
int |
getCount()
Returns the number of units. |
int |
getField()
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 |
| Field Detail |
|---|
protected int field
protected int count
| Constructor Detail |
|---|
public DateUnit(int field,
int count)
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).
field - The date field.count - The number of units.| Method Detail |
|---|
public int getField()
public int getCount()
public java.util.Date addToDate(java.util.Date base)
The - base date.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||