Package ca.phon.app.session.editor
Interface EditorSelectionModel
- All Known Implementing Classes:
DefaultEditorSelectionModel
public interface EditorSelectionModel
Selection model for the
SessionEditor
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSelection
(SessionEditorSelection selection) Add the given selection to the list of current selections.void
Add a listener for this model.void
clear()
Clear all selectionsGet the first selection in the listGet the last selection in the listGet all listenersGet a list of all current selections.getSelectionsForGroup
(int recordIndex, String tierName, int groupIndex) getSelectionsForRecord
(int recordIndex) Get selections for the specified record.getSelectionsForTier
(int recordIndex, String tierName) void
Remove a listenervoid
setSelection
(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
null
if no selections are available
-
getLastSelection
SessionEditorSelection getLastSelection()Get the last selection in the list- Returns:
- last selection, or
null
if no selections are available
-
clear
void clear()Clear all 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
-
-
getSelectionsForRecord
Get selections for the specified record.- Parameters:
recordIndex
-- Returns:
- selections for record index
-
getSelectionsForTier
-
getSelectionsForGroup
List<SessionEditorSelection> getSelectionsForGroup(int recordIndex, String tierName, int groupIndex) -
addSelectionModelListener
Add a listener for this model.- Parameters:
listener
-
-
removeSelectionModelListener
Remove a listener- Parameters:
listener
-
-
getSelectionModelListeners
List<EditorSelectionModelListener> getSelectionModelListeners()Get all listeners- Returns:
- listeners
-