com.jidesoft.chart.axis
Class DefaultTimeTickCalculator
java.lang.Object
com.jidesoft.chart.axis.AbstractTimeTickCalculator
com.jidesoft.chart.axis.DefaultTimeTickCalculator
- All Implemented Interfaces:
- TickCalculator<Date>, TimeTickCalculator
public class DefaultTimeTickCalculator
- extends AbstractTimeTickCalculator
A default implementation of a tick calculator for time-based axes.
Note that if you want to use a specific time zone for your display, you have two options:
either call setTimeZone() if you want to use the default date formats, or use setDateFormat()
if you want to specify the date format yourself and set the TimeZone on the DateFormat object.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultTimeTickCalculator
public DefaultTimeTickCalculator()
calculateTicks
public Tick[] calculateTicks(Range<Date> r)
- Description copied from interface:
TickCalculator
- Calculate the ticks for this range of values
- Specified by:
calculateTicks
in interface TickCalculator<Date>
- Specified by:
calculateTicks
in class AbstractTimeTickCalculator
- Returns:
- an array of tick values
min
public static Calendar min(Calendar c1,
Calendar c2)
yearsDiff
public static double yearsDiff(Calendar c1,
Calendar c2)
weeksDiff
public static double weeksDiff(Calendar c1,
Calendar c2)
daysDiff
public static double daysDiff(Calendar c1,
Calendar c2)
hoursDiff
public static double hoursDiff(Calendar c1,
Calendar c2)
minutesDiff
public static double minutesDiff(Calendar c1,
Calendar c2)
secondsDiff
public static double secondsDiff(Calendar c1,
Calendar c2)
millisDiff
public static long millisDiff(Calendar c1,
Calendar c2)