JIDE 3.5.15

com.jidesoft.chart.axis
Class DefaultTimeTickCalculator

java.lang.Object
  extended by com.jidesoft.chart.axis.AbstractTimeTickCalculator
      extended by 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.


Field Summary
 
Fields inherited from class com.jidesoft.chart.axis.AbstractTimeTickCalculator
PROPERTY_TIME_ZONE
 
Constructor Summary
DefaultTimeTickCalculator()
           
 
Method Summary
 Tick[] calculateTicks(Range<Date> r)
          Calculate the ticks for this range of values
static double daysDiff(Calendar c1, Calendar c2)
           
static double hoursDiff(Calendar c1, Calendar c2)
           
static long millisDiff(Calendar c1, Calendar c2)
           
static Calendar min(Calendar c1, Calendar c2)
           
static double minutesDiff(Calendar c1, Calendar c2)
           
static double secondsDiff(Calendar c1, Calendar c2)
           
static double weeksDiff(Calendar c1, Calendar c2)
           
static double yearsDiff(Calendar c1, Calendar c2)
           
 
Methods inherited from class com.jidesoft.chart.axis.AbstractTimeTickCalculator
addPropertyChangeListener, getDateFormat, getTimeZone, removePropertyChangeListener, setDateFormat, setTimeZone
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTimeTickCalculator

public DefaultTimeTickCalculator()
Method Detail

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)

JIDE 3.5.15