com.dlsc.flexgantt.policy.layer

## Interface ISelectionPolicy

- All Superinterfaces:
    IPolicy
  All Known Implementing Classes:
    DefaultSelectionPolicy

      public interface ISelectionPolicy
      extends IPolicy

  A policy that is used to determine whether timeline objects, relationships, or time spans can be selected or not. The policy does not return a command object as the selection of objects shall not be tracked by the command stack and undo / redo capabilities are not desired.
  Since:
    1.0
  Version:
    $Revision: 1.6 $
  Author:
    Dirk Lemmermann

- - ### Method Summary

    All Methods Instance Methods Abstract 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.

- - ### Method Detail

    - #### isSelectable

          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.
      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
      Since:
        1.0

    - #### isSelectable

          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.
      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
      Since:
        1.0

    - #### isSelectable

          boolean isSelectable(IRelationship relationship,
                               IGanttChartModel model)

      Returns TRUE if the given relationship can be selected by the user (or programmatically) or not.
      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
      Since:
        2.0

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