public abstract class AbstractCompoundCommand extends AbstractUndoableCommand
| Modifier and Type | Field and Description |
|---|---|
protected 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, setNameprotected ArrayList atomCommands
public void addCommand(UndoableCommand command)
command - The given commandpublic void execute()
UndoableCommandexecute in interface UndoableCommandexecute in class AbstractUndoableCommandpublic void undo()
UndoableCommandundo in interface UndoableCommandundo in class AbstractUndoableCommandpublic void redo()
UndoableCommandredo in interface UndoableCommandredo in class AbstractUndoableCommandpublic boolean shouldExecute()
UndoableCommandshouldExecute in interface UndoableCommandshouldExecute in class AbstractUndoableCommandpublic int getCommandNumber()
Copyright © 2000–2020 Apache Software Foundation. All rights reserved.