com.dlsc.flexgantt.policy.layer
Class DefaultSelectionPolicy

java.lang.Object
  extended by com.dlsc.flexgantt.policy.AbstractPolicy
      extended by com.dlsc.flexgantt.policy.layer.DefaultSelectionPolicy
All Implemented Interfaces:
IPolicy, ISelectionPolicy

public class DefaultSelectionPolicy
extends AbstractPolicy
implements ISelectionPolicy

The default implmementation of selection policy. For a general description of this policy please refer to the policy interface ISelectionPolicy.

Since:
1.0
Author:
Dirk Lemmermann

Constructor Summary
DefaultSelectionPolicy()
           
 
Method Summary
 boolean isSelectable(java.lang.Object node, ITimeSpan span, IGanttChartModel model)
          Returns TRUE if the given time span on the given node can be selected by the user (or programmatically) or not.
 boolean isSelectable(java.lang.Object node, java.lang.Object timelineObject, IGanttChartModel model)
          Returns TRUE if the given timeline object on the given node can be selected by the user (or programmatically) or not.
 
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

DefaultSelectionPolicy

public DefaultSelectionPolicy()
Method Detail

isSelectable

public boolean isSelectable(java.lang.Object node,
                            java.lang.Object timelineObject,
                            IGanttChartModel model)
Description copied from interface: ISelectionPolicy
Returns TRUE if the given timeline object on the given node can be selected by the user (or programmatically) or not.

Specified by:
isSelectable in interface ISelectionPolicy
Parameters:
node - the tree node to which the timeline object belongs
timelineObject - the timeline object to check whether it can be selected or not
model - the data source that returned the node and timeline object
Returns:
TRUE if the given timeline object that belongs to the given node can be selected, FALSE otherwise

isSelectable

public boolean isSelectable(java.lang.Object node,
                            ITimeSpan span,
                            IGanttChartModel model)
Description copied from interface: ISelectionPolicy
Returns TRUE if the given time span on the given node can be selected by the user (or programmatically) or not.

Specified by:
isSelectable in interface ISelectionPolicy
Parameters:
node - the tree node on which to select the time span
span - the time span checkeds
model - the data source that returned the node
Returns:
TRUE if the given time span can be selected, FALSE otherwise