public class DefaultUndoRedoCommandStack extends Object implements UndoRedoCommandStack
| Constructor and Description |
|---|
DefaultUndoRedoCommandStack() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Command command) |
void |
addObserver(Observer o) |
boolean |
canRedo()
If a redo can be performed on the stack.
|
boolean |
canUndo()
If an undo can be performed on the stack.
|
void |
clear() |
void |
deleteObserver(Observer o) |
void |
deleteObservers() |
void |
endComplex() |
Command |
getNextRedoCommand() |
Command |
getNextUndoCommand() |
List |
getRedoInfos()
Returns the list of UndoRedoInfo in the REDO stack
|
List |
getUndoInfos()
Returns the list of UndoRedoInfo in the UNDO stack
|
boolean |
inComplex() |
void |
redo()
Re-does the following redoable elements.
|
void |
redo(int commands)
Re-does a number of the following redoable element.
|
int |
size() |
void |
startComplex(String description) |
void |
undo()
Undoes the following undoable elements.
|
void |
undo(int commands)
Undoes a number of the following undoable elements.
|
public void add(Command command)
add in interface UndoRedoCommandStackpublic void undo()
throws UndoException
UndoRedoStackundo in interface UndoRedoStackUndoException - if there is an error performing de undo elementpublic void redo()
throws RedoException
UndoRedoStackredo in interface UndoRedoStackRedoException - if there is an error performing de redo elementpublic void redo(int commands)
throws RedoException
UndoRedoStackredo in interface UndoRedoStackcommands - the number of elements to redoRedoException - if there is an error performing de redo elementpublic void undo(int commands)
throws UndoException
UndoRedoStackundo in interface UndoRedoStackcommands - the number of elements to undoUndoException - if there is an error performing de undo elementpublic boolean canUndo()
UndoRedoStackcanUndo in interface UndoRedoStackpublic boolean canRedo()
UndoRedoStackcanRedo in interface UndoRedoStackpublic List getUndoInfos()
UndoRedoStackgetUndoInfos in interface UndoRedoStackpublic List getRedoInfos()
UndoRedoStackgetRedoInfos in interface UndoRedoStackpublic int size()
size in interface UndoRedoCommandStackpublic void clear()
clear in interface UndoRedoCommandStackpublic Command getNextUndoCommand()
getNextUndoCommand in interface UndoRedoCommandStackpublic Command getNextRedoCommand()
getNextRedoCommand in interface UndoRedoCommandStackpublic void addObserver(Observer o)
addObserver in interface Observablepublic void deleteObserver(Observer o)
deleteObserver in interface Observablepublic void deleteObservers()
deleteObservers in interface Observablepublic void endComplex()
endComplex in interface UndoRedoCommandStackpublic void startComplex(String description)
startComplex in interface UndoRedoCommandStackpublic boolean inComplex()
inComplex in interface UndoRedoCommandStack