Class SessionUndoableEdit
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
ca.phon.app.session.editor.undo.SessionUndoableEdit
- All Implemented Interfaces:
IExtendable
,Serializable
,UndoableEdit
- Direct Known Subclasses:
AddParticipantEdit
,AddRecordEdit
,AddTierEdit
,AddTimelineTierEdit
,AddTimelineTierIntervalEdit
,AddTranscriptElementEdit
,ChangeCommentEdit
,ChangeCommentTypeEdit
,ChangeGemEdit
,ChangeGemTypeEdit
,ChangeSpeakerEdit
,DeleteRecordEdit
,EditSessionMetadata
,MediaLocationEdit
,MoveRecordEdit
,MoveTierEdit
,MoveTimelineTierIntervalEdit
,MoveTranscriptElementEdit
,ParticipantUndoableEdit
,RemoveParticipantEdit
,RemoveTierEdit
,ScTypeEdit
,SessionDateEdit
,SessionLanguageEdit
,SyllabifyEdit
,TierBlindEdit
,TierEdit
,TierNameEdit
,TierViewEdit
,TierViewItemEdit
,ToggleDiphthongEdit
,ToggleTierAlignedEdit
- See Also:
-
Field Summary
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
-
Constructor Summary
ConstructorsConstructorDescriptionSessionUndoableEdit
(Session session, EditorEventManager editorEventManager) Constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
canRedo()
boolean
canUndo()
abstract void
doIt()
'Do' the specified action.<T> T
getExtension
(Class<T> cap) Get the requested extension if available.Return all extension types supportedGet the source for the edit.<T> T
putExtension
(Class<T> cap, T impl) Add a new extension.void
redo()
<T> T
removeExtension
(Class<T> cap) Remove a capability.void
Set the source for the edit.Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString, undo
-
Constructor Details
-
SessionUndoableEdit
Constructor- Parameters:
editor
-
-
-
Method Details
-
getSession
-
getEditorEventManager
-
getSource
Get the source for the edit. This value is given to the resulting EditorEvents. During undo/redo operations, the source is always the value of getEditor().getUndoSupport().- Returns:
- the source
-
setSource
Set the source for the edit. This is the source passed to the initial execution of the edit. Undo/redo operations always use the editor's undo support as the source.- Parameters:
source
-
-
redo
public void redo()- Specified by:
redo
in interfaceUndoableEdit
- Overrides:
redo
in classAbstractUndoableEdit
-
doIt
public abstract void doIt()'Do' the specified action. The method is called by the EditorUnsoSupport when new edits are posted. -
canRedo
public boolean canRedo()- Specified by:
canRedo
in interfaceUndoableEdit
- Overrides:
canRedo
in classAbstractUndoableEdit
-
canUndo
public boolean canUndo()- Specified by:
canUndo
in interfaceUndoableEdit
- Overrides:
canUndo
in classAbstractUndoableEdit
-
getExtensions
Description copied from interface:IExtendable
Return all extension types supported- Specified by:
getExtensions
in interfaceIExtendable
-
getExtension
Description copied from interface:IExtendable
Get the requested extension if available.- Specified by:
getExtension
in interfaceIExtendable
- Returns:
- the capability object or
null
if the cability is not available
-
putExtension
Description copied from interface:IExtendable
Add a new extension.- Specified by:
putExtension
in interfaceIExtendable
- Parameters:
cap
- the extension to add- Returns:
- the added extension implementation
-
removeExtension
Description copied from interface:IExtendable
Remove a capability.- Specified by:
removeExtension
in interfaceIExtendable
- Parameters:
cap
- the capability to remove
-