|
SGT Home | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
TimeAxisStyle defines an interface to
create a specific time axis style. Currently there are
five time axes styles, MINUTE_HOUR,
HOUR_DAY, DAY_MONTH,
MONTH_YEAR, and YEAR_DECADE. All time
axes have two labeling levels, minor and major. For example,
DAY_MONTH style has a minor level of days and a
major level of months.
TimeAxis| Method Summary | |
void |
computeDefaults(GeoDate delta)
Determine the minor label interval from the time extent of the axis. |
double |
computeLocation(double prev,
double now)
Determines the location of the minor time label. |
java.lang.String |
getDefaultMajorLabelFormat()
Get the default major label format. |
int |
getDefaultMajorLabelInterval()
Get the default major label interval. |
java.lang.String |
getDefaultMinorLabelFormat()
Get the default minor label format. |
int |
getDefaultMinorLabelInterval()
Get the default minor label interval. |
int |
getDefaultNumSmallTics()
Get the default number of small tics between each minor tic. |
int |
getIncrementUnits()
Get the increment units for the minor labeling. |
double |
getIncrementValue()
Get the increment value for the minor labeling. |
int |
getMajorValue(GeoDate time)
Get the major time value for labeling. |
int |
getMinorValue(GeoDate time)
Get the minor time value for labeling. |
GeoDate |
getStartTime(TimeRange trange)
Returns a beginning time rounded to the nearest minor increment. |
boolean |
isRoomForMajorLabel(GeoDate delta)
Determines if there is enough room in delta time
for another major label. |
boolean |
isStartOfMinor(GeoDate time)
Determines if time is the start of a
minor interval. |
java.lang.String |
toString()
|
| Method Detail |
public int getMinorValue(GeoDate time)
time - current date
public int getMajorValue(GeoDate time)
time - current date
public boolean isRoomForMajorLabel(GeoDate delta)
delta time
for another major label.
public boolean isStartOfMinor(GeoDate time)
time is the start of a
minor interval.
public java.lang.String getDefaultMinorLabelFormat()
MINUTE_HOUR,
HOUR_DAY, DAY_MONTH, MONTH_YEAR,
and YEAR_DECADE, respectively.
public java.lang.String getDefaultMajorLabelFormat()
MINUTE_HOUR,
HOUR_DAY, DAY_MONTH, MONTH_YEAR,
and YEAR_DECADE, respectively.
public int getDefaultMinorLabelInterval()
public int getDefaultMajorLabelInterval()
public int getDefaultNumSmallTics()
public GeoDate getStartTime(TimeRange trange)
DAY_MONTH
if time is increasing then round to the day before
tRange.start otherwise
the nearest day after tRange.end.
public double getIncrementValue()
public int getIncrementUnits()
GeoDate.MINUTES, GeoDate.HOURS,
GeoDate.DAYS, GeoDate.MONTHS, and
GoeDate.YEARS for MINUTE_HOUR,
HOUR_DAY, DAY_MONTH, MONTH_YEAR,
and YEAR_DECADE, respectively.
GeoDatepublic void computeDefaults(GeoDate delta)
delta is greater
than 30 days, greater than 10 and less that 30 days, or
less than 10 days, the interval is 5, 2, or 1, respectively,
for DAY_MONTH style.
delta - time extent
public double computeLocation(double prev,
double now)
DAY_MONTH,
MONTH_YEAR, and YEAR_DECADE, or
at the tic mark for MINUTES_HOURS and
HOURS_DAYS.
prev - previous tic locationnow - current tic locationpublic java.lang.String toString()
toString in class java.lang.Object
|
SGT Home | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||