de.tu_berlin.cs.tfs.muvitorkit.ui.utils.test
Class DelegatingCommandStack
java.lang.Object
org.eclipse.gef.commands.CommandStack
de.tu_berlin.cs.tfs.muvitorkit.ui.utils.test.DelegatingCommandStack
- All Implemented Interfaces:
- CommandStackListener
public class DelegatingCommandStack
- extends CommandStack
- implements CommandStackListener
This is a delegating command stack, which delegates everything to a
exchangeable current CommandStack except event listeners.
Event listeners registered to a DelegatingCommandStack
will be
informed whenever the currently set CommandStack
changes. They
will not be registered with the underlying CommandStack
but they
will be informed about change events of it.
- Rating

DelegatingCommandStack
public DelegatingCommandStack()
getCurrentCommandStack
public CommandStack getCurrentCommandStack()
- Returns the current
CommandStack
.
- Returns:
- the current
CommandStack
setCurrentCommandStack
public void setCurrentCommandStack(CommandStack stack)
- Sets the current
CommandStack
.
- Parameters:
stack
- the CommandStack
to set
canRedo
public boolean canRedo()
- Overrides:
canRedo
in class CommandStack
canUndo
public boolean canUndo()
- Overrides:
canUndo
in class CommandStack
dispose
public void dispose()
- Overrides:
dispose
in class CommandStack
execute
public void execute(Command command)
- Overrides:
execute
in class CommandStack
flush
public void flush()
- Overrides:
flush
in class CommandStack
getCommands
public Object[] getCommands()
- Overrides:
getCommands
in class CommandStack
getRedoCommand
public Command getRedoCommand()
- Overrides:
getRedoCommand
in class CommandStack
getUndoCommand
public Command getUndoCommand()
- Overrides:
getUndoCommand
in class CommandStack
getUndoLimit
public int getUndoLimit()
- Overrides:
getUndoLimit
in class CommandStack
isDirty
public boolean isDirty()
- Overrides:
isDirty
in class CommandStack
markSaveLocation
public void markSaveLocation()
- Overrides:
markSaveLocation
in class CommandStack
redo
public void redo()
- Overrides:
redo
in class CommandStack
setUndoLimit
public void setUndoLimit(int undoLimit)
- Overrides:
setUndoLimit
in class CommandStack
undo
public void undo()
- Overrides:
undo
in class CommandStack
toString
public String toString()
- Overrides:
toString
in class Object
commandStackChanged
public void commandStackChanged(EventObject event)
- Specified by:
commandStackChanged
in interface CommandStackListener