Package com.im.df.impl.db.undo
Class UndoManagerImpl<T extends AbstractUndoableEdit>
- java.lang.Object
-
- com.im.df.impl.db.undo.UndoManagerImpl<T>
-
- Type Parameters:
T
- undoable edit type
- All Implemented Interfaces:
com.im.df.api.support.DFUndoManager<T>
public class UndoManagerImpl<T extends AbstractUndoableEdit> extends Object implements com.im.df.api.support.DFUndoManager<T>
TODO P2 - make this class synchronized!!!- Author:
- Petr Hamernik
-
-
Constructor Summary
Constructors Constructor Description UndoManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChangeListener(ChangeListener listener)
void
addUndoableEdit(T edit)
boolean
canRedo()
boolean
canUndo()
void
discardAllEdits()
String
getRedoPresentationName()
protected Stack<T>
getRedoStack()
String
getUndoPresentationName()
protected Stack<T>
getUndoStack()
void
redo(com.im.commons.progress.DFEnvironmentRO env)
void
removeChangeListener(ChangeListener listener)
void
startComplexUndo(String presentationName, com.im.commons.progress.DFLockable lockable, com.im.commons.progress.DFLock lock)
void
stopComplexUndo(com.im.commons.progress.DFLockable lockable)
void
undo(com.im.commons.progress.DFEnvironmentRO env)
-
-
-
Method Detail
-
addUndoableEdit
public void addUndoableEdit(T edit)
- Specified by:
addUndoableEdit
in interfacecom.im.df.api.support.DFUndoManager<T extends AbstractUndoableEdit>
-
startComplexUndo
public void startComplexUndo(String presentationName, com.im.commons.progress.DFLockable lockable, com.im.commons.progress.DFLock lock)
- Specified by:
startComplexUndo
in interfacecom.im.df.api.support.DFUndoManager<T extends AbstractUndoableEdit>
-
stopComplexUndo
public void stopComplexUndo(com.im.commons.progress.DFLockable lockable)
- Specified by:
stopComplexUndo
in interfacecom.im.df.api.support.DFUndoManager<T extends AbstractUndoableEdit>
-
canUndo
public boolean canUndo()
- Specified by:
canUndo
in interfacecom.im.df.api.support.DFUndoManager<T extends AbstractUndoableEdit>
-
canRedo
public boolean canRedo()
- Specified by:
canRedo
in interfacecom.im.df.api.support.DFUndoManager<T extends AbstractUndoableEdit>
-
undo
public void undo(com.im.commons.progress.DFEnvironmentRO env) throws com.im.df.api.support.DFUndoRedoException
- Specified by:
undo
in interfacecom.im.df.api.support.DFUndoManager<T extends AbstractUndoableEdit>
- Throws:
com.im.df.api.support.DFUndoRedoException
-
redo
public void redo(com.im.commons.progress.DFEnvironmentRO env) throws com.im.df.api.support.DFUndoRedoException
- Specified by:
redo
in interfacecom.im.df.api.support.DFUndoManager<T extends AbstractUndoableEdit>
- Throws:
com.im.df.api.support.DFUndoRedoException
-
discardAllEdits
public void discardAllEdits()
- Specified by:
discardAllEdits
in interfacecom.im.df.api.support.DFUndoManager<T extends AbstractUndoableEdit>
-
getRedoPresentationName
public String getRedoPresentationName()
- Specified by:
getRedoPresentationName
in interfacecom.im.df.api.support.DFUndoManager<T extends AbstractUndoableEdit>
-
getUndoPresentationName
public String getUndoPresentationName()
- Specified by:
getUndoPresentationName
in interfacecom.im.df.api.support.DFUndoManager<T extends AbstractUndoableEdit>
-
addChangeListener
public void addChangeListener(ChangeListener listener)
- Specified by:
addChangeListener
in interfacecom.im.df.api.support.DFUndoManager<T extends AbstractUndoableEdit>
-
removeChangeListener
public void removeChangeListener(ChangeListener listener)
- Specified by:
removeChangeListener
in interfacecom.im.df.api.support.DFUndoManager<T extends AbstractUndoableEdit>
-
-