com.dlsc.flexgantt.swing.layer

## Interface ILayerContainerSelectionModel

- All Known Implementing Classes:
    DefaultLayerContainerSelectionModel

      public interface ILayerContainerSelectionModel

  A selection model used by the layer container to manage the selection of time spans.
  Since:
    1.0
  Version:
    $Revision: 1.3 $
  Author:
    Dirk Lemmermann
  See Also:
    `LayerContainer.setSelectionModel(ILayerContainerSelectionModel)`, `LayerContainer.getSelectionModel()`, `ILayerContainerSelectionModelListener`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addLayerContainerSelectionModelListener(ILayerContainerSelectionModelListener l)` Adds a listener to the selection model.
    `void` | `addSelectedTimeSpan(Object node, ITimeSpan span)` Adds a time span to the list of selected time spans of the given tree table node object.
    `void` | `clearSelectedTimeSpans()` Removes all selected time spans from the selection model.
    `void` | `clearSelectedTimeSpans(Object node)` Removes all of those selected time spans that belong to the given tree node object.
    `Iterator<ITimeSpan>` | `getSelectedTimeSpans(Object node, ITimeSpan span)` Returns an iterator for iterating over the list of selected time spans of the given node within the given time span.
    `boolean` | `isEmpty()` Checks whether the selection model contains any selections at all.
    `boolean` | `isEmpty(Object node)` Checks whether the selection model contains any selections for the given tree node object.
    `boolean` | `isSelected(Object node, ITimeSpan span)` Returns TRUE if the given time span is currently selected on the given tree table node.
    `void` | `removeLayerContainerSelectionModelListener(ILayerContainerSelectionModelListener l)` Removes a listener from the selection model.
    `void` | `removeSelectedTimeSpan(Object node, ITimeSpan span)` Removes a time span from the list of selected time spans of the given tree table node object.

- - ### Method Detail

    - #### isEmpty

          boolean isEmpty()

      Checks whether the selection model contains any selections at all.
      Returns:
        TRUE if the selection model does not have any selections
      Since:
        1.0

    - #### isEmpty

          boolean isEmpty(Object node)

      Checks whether the selection model contains any selections for the given tree node object.
      Parameters:
        `node` - the node to check for selections
      Returns:
        TRUE if the selection model does not have any selections for the given tree node object
      Since:
        1.0

    - #### clearSelectedTimeSpans

          void clearSelectedTimeSpans()

      Removes all selected time spans from the selection model.
      Since:
        1.0
      See Also:
        `clearSelectedTimeSpans(Object)`, `removeSelectedTimeSpan(Object, ITimeSpan)`

    - #### clearSelectedTimeSpans

          void clearSelectedTimeSpans(Object node)

      Removes all of those selected time spans that belong to the given tree node object.
      Parameters:
        `node` - the tree table node object
      Since:
        1.0
      See Also:
        `clearSelectedTimeSpans()`, `removeSelectedTimeSpan(Object, ITimeSpan)`

    - #### addSelectedTimeSpan

          void addSelectedTimeSpan(Object node,
                                   ITimeSpan span)

      Adds a time span to the list of selected time spans of the given tree table node object.
      Parameters:
        `node` - the tree table node object
        `span` - the time span to add
      Since:
        1.0
      See Also:
        `removeSelectedTimeSpan(Object, ITimeSpan)`

    - #### removeSelectedTimeSpan

          void removeSelectedTimeSpan(Object node,
                                      ITimeSpan span)

      Removes a time span from the list of selected time spans of the given tree table node object.
      Parameters:
        `node` - the tree table node object
        `span` - the time span to remove
      Since:
        1.0
      See Also:
        `addSelectedTimeSpan(Object, ITimeSpan)`

    - #### getSelectedTimeSpans

          Iterator<ITimeSpan> getSelectedTimeSpans(Object node,
                                                   ITimeSpan span)

      Returns an iterator for iterating over the list of selected time spans of the given node within the given time span.
      Parameters:
        `node` - the tree table node object
        `span` - the time span for which an iterator gets created
      Returns:
        a time span iterator
      Since:
        1.0

    - #### isSelected

          boolean isSelected(Object node,
                             ITimeSpan span)

      Returns TRUE if the given time span is currently selected on the given tree table node. A time span is considered selected if it is completely contained within one of the selected time spans.
      Parameters:
        `node` - the tree table node object
        `span` - the time span to check
      Returns:
        TRUE if the time span is currently selected
      Since:
        1.0
      See Also:
        `ITimeSpan.contains(ITimeSpan)`

    - #### addLayerContainerSelectionModelListener

          void addLayerContainerSelectionModelListener(ILayerContainerSelectionModelListener l)

      Adds a listener to the selection model.
      Parameters:
        `l` - the listener to add
      Since:
        1.0
      See Also:
        `removeLayerContainerSelectionModelListener(ILayerContainerSelectionModelListener)`

    - #### removeLayerContainerSelectionModelListener

          void removeLayerContainerSelectionModelListener(ILayerContainerSelectionModelListener l)

      Removes a listener from the selection model.
      Parameters:
        `l` - the listener to remove
      Since:
        1.0
      See Also:
        `addLayerContainerSelectionModelListener(ILayerContainerSelectionModelListener)`

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