public abstract class AbstractUndoableCommand extends java.lang.Object implements UndoableCommand
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
name
The command name.
|
Constructor and Description |
---|
AbstractUndoableCommand() |
Modifier and Type | Method and 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()
UndoableCommand
execute
in interface UndoableCommand
public void undo()
UndoableCommand
undo
in interface UndoableCommand
public void redo()
UndoableCommand
redo
in interface UndoableCommand
public java.lang.String getName()
UndoableCommand
getName
in interface UndoableCommand
public void setName(java.lang.String name)
name
- Name to setpublic boolean shouldExecute()
UndoableCommand
shouldExecute
in interface UndoableCommand
Copyright © 2022 Apache Software Foundation. All Rights Reserved.