com.dlsc.flexgantt.swing.layer.system

## Interface IRelationshipSelectionModel

- All Known Implementing Classes:
    DefaultRelationshipSelectionModel

      public interface IRelationshipSelectionModel

  A relationship selection model is used keep track of the currently selected relationships in the `RelationshipLayer`.
  Since:
    2.0
  Author:
    Dirk Lemmermann
  See Also:
    `RelationshipLayer.getSelectionModel()`, `RelationshipLayer.getSelectedRelationships()`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRelationshipSelectionModelListener(IRelationshipSelectionModelListener l)` Adds a listener to the model so that changes to the selection can be detected.
    `void` | `addSelection(Collection<IRelationship> relationships)` Adds several relationships to the selection.
    `void` | `clearSelection()` Removes all relationships from the model, hence deselecting them.
    `Collection<IRelationship>` | `getSelection()` Returns all relationship model object that are currently selected.
    `boolean` | `isEmpty()` Returns TRUE if currently no relationships are selected.
    `boolean` | `isSelected(IRelationship relationship)` Returns TRUE if the given relationship object is selected.
    `void` | `removeRelationshipSelectionModelListener(IRelationshipSelectionModelListener l)` Removes a listener from the model.
    `void` | `removeSelection(Collection<IRelationship> relationships)` Removes several relationships from the selection.

- - ### Method Detail

    - #### isEmpty

          boolean isEmpty()

      Returns TRUE if currently no relationships are selected.
      Returns:
        TRUE if model does not know of any selected relationships
      Since:
        2.0

    - #### isSelected

          boolean isSelected(IRelationship relationship)

      Returns TRUE if the given relationship object is selected.
      Parameters:
        `relationship` - the relationship to check for its selection state
      Returns:
        TRUE if the given relationship is selected
      Since:
        2.0

    - #### getSelection

          Collection<IRelationship> getSelection()

      Returns all relationship model object that are currently selected.
      Returns:
        all selected relationships
      Since:
        2.0

    - #### addSelection

          void addSelection(Collection<IRelationship> relationships)

      Adds several relationships to the selection.
      Parameters:
        `relationships` - the selected relationships
      Since:
        2.0

    - #### removeSelection

          void removeSelection(Collection<IRelationship> relationships)

      Removes several relationships from the selection.
      Parameters:
        `relationships` - the deselected relationships
      Since:
        2.0

    - #### clearSelection

          void clearSelection()

      Removes all relationships from the model, hence deselecting them.
      Since:
        2.0

    - #### addRelationshipSelectionModelListener

          void addRelationshipSelectionModelListener(IRelationshipSelectionModelListener l)

      Adds a listener to the model so that changes to the selection can be detected.
      Parameters:
        `l` - the model listener
      Since:
        2.0

    - #### removeRelationshipSelectionModelListener

          void removeRelationshipSelectionModelListener(IRelationshipSelectionModelListener l)

      Removes a listener from the model.
      Parameters:
        `l` - the model listener
      Since:
        2.0

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