com.dlsc.flexgantt.policy.layer
Class TimeGranularityGridLinePolicy

java.lang.Object
  extended by com.dlsc.flexgantt.policy.AbstractPolicy
      extended by com.dlsc.flexgantt.policy.layer.DefaultGridLinePolicy
          extended by com.dlsc.flexgantt.policy.layer.TimeGranularityGridLinePolicy
All Implemented Interfaces:
IPolicy, IGridLinePolicy

public class TimeGranularityGridLinePolicy
extends DefaultGridLinePolicy

A specialization of the default grid line policy for situations where the TimeGranularityDatelineModel gets used by the dateline. This policy takes into account that depending on the major and the minor time granularities the major and minor grid lines will not be on top of each other causing a messy grid line appearance. In these cases the policy will turn off the major grid lines. For a more general description of this policy please refer to the policy interface IDragAndDropPolicy.

Since:
1.0
Author:
Dirk Lemmermann

Constructor Summary
TimeGranularityGridLinePolicy()
           
 
Method Summary
 boolean isMajorGridLinesVisible(IDatelineModel datelineModel, GridLineMode mode)
          Determines whether the grid lines for the major time units will be shown or not.
 
Methods inherited from class com.dlsc.flexgantt.policy.layer.DefaultGridLinePolicy
isMinorGridLinesVisible
 
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

TimeGranularityGridLinePolicy

public TimeGranularityGridLinePolicy()
Method Detail

isMajorGridLinesVisible

public boolean isMajorGridLinesVisible(IDatelineModel datelineModel,
                                       GridLineMode mode)
Description copied from interface: IGridLinePolicy
Determines whether the grid lines for the major time units will be shown or not.

Specified by:
isMajorGridLinesVisible in interface IGridLinePolicy
Overrides:
isMajorGridLinesVisible in class DefaultGridLinePolicy
Parameters:
datelineModel - the dateline model currently used by the dateline
mode - the grid mode (show no grid, minor grid, major grid, combined grid)
Returns:
TRUE if the grid lines for the major time unit are visible