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,MediaPlayerViewEdit,MoveRecordEdit,MoveTierEdit,MoveTimelineTierIntervalEdit,MoveTranscriptElementEdit,ParticipantUndoableEdit,RemoveParticipantEdit,RemoveTierEdit,SessionDateEdit,SessionLanguageEdit,ShowHideViewEdit,SyllabifierChangeEdit,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 TypeMethodDescriptionbooleancanRedo()booleancanUndo()abstract voiddoIt()'Do' the specified action.<T> TgetExtension(Class<T> cap) Get the requested extension if available.Return all extension types supportedGet the source for the edit.<T> TputExtension(Class<T> cap, T impl) Add a new extension.voidredo()<T> TremoveExtension(Class<T> cap) Remove a capability.voidSet 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:
redoin interfaceUndoableEdit- Overrides:
redoin 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:
canRedoin interfaceUndoableEdit- Overrides:
canRedoin classAbstractUndoableEdit
-
canUndo
public boolean canUndo()- Specified by:
canUndoin interfaceUndoableEdit- Overrides:
canUndoin classAbstractUndoableEdit
-
getExtensions
Description copied from interface:IExtendableReturn all extension types supported- Specified by:
getExtensionsin interfaceIExtendable
-
getExtension
Description copied from interface:IExtendableGet the requested extension if available.- Specified by:
getExtensionin interfaceIExtendable- Returns:
- the capability object or
nullif the cability is not available
-
putExtension
Description copied from interface:IExtendableAdd a new extension.- Specified by:
putExtensionin interfaceIExtendable- Parameters:
cap- the extension to add- Returns:
- the added extension implementation
-
removeExtension
Description copied from interface:IExtendableRemove a capability.- Specified by:
removeExtensionin interfaceIExtendable- Parameters:
cap- the capability to remove
-