public abstract class Command
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
protected |
Command(Workbook workbook)
Initializes a new instance of the
Command class. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
execute()
Carries out an action that changes the workbook in some way.
|
protected boolean |
getHasEffect()
Gets a value indicating whether the command does anything.
|
protected Workbook |
getWorkbook()
|
protected abstract void |
redo()
Repeats an action that has been undone.
|
protected abstract void |
undo()
Undoes an action, restoring the workbook to the state it was in before carrying out the action.
|
protected abstract boolean execute()
protected abstract void undo()
protected abstract void redo()
protected Workbook getWorkbook()
protected boolean getHasEffect()
Commands that have no effect are not stored in the undo history.