Interface EditorSelectionModel
- All Known Implementing Classes:
DefaultEditorSelectionModel
public interface EditorSelectionModel
Selection model for the
SessionEditor.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddSelection(SessionEditorSelection selection) Add the given selection to the list of current selections.voidAdd a listener for this model.voidclear()Clear all selectionsGet the first selection in the listGet the last selection in the listGet all listenersGet a list of all current selections.getSelectionsForElement(int elementIndex) Get selections for the specified transcript element index.getSelectionsForTier(int elementIndex, String tierName) Get selections for the specified element index and tier name.voidremoveSelection(SessionEditorSelection selection) Remove the given selection from the list of current selections.voidRemove a listenervoidrequestSwitchToRecord(int recordIndex) Request that associated editor set current record index to the provided value.voidsetSelection(SessionEditorSelection selection) Set the current selection.
-
Method Details
-
getSelections
List<SessionEditorSelection> getSelections()Get a list of all current selections.- Returns:
- list of selections
-
getFirstSelection
SessionEditorSelection getFirstSelection()Get the first selection in the list- Returns:
- first selection, or
nullif no selections are available
-
getLastSelection
SessionEditorSelection getLastSelection()Get the last selection in the list- Returns:
- last selection, or
nullif no selections are available
-
clear
void clear()Clear all selections -
removeSelection
Remove the given selection from the list of current selections. -
setSelection
Set the current selection. This method will clear all other selections.- Parameters:
selection-
-
addSelection
Add the given selection to the list of current selections.- Parameters:
selection-
-
getSelectionsForElement
Get selections for the specified transcript element index.- Parameters:
elementIndex-- Returns:
- selections for record index
-
getSelectionsForTier
Get selections for the specified element index and tier name. If the element index is a comment or gem tier, the tier name is ignored.- Parameters:
elementIndex-tierName-- Returns:
-
addSelectionModelListener
Add a listener for this model.- Parameters:
listener-
-
removeSelectionModelListener
Remove a listener- Parameters:
listener-
-
getSelectionModelListeners
List<EditorSelectionModelListener> getSelectionModelListeners()Get all listeners- Returns:
- listeners
-
requestSwitchToRecord
void requestSwitchToRecord(int recordIndex) Request that associated editor set current record index to the provided value. This is a request only and may be ignored. There is no indication of success.- Parameters:
recordIndex-
-