Package ca.phon.app.session.editor
Class DefaultEditorSelectionModel
java.lang.Object
ca.phon.app.session.editor.DefaultEditorSelectionModel
- All Implemented Interfaces:
EditorSelectionModel
-
Constructor Summary
-
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 selectionsvoid
fireSelectionAdded
(SessionEditorSelection selection) void
void
fireSelectionSet
(SessionEditorSelection selection) Get 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.
-
Constructor Details
-
DefaultEditorSelectionModel
public DefaultEditorSelectionModel()
-
-
Method Details
-
getSelections
Description copied from interface:EditorSelectionModel
Get a list of all current selections.- Specified by:
getSelections
in interfaceEditorSelectionModel
- Returns:
- list of selections
-
getFirstSelection
Description copied from interface:EditorSelectionModel
Get the first selection in the list- Specified by:
getFirstSelection
in interfaceEditorSelectionModel
- Returns:
- first selection, or
null
if no selections are available
-
getLastSelection
Description copied from interface:EditorSelectionModel
Get the last selection in the list- Specified by:
getLastSelection
in interfaceEditorSelectionModel
- Returns:
- last selection, or
null
if no selections are available
-
clear
public void clear()Description copied from interface:EditorSelectionModel
Clear all selections- Specified by:
clear
in interfaceEditorSelectionModel
-
setSelection
Description copied from interface:EditorSelectionModel
Set the current selection. This method will clear all other selections.- Specified by:
setSelection
in interfaceEditorSelectionModel
-
addSelection
Description copied from interface:EditorSelectionModel
Add the given selection to the list of current selections.- Specified by:
addSelection
in interfaceEditorSelectionModel
-
addSelectionModelListener
Description copied from interface:EditorSelectionModel
Add a listener for this model.- Specified by:
addSelectionModelListener
in interfaceEditorSelectionModel
-
removeSelectionModelListener
Description copied from interface:EditorSelectionModel
Remove a listener- Specified by:
removeSelectionModelListener
in interfaceEditorSelectionModel
-
getSelectionsForRecord
Description copied from interface:EditorSelectionModel
Get selections for the specified record.- Specified by:
getSelectionsForRecord
in interfaceEditorSelectionModel
- Returns:
- selections for record index
-
getSelectionsForTier
- Specified by:
getSelectionsForTier
in interfaceEditorSelectionModel
-
getSelectionsForGroup
public List<SessionEditorSelection> getSelectionsForGroup(int recordIndex, String tierName, int groupIndex) - Specified by:
getSelectionsForGroup
in interfaceEditorSelectionModel
-
getSelectionModelListeners
Description copied from interface:EditorSelectionModel
Get all listeners- Specified by:
getSelectionModelListeners
in interfaceEditorSelectionModel
- Returns:
- listeners
-
fireSelectionAdded
-
fireSelectionSet
-
fireSelectionsCleared
public void fireSelectionsCleared()
-