|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dlsc.flexgantt.policy.AbstractPolicy com.dlsc.flexgantt.policy.layer.AbstractGridPolicy<TimeGranularity> com.dlsc.flexgantt.policy.layer.TimeGranularityGridPolicy
public class TimeGranularityGridPolicy
A grid policy that uses the TimeGranularity
class to adjust start and
end times.
Constructor Summary | |
---|---|
TimeGranularityGridPolicy()
Constructs a new policy that will support the following granularities: TimeGranularity.MONTH_SHORT
TimeGranularity.WEEK
TimeGranularity.DAY_SHORT
TimeGranularity.HOUR
TimeGranularity.MINUTE
TimeGranularity.SECOND
The policy will round start and end times. |
|
TimeGranularityGridPolicy(boolean adjustingStartTimes,
boolean adjustingEndTimes,
TimeGranularity... granularities)
Constructs a new policy. |
|
TimeGranularityGridPolicy(TimeGranularity... granularities)
Constructs a new policy, which will round start and end times. |
Method Summary | |
---|---|
long |
getGridAdjustedEndTime(TimeGranularity tg,
long endTime,
IDatelineModel<TimeGranularity> datelineModel,
boolean autoGrid)
Returns a grid adjusted time point for the given unadjusted end time. |
long |
getGridAdjustedStartTime(TimeGranularity tg,
long startTime,
IDatelineModel<TimeGranularity> datelineModel,
boolean autoGrid)
Returns a grid adjusted time point for the given unadjusted start time. |
ITimeSpan |
getGridAdjustedTimeSpan(TimeGranularity tg,
ITimeSpan timeSpan,
IDatelineModel<TimeGranularity> datelineModel,
boolean autoGrid)
Returns a grid adjusted time span for the given unadjusted time span. |
Methods inherited from class com.dlsc.flexgantt.policy.layer.AbstractGridPolicy |
---|
getGridGranularities, isAdjustingEndTimes, isAdjustingStartTimes |
Methods inherited from class com.dlsc.flexgantt.policy.AbstractPolicy |
---|
assertClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeGranularityGridPolicy(boolean adjustingStartTimes, boolean adjustingEndTimes, TimeGranularity... granularities)
adjustingStartTimes
- if TRUE the start times will be rounded based on the given
grid granularityadjustingEndTimes
- if TRUE the end times will be rounded based on the given grid
granularitygranularities
- the supported grid granularitiespublic TimeGranularityGridPolicy(TimeGranularity... granularities)
granularities
- the supported grid granularitiespublic TimeGranularityGridPolicy()
TimeGranularity.MONTH_SHORT
TimeGranularity.WEEK
TimeGranularity.DAY_SHORT
TimeGranularity.HOUR
TimeGranularity.MINUTE
TimeGranularity.SECOND
AbstractGridPolicy.getGridGranularities()
Method Detail |
---|
public ITimeSpan getGridAdjustedTimeSpan(TimeGranularity tg, ITimeSpan timeSpan, IDatelineModel<TimeGranularity> datelineModel, boolean autoGrid)
IGridPolicy
tg
- the granularity for which to return an adjusted time pointtimeSpan
- the original time span that needs adjustmentdatelineModel
- the model used by the dateline (needed for the auto grid
feature)autoGrid
- if TRUE the grid calculations will be based on the minor
granularity shown by the dateline
public long getGridAdjustedStartTime(TimeGranularity tg, long startTime, IDatelineModel<TimeGranularity> datelineModel, boolean autoGrid)
IGridPolicy
tg
- the granularity for which to return an adjusted time pointstartTime
- the original time that needs adjustmentdatelineModel
- the model used by the dateline (needed for the auto grid
feature)autoGrid
- if TRUE the grid calculations will be based on the minor
granularity shown by the dateline
public long getGridAdjustedEndTime(TimeGranularity tg, long endTime, IDatelineModel<TimeGranularity> datelineModel, boolean autoGrid)
IGridPolicy
tg
- the granularity for which to return an adjusted time pointendTime
- the original time that needs adjustmentdatelineModel
- the model used by the dateline (needed for the auto grid
feature)autoGrid
- if TRUE the grid calculations will be based on the minor
granularity shown by the dateline
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |