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()
UndoableCommand
execute
in interface UndoableCommand
public void undo()
UndoableCommand
undo
in interface UndoableCommand
public void redo()
UndoableCommand
redo
in interface UndoableCommand
public String getName()
UndoableCommand
getName
in interface UndoableCommand
public void setName(String name)
name
- Name to setpublic boolean shouldExecute()
UndoableCommand
shouldExecute
in interface UndoableCommand
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.