Package ca.phon.app.session.editor.undo
Class SessionEditorUndoableEdit
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
ca.phon.app.session.editor.undo.SessionEditorUndoableEdit
- All Implemented Interfaces:
IExtendable
,Serializable
,UndoableEdit
- Direct Known Subclasses:
AddGroupEdit
,AddParticipantEdit
,AddRecordEdit
,AddTierEdit
,ChangeSpeakerEdit
,ConvertFlatTierEdit
,DeleteRecordEdit
,MediaLocationEdit
,MergeAllGroupsEdit
,MergeGroupEdit
,ParticipantUndoableEdit
,RecordExcludeEdit
,RecordMoveEdit
,RemoveGroupEdit
,RemoveParticipantEdit
,RemoveTierEdit
,ScTypeEdit
,SessionDateEdit
,SessionLanguageEdit
,SplitGroupEdit
,SyllabifyEdit
,TierEdit
,TierNameEdit
,TierViewEdit
,TierViewItemEdit
,ToggleDiphthongEdit
- See Also:
-
Field Summary
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
-
Constructor Summary
-
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.boolean
<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.void
undo()
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, replaceEdit, toString
-
Constructor Details
-
SessionEditorUndoableEdit
Constructor- Parameters:
editor
-
-
-
Method Details
-
getEditor
-
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
-
undo
public void undo()- Specified by:
undo
in interfaceUndoableEdit
- Overrides:
undo
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
-
isSignificant
public boolean isSignificant()- Specified by:
isSignificant
in interfaceUndoableEdit
- Overrides:
isSignificant
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
-