Package org.apache.batik.apps.svgbrowser
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
-
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:UndoableCommand
Executes this command.- Specified by:
execute
in interfaceUndoableCommand
-
undo
public void undo()Description copied from interface:UndoableCommand
Performs undo for this command.- Specified by:
undo
in interfaceUndoableCommand
-
redo
public void redo()Description copied from interface:UndoableCommand
Performs redo for this command.- Specified by:
redo
in interfaceUndoableCommand
-
getName
Description copied from interface:UndoableCommand
Gets the command name.- Specified by:
getName
in interfaceUndoableCommand
-
setName
Sets the command name.- Parameters:
name
- Name to set
-
shouldExecute
public boolean shouldExecute()Description copied from interface:UndoableCommand
Tests if the command can be executed.- Specified by:
shouldExecute
in interfaceUndoableCommand
- Returns:
- True if command should be executed
-