de.glossmaker.undo
Class UndoStack<E>

Package class diagram package UndoStack
java.lang.Object
  extended by de.glossmaker.undo.UndoStack<E>
Type Parameters:
E -
All Implemented Interfaces:
IUndoableStack<E>
Direct Known Subclasses:
UndoBibStack, UndoGlossStack

public class UndoStack<E>
extends Object
implements IUndoableStack<E>

Implementation of a common undo and redo container.

Author:
Markus Flingelli

Field Summary
protected  Stack<E> mRedo
           
protected  Stack<E> mUndo
           
 
Constructor Summary
protected UndoStack()
           
 
Method Summary
 E popRedo()
           
 E popUndo()
           
 void pushRedo(E item)
           
 void pushUndo(E item)
           
 int redoSize()
           
 void reset()
           
 void resetRedo()
           
 void resetUndo()
           
 int undoSize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mUndo

protected Stack<E> mUndo

mRedo

protected Stack<E> mRedo
Constructor Detail

UndoStack

protected UndoStack()
Method Detail

undoSize

public int undoSize()
Specified by:
undoSize in interface IUndoableStack<E>

redoSize

public int redoSize()
Specified by:
redoSize in interface IUndoableStack<E>

popUndo

public E popUndo()
Specified by:
popUndo in interface IUndoableStack<E>

popRedo

public E popRedo()
Specified by:
popRedo in interface IUndoableStack<E>

pushUndo

public void pushUndo(E item)
Specified by:
pushUndo in interface IUndoableStack<E>

pushRedo

public void pushRedo(E item)
Specified by:
pushRedo in interface IUndoableStack<E>

resetUndo

public void resetUndo()
Specified by:
resetUndo in interface IUndoableStack<E>

resetRedo

public void resetRedo()
Specified by:
resetRedo in interface IUndoableStack<E>

reset

public void reset()
Specified by:
reset in interface IUndoableStack<E>


Copyright © 2010 - 2011 Markus Flingelli. All Rights Reserved.