|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.moneydance.apps.md.model.time.TimeIntervalUtil
public class TimeIntervalUtil
Utilities for managing time intervals for graphs and reports.
Constructor Summary | |
---|---|
TimeIntervalUtil()
|
Method Summary | |
---|---|
static int |
getColumnIndex(com.moneydance.apps.md.controller.time.GraphInterval[] dateRanges,
int dateInt)
Given a date, return which column it should belong to in a list of date ranges. |
static com.moneydance.apps.md.controller.time.GraphInterval[] |
getDateIntervalList(CustomDateFormat dateFormat,
DateRange dateRange,
TimeInterval interval)
Generate a list of date intervals given a date range and a time interval setting. |
int |
getIntervalEnd(int date,
TimeInterval interval)
Given a date and a desired interval, return the ending date. |
java.lang.String[] |
getIntervalLabels(CustomDateFormat fmt,
int numIntervals,
int startInterval,
TimeInterval interval)
Given a start date, number of intervals, and time interval, return a list of strings, one label for each interval. |
int[] |
getIntervalPoints(int numIntervals,
int startInterval,
TimeInterval interval)
Given a start date, number of intervals, and time interval, return a list of dates, one date per interval. |
int |
getIntervalStart(int date,
TimeInterval interval)
Given a date and a desired interval, return the starting date. |
int |
getNumIntervals(int startInterval,
int lastInterval,
TimeInterval interval)
Given a start and end date, return the number of intervals needed for a particular time interval. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeIntervalUtil()
Method Detail |
---|
public int[] getIntervalPoints(int numIntervals, int startInterval, TimeInterval interval)
numIntervals
- The number of intervals.startInterval
- The start date (beginning of the first interval).interval
- Length of each interval.
public java.lang.String[] getIntervalLabels(CustomDateFormat fmt, int numIntervals, int startInterval, TimeInterval interval)
fmt
- The date format to use for the labels.numIntervals
- The number of intervals.startInterval
- The start date (beginning of the first interval).interval
- Length of each interval.
public int getNumIntervals(int startInterval, int lastInterval, TimeInterval interval)
startInterval
- The starting date (on an even interval) as an integer.lastInterval
- The ending date (on an even interval) as an integer.interval
- Length of each interval.
public int getIntervalStart(int date, TimeInterval interval)
date
- The date.interval
- Length of the interval.
date
.public int getIntervalEnd(int date, TimeInterval interval)
date
- The date.interval
- Length of the interval.
date
.public static com.moneydance.apps.md.controller.time.GraphInterval[] getDateIntervalList(CustomDateFormat dateFormat, DateRange dateRange, TimeInterval interval)
dateFormat
- Display format for dates (passed to GraphInterval).dateRange
- The range of dates to split up into intervals.interval
- The size of each interval.
interval
, that covers the entire
perios specified by dateRange
.public static int getColumnIndex(com.moneydance.apps.md.controller.time.GraphInterval[] dateRanges, int dateInt)
dateRanges
- The list of date ranges, one range for each column.dateInt
- The date to find the appropriate column for.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |