|
||||||||||
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<SimpleGranularity> com.dlsc.flexgantt.policy.layer.SimpleGranularityGridPolicy
public class SimpleGranularityGridPolicy
A grid policy that uses the SimpleGranularity
class to adjust start
and end times.
Constructor Summary | |
---|---|
SimpleGranularityGridPolicy()
Constructs a new policy that will support all granularities found in the SimpleGranularity enumerator. |
|
SimpleGranularityGridPolicy(boolean adjustingStartTimes,
boolean adjustingEndTimes,
SimpleGranularity... granularities)
Constructs a new policy. |
|
SimpleGranularityGridPolicy(SimpleGranularity... granularities)
Constructs a new policy, which will round start and end times. |
Method Summary | |
---|---|
long |
getGridAdjustedEndTime(SimpleGranularity sg,
long endTime,
IDatelineModel<SimpleGranularity> model,
boolean autoGrid)
Returns a grid adjusted time point for the given unadjusted end time. |
long |
getGridAdjustedStartTime(SimpleGranularity sg,
long startTime,
IDatelineModel<SimpleGranularity> model,
boolean autoGrid)
Returns a grid adjusted time point for the given unadjusted start time. |
ITimeSpan |
getGridAdjustedTimeSpan(SimpleGranularity sg,
ITimeSpan timeSpan,
IDatelineModel<SimpleGranularity> model,
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 SimpleGranularityGridPolicy(boolean adjustingStartTimes, boolean adjustingEndTimes, SimpleGranularity... 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 SimpleGranularityGridPolicy(SimpleGranularity... granularities)
granularities
- the supported grid granularitiespublic SimpleGranularityGridPolicy()
SimpleGranularity
enumerator.
Method Detail |
---|
public ITimeSpan getGridAdjustedTimeSpan(SimpleGranularity sg, ITimeSpan timeSpan, IDatelineModel<SimpleGranularity> model, boolean autoGrid)
IGridPolicy
sg
- the granularity for which to return an adjusted time pointtimeSpan
- the original time span that needs adjustmentmodel
- 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(SimpleGranularity sg, long startTime, IDatelineModel<SimpleGranularity> model, boolean autoGrid)
IGridPolicy
sg
- the granularity for which to return an adjusted time pointstartTime
- the original time that needs adjustmentmodel
- 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(SimpleGranularity sg, long endTime, IDatelineModel<SimpleGranularity> model, boolean autoGrid)
IGridPolicy
sg
- the granularity for which to return an adjusted time pointendTime
- the original time that needs adjustmentmodel
- 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 |