public class MoveItemCommand<T> extends Command
| Constructor and Description |
|---|
MoveItemCommand(Workbook workbook,
UndoableCollection<T> collection,
int fromIndex,
int toIndex,
T item)
Initializes a new instance of the
MoveItemCommand class. |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
execute()
Carries out an action that changes the workbook in some way.
|
protected void |
redo()
Repeats an action that has been undone.
|
protected void |
undo()
Undoes an action, restoring the workbook to the state it was in before carrying out the action.
|
getHasEffect, getWorkbookpublic MoveItemCommand(Workbook workbook, UndoableCollection<T> collection, int fromIndex, int toIndex, T item)
MoveItemCommand class.workbook - The Workbook modified by this command.collection - The collection in which the item is moved.fromIndex - The zero-based of the item.toIndex - The zero-based index where the item should be moved.item - The item that should be moved.