MPXJ: Microsoft Project Exchange

net.sf.mpxj.utility
Class TimescaleUtility

java.lang.Object
  extended by net.sf.mpxj.utility.TimescaleUtility

public final class TimescaleUtility
extends java.lang.Object

This class contains methods related to creation of timescale data.


Constructor Summary
TimescaleUtility()
           
 
Method Summary
 java.util.ArrayList<DateRange> createTimescale(java.util.Date startDate, TimescaleUnits segmentUnit, int segmentCount)
          Given a start date, a timescale unit, and a number of segments, this method creates an array of date ranges.
 int getWeekStartDay()
          Retrieves the day on which the week starts.
 void setWeekStartDay(int weekStartDay)
          Set the day on which the week starts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimescaleUtility

public TimescaleUtility()
Method Detail

createTimescale

public final java.util.ArrayList<DateRange> createTimescale(java.util.Date startDate,
                                                            TimescaleUnits segmentUnit,
                                                            int segmentCount)
Given a start date, a timescale unit, and a number of segments, this method creates an array of date ranges. For example, if "Months" is selected as the timescale units, this method will create an array of ranges, each one representing a month. The number of entries in the array is determined by the segment count. Each of these date ranges is equivalent one of the columns displayed by MS Project when viewing data with a "timescale" at the top of the page.

Parameters:
startDate - start date
segmentUnit - units to be represented by each segment (column)
segmentCount - number of segments (columns) required
Returns:
array of date ranges

setWeekStartDay

public void setWeekStartDay(int weekStartDay)
Set the day on which the week starts. Defaults to Calendar.MONDAY.

Parameters:
weekStartDay - week start day

getWeekStartDay

public int getWeekStartDay()
Retrieves the day on which the week starts.

Returns:
week start day


Copyright © 2000-2014 Packwood Software. All Rights Reserved.