|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcib.util.cmd.CmdMgr
public class CmdMgr
The Command Manager does, undoes und redoes Commands. The command history is recorded.
| Field Summary | |
|---|---|
static int |
CAN_REDO_MORE
|
static int |
CAN_UNDO_MORE
|
protected java.util.LinkedList<Cmd> |
m_cmdHistory
|
protected int |
m_cmdHistoryIndex
|
protected int |
m_maximumSize
|
| Constructor Summary | |
|---|---|
CmdMgr()
|
|
| Method Summary | |
|---|---|
boolean |
canRedoMore()
Check if at least one more redo is possible |
boolean |
canUndoMore()
Check if at least one more undo is possible |
void |
clear()
Clears the command history |
int |
doCmd(Cmd cmd)
Does a command that has been previously created. |
int |
doCmd(Cmd cmd,
java.lang.Object context)
Does a command that has been previously created. |
void |
dumpCmdHistory()
Dumps the command history to the standard output stream |
protected int |
getFlags()
|
int |
getMaximumSize()
Gets the maximum number of stored commands |
boolean |
isEmpty()
Checks whether any commands are stored |
java.util.Iterator<Cmd> |
redoableCommandsIterator()
Returns an interator over the redoable commands |
int |
redoCmd()
Redoes the next command. |
int |
redoCmd(java.lang.Object context)
Redoes the next command. |
void |
setMaximumSize(int n)
Sets the maximum number of stored commands |
java.util.Iterator<Cmd> |
undoableCommandsIterator()
Returns an interator over the undoable commands |
int |
undoCmd()
Undoes the next command. |
int |
undoCmd(java.lang.Object context)
Undoes the next command. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CAN_UNDO_MORE
public static final int CAN_REDO_MORE
protected java.util.LinkedList<Cmd> m_cmdHistory
protected int m_cmdHistoryIndex
protected int m_maximumSize
| Constructor Detail |
|---|
public CmdMgr()
| Method Detail |
|---|
public void setMaximumSize(int n)
public int getMaximumSize()
public void clear()
public boolean isEmpty()
public int doCmd(Cmd cmd,
java.lang.Object context)
cmd - the command objectcontext - an application specific context object
public int doCmd(Cmd cmd)
cmd - the command object
public int undoCmd(java.lang.Object context)
context - an application specific context object
public int undoCmd()
public int redoCmd(java.lang.Object context)
context - an application specific context object
public int redoCmd()
public boolean canUndoMore()
public boolean canRedoMore()
public java.util.Iterator<Cmd> undoableCommandsIterator()
public java.util.Iterator<Cmd> redoableCommandsIterator()
public void dumpCmdHistory()
protected int getFlags()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||