Class AbstractUndoableCommand
java.lang.Object
org.apache.batik.apps.svgbrowser.AbstractUndoableCommand
- All Implemented Interfaces:
UndoableCommand
- Direct Known Subclasses:
AbstractCompoundCommand, HistoryBrowserInterface.AppendChildCommand, HistoryBrowserInterface.AttributeAddedCommand, HistoryBrowserInterface.AttributeModifiedCommand, HistoryBrowserInterface.AttributeRemovedCommand, HistoryBrowserInterface.ChangeNodeValueCommand, HistoryBrowserInterface.CharDataModifiedCommand, HistoryBrowserInterface.InsertNodeBeforeCommand, HistoryBrowserInterface.NodeInsertedCommand, HistoryBrowserInterface.NodeRemovedCommand, HistoryBrowserInterface.RemoveChildCommand, HistoryBrowserInterface.ReplaceChildCommand
Represents abstract undoable/redoable command. Concrete commands should
extend this class
- Version:
- $Id$
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
name
The command name.
-
-
Constructor Details
-
AbstractUndoableCommand
public AbstractUndoableCommand()
-
-
Method Details
-
execute
public void execute()Description copied from interface:UndoableCommandExecutes this command.- Specified by:
executein interfaceUndoableCommand
-
undo
public void undo()Description copied from interface:UndoableCommandPerforms undo for this command.- Specified by:
undoin interfaceUndoableCommand
-
redo
public void redo()Description copied from interface:UndoableCommandPerforms redo for this command.- Specified by:
redoin interfaceUndoableCommand
-
getName
Description copied from interface:UndoableCommandGets the command name.- Specified by:
getNamein interfaceUndoableCommand
-
setName
-
shouldExecute
public boolean shouldExecute()Description copied from interface:UndoableCommandTests if the command can be executed.- Specified by:
shouldExecutein interfaceUndoableCommand- Returns:
- True if command should be executed
-