Class DefaultEditorSelectionModel
java.lang.Object
ca.phon.app.session.editor.DefaultEditorSelectionModel
- All Implemented Interfaces:
EditorSelectionModel
-
Constructor Summary
Constructors -
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 selectionsvoidfireSelectionAdded(SessionEditorSelection selection) voidvoidfireSelectionSet(SessionEditorSelection selection) voidfirSelectionRemoved(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.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.
-
Constructor Details
-
DefaultEditorSelectionModel
public DefaultEditorSelectionModel()
-
-
Method Details
-
getSelections
Description copied from interface:EditorSelectionModelGet a list of all current selections.- Specified by:
getSelectionsin interfaceEditorSelectionModel- Returns:
- list of selections
-
getFirstSelection
Description copied from interface:EditorSelectionModelGet the first selection in the list- Specified by:
getFirstSelectionin interfaceEditorSelectionModel- Returns:
- first selection, or
nullif no selections are available
-
getLastSelection
Description copied from interface:EditorSelectionModelGet the last selection in the list- Specified by:
getLastSelectionin interfaceEditorSelectionModel- Returns:
- last selection, or
nullif no selections are available
-
clear
public void clear()Description copied from interface:EditorSelectionModelClear all selections- Specified by:
clearin interfaceEditorSelectionModel
-
removeSelection
Description copied from interface:EditorSelectionModelRemove the given selection from the list of current selections.- Specified by:
removeSelectionin interfaceEditorSelectionModel
-
setSelection
Description copied from interface:EditorSelectionModelSet the current selection. This method will clear all other selections.- Specified by:
setSelectionin interfaceEditorSelectionModel- Parameters:
selection-
-
addSelection
Description copied from interface:EditorSelectionModelAdd the given selection to the list of current selections.- Specified by:
addSelectionin interfaceEditorSelectionModel- Parameters:
selection-
-
addSelectionModelListener
Description copied from interface:EditorSelectionModelAdd a listener for this model.- Specified by:
addSelectionModelListenerin interfaceEditorSelectionModel- Parameters:
listener-
-
removeSelectionModelListener
Description copied from interface:EditorSelectionModelRemove a listener- Specified by:
removeSelectionModelListenerin interfaceEditorSelectionModel- Parameters:
listener-
-
getSelectionsForElement
Description copied from interface:EditorSelectionModelGet selections for the specified transcript element index.- Specified by:
getSelectionsForElementin interfaceEditorSelectionModel- Parameters:
elementIndex-- Returns:
- selections for record index
-
getSelectionsForTier
Description copied from interface:EditorSelectionModelGet 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:
getSelectionsForTierin interfaceEditorSelectionModel- Parameters:
elementIndex-tierName-- Returns:
-
getSelectionModelListeners
Description copied from interface:EditorSelectionModelGet all listeners- Specified by:
getSelectionModelListenersin interfaceEditorSelectionModel- Returns:
- listeners
-
requestSwitchToRecord
public void requestSwitchToRecord(int recordIndex) Description copied from interface:EditorSelectionModelRequest 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:
requestSwitchToRecordin interfaceEditorSelectionModel- Parameters:
recordIndex-
-
fireSelectionAdded
-
fireSelectionSet
-
fireSelectionsCleared
public void fireSelectionsCleared() -
firSelectionRemoved
-