|
com.im.df.api 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DFUndoManager
The undo manager for a single undo/redo queue.
If you want to create a single undo/redo edit for multiple edit operations
you can use "complex operations", like:
DFEntityDataProvider edp=...;
DFUndoManager undoManager = edp.getSchemaDataProvider().getUndoManager();
try {
undoManager.startComplexUndo("Display name of undo", edp.getLockable(), env.getLock());
Map results = edp.update(..., true, env);
DFUpdateResult res = results.get(updateDesc);
if (res.getException() != null) {
throw res.getException();
}
} finally {
undoManager.stopComplexUndo(edp.getLockable());
}
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener listener)
|
boolean |
canRedo()
True if it is still possible to redo this operation. |
boolean |
canUndo()
True if it is still possible to undo this operation. |
void |
discardAllEdits()
Empty the undo manager, sending each edit a die message in the process. |
int |
getMaxRowCount()
|
int |
getMaxUndoQueueLength()
|
String |
getRedoPresentationName()
Provides a localized, human readable description of the redoable form of this edit, e.g. |
String |
getUndoPresentationName()
Provides a localized, human readable description of the undoable form of this edit, e.g. |
boolean |
isEnabled()
Is this undo/redo manager currently disabled or enabled? |
void |
redo(DFEnvironmentRO env)
Re-apply the edit, assuming that it has been undone. |
void |
removeChangeListener(ChangeListener listener)
|
void |
setEnabled(boolean enabled)
Enable or disable whole undo manager. |
void |
startComplexUndo(String presentationName,
DFLockable lockable,
DFLock lock)
Start the complex operation like copy/paste multiple cells or delete more rows together. |
void |
stopComplexUndo(DFLockable lockable)
Notifies UndoManager that the complex undoable edit identified by this lockable is finished and can be closed. |
void |
undo(DFEnvironmentRO env)
Undo the edit that was made. |
| Method Detail |
|---|
void undo(DFEnvironmentRO env)
throws DFUndoRedoException
DFUndoRedoExceptionboolean canUndo()
void redo(DFEnvironmentRO env)
throws DFUndoRedoException
DFUndoRedoExceptionboolean canRedo()
String getUndoPresentationName()
getDescription.
void discardAllEdits()
void setEnabled(boolean enabled)
boolean isEnabled()
void startComplexUndo(String presentationName,
DFLockable lockable,
DFLock lock)
stopComplexUndo(DFLockable) call.
presentationName - The presentation name of the coplex undo operationlockable - The complex undoable operation is identified by lockable. It means all edits which happens
under this lockable until it's closed will become part of this complex undo edit.lock - The lock for lockable
IllegalStateException - if lock is not valid and is not lock of lockable param.void stopComplexUndo(DFLockable lockable)
lockable - The lockable which identifies the complex undo operationString getRedoPresentationName()
getPresentationName.
void addChangeListener(ChangeListener listener)
void removeChangeListener(ChangeListener listener)
int getMaxRowCount()
int getMaxUndoQueueLength()
|
com.im.df.api 5.9 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||