com.dlsc.flexgantt.policy.layer

## Class DefaultSelectionPolicy

- java.lang.Object
- - com.dlsc.flexgantt.policy.AbstractPolicy
  - - 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
  Version:
    $Revision: 1.10 $
  Author:
    Dirk Lemmermann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultSelectionPolicy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isSelectable(IRelationship relationship, IGanttChartModel model)` Returns TRUE if the given relationship can be selected by the user (or programmatically) or not.
    `boolean` | `isSelectable(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(TimelineObjectPath path, 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(TimelineObjectPath path,
                                      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:
        `path` - the path to 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(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

    - #### isSelectable

          public boolean isSelectable(IRelationship relationship,
                                      IGanttChartModel model)

      Description copied from interface: `ISelectionPolicy`
      Returns TRUE if the given relationship can be selected by the user (or programmatically) or not.
      Specified by:
        `isSelectable` in interface `ISelectionPolicy`
      Parameters:
        `relationship` - the relationship to check for selectability
        `model` - the data source that returned the node and timeline object
      Returns:
        TRUE if the given relationship can be selected

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.