org.gvsig.tools.undo
Interface UndoRedoStack

All Superinterfaces:
Observable, WeakReferencingObservable
All Known Subinterfaces:
UndoRedoCommandStack
All Known Implementing Classes:
DefaultUndoRedoCommandStack

public interface UndoRedoStack
extends WeakReferencingObservable

An Stack of Undo/Redo operations.

Author:
Cèsar Ordiñana

Method Summary
 boolean canRedo()
          If a redo can be performed on the stack.
 boolean canUndo()
          If an undo can be performed on the stack.
 List getRedoInfos()
          Returns the list of UndoRedoInfo in the REDO stack
 List getUndoInfos()
          Returns the list of UndoRedoInfo in the UNDO stack
 void redo()
          Re-does the following redoable elements.
 void redo(int num)
          Re-does a number of the following redoable element.
 void undo()
          Undoes the following undoable elements.
 void undo(int num)
          Undoes a number of the following undoable elements.
 
Methods inherited from interface org.gvsig.tools.observer.Observable
addObserver, deleteObserver, deleteObservers
 

Method Detail

undo

void undo()
          throws UndoException
Undoes the following undoable elements.

Throws:
UndoException - if there is an error performing de undo element

undo

void undo(int num)
          throws UndoException
Undoes a number of the following undoable elements.

Parameters:
num - the number of elements to undo
Throws:
UndoException - if there is an error performing de undo element

redo

void redo()
          throws RedoException
Re-does the following redoable elements.

Throws:
RedoException - if there is an error performing de redo element

redo

void redo(int num)
          throws RedoException
Re-does a number of the following redoable element.

Parameters:
num - the number of elements to redo
Throws:
RedoException - if there is an error performing de redo element

getUndoInfos

List getUndoInfos()
Returns the list of UndoRedoInfo in the UNDO stack

Returns:
list of UndoRedoInfo in the UNDO stack

getRedoInfos

List getRedoInfos()
Returns the list of UndoRedoInfo in the REDO stack

Returns:
list of UndoRedoInfo in the REDO stack

canUndo

boolean canUndo()
If an undo can be performed on the stack.

Returns:
an undo can be performed

canRedo

boolean canRedo()
If a redo can be performed on the stack.

Returns:
a redo can be performed


Copyright © 2004-2011 gvSIG. All Rights Reserved.