public abstract class AbstractUndoableCommand extends Object implements UndoableCommand
| Modifier and Type | Field and Description |
|---|---|
protected String |
name
The command name.
|
| Constructor and Description |
|---|
AbstractUndoableCommand() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Executes this command.
|
String |
getName()
Gets the command name.
|
void |
redo()
Performs redo for this command.
|
void |
setName(String name)
Sets the command name.
|
boolean |
shouldExecute()
Tests if the command can be executed.
|
void |
undo()
Performs undo for this command.
|
protected String name
public void execute()
UndoableCommandexecute in interface UndoableCommandpublic void undo()
UndoableCommandundo in interface UndoableCommandpublic void redo()
UndoableCommandredo in interface UndoableCommandpublic String getName()
UndoableCommandgetName in interface UndoableCommandpublic void setName(String name)
name - Name to setpublic boolean shouldExecute()
UndoableCommandshouldExecute in interface UndoableCommandCopyright © 2000–2020 Apache Software Foundation. All rights reserved.