Interface ICommandManager
- All Known Implementing Classes:
CommandManager
public interface ICommandManager
Invoker of commands in the command pattern.
-
Method Summary
Modifier and Type Method Description void
addCommand(AbstractCommand command)
Adds the givenAbstractCommand
to the stack and executes it.boolean
canRedo()
Returns true ifredoCommand()
()} can be called.boolean
canUndo()
Returns true ifundoCommand()
can be called.void
redoCommand()
Redo's the last committed command.void
undoCommand()
Undo's the last committed command.
-
Method Details
-
addCommand
Adds the givenAbstractCommand
to the stack and executes it.- Parameters:
command
- Command to execute.
-
undoCommand
void undoCommand()Undo's the last committed command. -
redoCommand
void redoCommand()Redo's the last committed command. -
canUndo
boolean canUndo()Returns true ifundoCommand()
can be called.- Returns:
- Returns true if
undoCommand()
can be called.
-
canRedo
boolean canRedo()Returns true ifredoCommand()
()} can be called.- Returns:
- Returns true if
redoCommand()
()} can be called.
-