Class DefaultEditorSelectionModel
java.lang.Object
ca.phon.app.session.editor.DefaultEditorSelectionModel
- All Implemented Interfaces:
EditorSelectionModel
-
Constructor Summary
Constructors -
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) void
firSelectionRemoved
(SessionEditorSelection selection) Get 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.void
removeSelection
(SessionEditorSelection selection) Remove the given selection from the list of current selections.void
Remove a listenervoid
requestSwitchToRecord
(int recordIndex) Request that associated editor set current record index to the provided value.void
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
-
removeSelection
Description copied from interface:EditorSelectionModel
Remove the given selection from the list of current selections.- Specified by:
removeSelection
in interfaceEditorSelectionModel
-
setSelection
Description copied from interface:EditorSelectionModel
Set the current selection. This method will clear all other selections.- Specified by:
setSelection
in interfaceEditorSelectionModel
- Parameters:
selection
-
-
addSelection
Description copied from interface:EditorSelectionModel
Add the given selection to the list of current selections.- Specified by:
addSelection
in interfaceEditorSelectionModel
- Parameters:
selection
-
-
addSelectionModelListener
Description copied from interface:EditorSelectionModel
Add a listener for this model.- Specified by:
addSelectionModelListener
in interfaceEditorSelectionModel
- Parameters:
listener
-
-
removeSelectionModelListener
Description copied from interface:EditorSelectionModel
Remove a listener- Specified by:
removeSelectionModelListener
in interfaceEditorSelectionModel
- Parameters:
listener
-
-
getSelectionsForElement
Description copied from interface:EditorSelectionModel
Get selections for the specified transcript element index.- Specified by:
getSelectionsForElement
in interfaceEditorSelectionModel
- Parameters:
elementIndex
-- Returns:
- selections for record index
-
getSelectionsForTier
Description copied from interface:EditorSelectionModel
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.- Specified by:
getSelectionsForTier
in interfaceEditorSelectionModel
- Parameters:
elementIndex
-tierName
-- Returns:
-
getSelectionModelListeners
Description copied from interface:EditorSelectionModel
Get all listeners- Specified by:
getSelectionModelListeners
in interfaceEditorSelectionModel
- Returns:
- listeners
-
requestSwitchToRecord
public void requestSwitchToRecord(int recordIndex) Description copied from interface:EditorSelectionModel
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.- Specified by:
requestSwitchToRecord
in interfaceEditorSelectionModel
- Parameters:
recordIndex
-
-
fireSelectionAdded
-
fireSelectionSet
-
fireSelectionsCleared
public void fireSelectionsCleared() -
firSelectionRemoved
-