UndoableCommandAbstractCompoundCommand, HistoryBrowserInterface.AppendChildCommand, HistoryBrowserInterface.AttributeAddedCommand, HistoryBrowserInterface.AttributeModifiedCommand, HistoryBrowserInterface.AttributeRemovedCommand, HistoryBrowserInterface.ChangeNodeValueCommand, HistoryBrowserInterface.CharDataModifiedCommand, HistoryBrowserInterface.InsertNodeBeforeCommand, HistoryBrowserInterface.NodeInsertedCommand, HistoryBrowserInterface.NodeRemovedCommand, HistoryBrowserInterface.RemoveChildCommand, HistoryBrowserInterface.ReplaceChildCommandpublic abstract class AbstractUndoableCommand extends java.lang.Object implements UndoableCommand
| Modifier and Type | Field | Description |
|---|---|---|
protected java.lang.String |
name |
The command name.
|
| Constructor | Description |
|---|---|
AbstractUndoableCommand() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
execute() |
Executes this command.
|
java.lang.String |
getName() |
Gets the command name.
|
void |
redo() |
Performs redo for this command.
|
void |
setName(java.lang.String name) |
Sets the command name.
|
boolean |
shouldExecute() |
Tests if the command can be executed.
|
void |
undo() |
Performs undo for this command.
|
public void execute()
UndoableCommandexecute in interface UndoableCommandpublic void undo()
UndoableCommandundo in interface UndoableCommandpublic void redo()
UndoableCommandredo in interface UndoableCommandpublic java.lang.String getName()
UndoableCommandgetName in interface UndoableCommandpublic void setName(java.lang.String name)
name - Name to setpublic boolean shouldExecute()
UndoableCommandshouldExecute in interface UndoableCommandCopyright ? 2018 Apache Software Foundation. All Rights Reserved.