insensa.commands
Class CommandManager
java.lang.Object
insensa.commands.CommandManager
public class CommandManager
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
instance
private static CommandManager instance
commandStack
private java.util.Stack<ModelCommand> commandStack
undoStack
private java.util.Stack<ModelCommand> undoStack
exception
private java.lang.Exception exception
STATUS_SUCCESS
public static final int STATUS_SUCCESS
- See Also:
- Constant Field Values
STATUS_FAIL
public static final int STATUS_FAIL
- See Also:
- Constant Field Values
CommandManager
private CommandManager()
getInstance
public static CommandManager getInstance()
- Returns:
addCommand
public void addCommand(ModelCommand command)
- Adds the command to the beginning of the stack.
- Parameters:
command
-
clearCommands
public void clearCommands()
executeCommands
public int executeCommands()
- Returns:
getException
public java.lang.Exception getException()
- Returns:
getLastCommand
public ModelCommand getLastCommand()
- Returns:
pushCommand
public void pushCommand(ModelCommand command)
- Adds the command to the end of the stack.
- Parameters:
command
-
undoCommands
public int undoCommands()
- Returns: