public abstract class AbstractCompoundCommand extends AbstractUndoableCommand
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList |
atomCommands
The atom UndoableCommand command list.
|
name
Constructor and Description |
---|
AbstractCompoundCommand()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addCommand(UndoableCommand command)
Adds the given command to the atomCommand list.
|
void |
execute()
Executes this command.
|
int |
getCommandNumber()
Returns the command number that this compound command contains.
|
void |
redo()
Performs redo for this command.
|
boolean |
shouldExecute()
Tests if the command can be executed.
|
void |
undo()
Performs undo for this command.
|
getName, setName
protected java.util.ArrayList atomCommands
public void addCommand(UndoableCommand command)
command
- The given commandpublic void execute()
UndoableCommand
execute
in interface UndoableCommand
execute
in class AbstractUndoableCommand
public void undo()
UndoableCommand
undo
in interface UndoableCommand
undo
in class AbstractUndoableCommand
public void redo()
UndoableCommand
redo
in interface UndoableCommand
redo
in class AbstractUndoableCommand
public boolean shouldExecute()
UndoableCommand
shouldExecute
in interface UndoableCommand
shouldExecute
in class AbstractUndoableCommand
public int getCommandNumber()
Copyright © 2022 Apache Software Foundation. All Rights Reserved.