com.dlsc.flexgantt.swing.layer.timeline

## Interface ITimelineObjectSelectionModel

- All Known Implementing Classes:
    DefaultTimelineObjectSelectionModel

      public interface ITimelineObjectSelectionModel

  A selection model definition used by instances of `TimelineObjectLayer`.
  Since:
    1.0
  Version:
    $Revision: 1.5 $
  Author:
    Dirk Lemmermann

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSelection(Collection<TimelineObjectPath> paths)` Adds several timeline objects to the selection at the same time.
    `void` | `addSelection(TimelineObjectPath path)` Adds a selection / a selected timeline object to the model.
    `void` | `addTimelineObjectSelectionModelListener(ITimelineObjectSelectionListener l)` Adds a listener to the model.
    `void` | `clearSelection()` Clears the current selection.
    `void` | `clearSelection(TreePath path)` Clears the current selection for the given path (clears the selection within a specific row).
    `Iterator<TimelineObjectPath>` | `getSelection()` Returns all timeline objects that are currently selected.
    `Iterator<TimelineObjectPath>` | `getSelection(TreePath path)` Returns all timeline objects for the given node that are currently selected.
    `Iterator<TimelineObjectPath>` | `getSelection(TreePath path, ITimeSpan span)` Returns all timeline objects for the given node and time span that are currently selected.
    `Iterator<TreePath>` | `getSelectionPaths()` Returns all tree paths that reference hierarchy objects on which a selection exists / on which timeline objects are selected.
    `boolean` | `isEmpty()` Determines if the current selection is empty.
    `boolean` | `isSelected(TimelineObjectPath path)` Determines if the timeline object referenced by the given timeline object path is currently selected.
    `void` | `removeSelection(Collection<TimelineObjectPath> paths)` Removes several timeline objects from the selection at the same time.
    `void` | `removeSelection(TimelineObjectPath path)` Removes a selection / a selected timeline object from the model.
    `void` | `removeTimelineObjectSelectionModelListener(ITimelineObjectSelectionListener l)` Removes a listener from the model.

- - ### Method Detail

    - #### clearSelection

          void clearSelection()

      Clears the current selection. No timeline object will be marked as selected any more.
      Since:
        1.0

    - #### clearSelection

          void clearSelection(TreePath path)

      Clears the current selection for the given path (clears the selection within a specific row).
      Parameters:
        `path` - the path to the hierarchy node for which the selection will be cleared
      Since:
        1.0

    - #### addSelection

          void addSelection(TimelineObjectPath path)

      Adds a selection / a selected timeline object to the model.
      Parameters:
        `path` - the path to the timeline object
      Since:
        1.0

    - #### addSelection

          void addSelection(Collection<TimelineObjectPath> paths)

      Adds several timeline objects to the selection at the same time.
      Parameters:
        `paths` - a collection of timeline object paths
      Since:
        1.0

    - #### removeSelection

          void removeSelection(TimelineObjectPath path)

      Removes a selection / a selected timeline object from the model.
      Parameters:
        `path` - the path to the timeline object
      Since:
        1.0

    - #### removeSelection

          void removeSelection(Collection<TimelineObjectPath> paths)

      Removes several timeline objects from the selection at the same time.
      Parameters:
        `paths` - a collection of timeline object paths
      Since:
        1.0

    - #### getSelection

          Iterator<TimelineObjectPath> getSelection(TreePath path,
                                                    ITimeSpan span)

      Returns all timeline objects for the given node and time span that are currently selected. The method returns an `Iterator` in order to hide the actual data structure used to store the objects.
      Parameters:
        `path` - the path to the hierarchy node for which to return the selected timeline objects
        `span` - the time span for which to return the selected timeline objects
      Returns:
        an iterator for iterating over the list of selected timeline objects for the given node and time span
      Since:
        1.0
      See Also:
        `getSelection()`, `getSelection(TreePath)`

    - #### getSelection

          Iterator<TimelineObjectPath> getSelection(TreePath path)

      Returns all timeline objects for the given node that are currently selected. The method returns an `Iterator` in order to hide the actual data structure used to store the objects.
      Parameters:
        `path` - the path to the hierarchy node for which to return the selected timeline objects
      Returns:
        an iterator for iterating over the list of selected timeline objects for the given node and time span
      Since:
        1.0
      See Also:
        `getSelection(TreePath, ITimeSpan)`, `getSelection()`

    - #### getSelection

          Iterator<TimelineObjectPath> getSelection()

      Returns all timeline objects that are currently selected. The method returns an `Iterator` in order to hide the actual data structure used to store the objects.
      Returns:
        an iterator for iterating over the list of selected timeline objects for the given node and time span
      Since:
        1.0
      See Also:
        `getSelection(TreePath)`, `getSelection(TreePath, ITimeSpan)`

    - #### getSelectionPaths

          Iterator<TreePath> getSelectionPaths()

      Returns all tree paths that reference hierarchy objects on which a selection exists / on which timeline objects are selected.
      Returns:
        all tree paths referencing hierarchy objects with selections
      Since:
        1.0

    - #### isSelected

          boolean isSelected(TimelineObjectPath path)

      Determines if the timeline object referenced by the given timeline object path is currently selected.
      Parameters:
        `path` - the path to the checked timeline object
      Returns:
        TRUE if the referenced timeline object is selected
      Since:
        1.0

    - #### isEmpty

          boolean isEmpty()

      Determines if the current selection is empty.
      Returns:
        TRUE if at least one timeline object is selected
      Since:
        2.0

    - #### addTimelineObjectSelectionModelListener

          void addTimelineObjectSelectionModelListener(ITimelineObjectSelectionListener l)

      Adds a listener to the model. The listener will be informed if selections are added to or removed from the model.
      Parameters:
        `l` - the listener to add
      Since:
        1.0

    - #### removeTimelineObjectSelectionModelListener

          void removeTimelineObjectSelectionModelListener(ITimelineObjectSelectionListener l)

      Removes a listener from the model.
      Parameters:
        `l` - the listener to remove
      Since:
        1.0

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