vocleditor.editor
Class DelegatingCommandStack
java.lang.Object
org.eclipse.gef.commands.CommandStack
vocleditor.editor.DelegatingCommandStack
- All Implemented Interfaces:
- org.eclipse.gef.commands.CommandStackListener
public class DelegatingCommandStack
- extends org.eclipse.gef.commands.CommandStack
- implements org.eclipse.gef.commands.CommandStackListener
This is a delegating command stack, which delegates everything
a defined the CommandStack except event listners.
Event listeners registered to a DelegatingCommandStack
will be informed whenever the underlying CommandStack
changes. They will not be registered to the underlying
CommandStack
but they will be informed about change events
of them.
Methods inherited from class org.eclipse.gef.commands.CommandStack |
addCommandStackListener, removeCommandStackListener |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DelegatingCommandStack
public DelegatingCommandStack()
getCurrentCommandStack
public org.eclipse.gef.commands.CommandStack getCurrentCommandStack()
- Returns the current
CommandStack
.
- Returns:
- the current
CommandStack
setCurrentCommandStack
public void setCurrentCommandStack(org.eclipse.gef.commands.CommandStack stack)
- Sets the current
CommandStack
.
- Parameters:
stack
- the CommandStack
to set
canRedo
public boolean canRedo()
- Overrides:
canRedo
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.canRedo()
canUndo
public boolean canUndo()
- Overrides:
canUndo
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.canUndo()
dispose
public void dispose()
- Overrides:
dispose
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.dispose()
execute
public void execute(org.eclipse.gef.commands.Command command)
- Overrides:
execute
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.execute(org.eclipse.gef.commands.Command)
flush
public void flush()
- Overrides:
flush
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.flush()
getCommands
public java.lang.Object[] getCommands()
- Overrides:
getCommands
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.getCommands()
getRedoCommand
public org.eclipse.gef.commands.Command getRedoCommand()
- Overrides:
getRedoCommand
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.getRedoCommand()
getUndoCommand
public org.eclipse.gef.commands.Command getUndoCommand()
- Overrides:
getUndoCommand
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.getUndoCommand()
getUndoLimit
public int getUndoLimit()
- Overrides:
getUndoLimit
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.getUndoLimit()
isDirty
public boolean isDirty()
- Overrides:
isDirty
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.isDirty()
markSaveLocation
public void markSaveLocation()
- Overrides:
markSaveLocation
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.markSaveLocation()
redo
public void redo()
- Overrides:
redo
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.redo()
setUndoLimit
public void setUndoLimit(int undoLimit)
- Overrides:
setUndoLimit
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.setUndoLimit(int)
undo
public void undo()
- Overrides:
undo
in class org.eclipse.gef.commands.CommandStack
- See Also:
CommandStack.undo()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
commandStackChanged
public void commandStackChanged(java.util.EventObject event)
- Specified by:
commandStackChanged
in interface org.eclipse.gef.commands.CommandStackListener
- See Also:
CommandStackListener.commandStackChanged(java.util.EventObject)