|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.fopps.share.UndoManager
UndoManager saves compensating transactions. This may be a single property change or a bunch of
changes. If you want to undo more than one operation in one shot, these changes must be sorrounded
by beginCompoundUndo and endCompoundUndo. Nested compound undos are allowed.
| Nested Class Summary | |
static interface |
UndoManager.Undoable
Common interface for undo entries |
| Field Summary | |
static boolean |
VERBOSE_UNDO
|
| Constructor Summary | |
UndoManager()
|
|
| Method Summary | |
static void |
beginCompoundUndo()
Begins a compund undo. |
static boolean |
canUndo()
Returns true, if undo items are available |
static void |
clear()
Drops the complete undo and redo stack (e. g. after loading a new file) |
static void |
endCompoundUndo()
Finish a previous opened compound undo |
static java.util.Stack |
getUndoStack()
Returns a copy the current contents of the undo stack |
static boolean |
isStarted()
|
static void |
push(java.lang.Object pInstance,
java.lang.String pMethod)
Stores a compensating tx |
static void |
push(java.lang.Object pInstance,
java.lang.String pMethod,
boolean pArgument)
Stores a compensating tx |
static void |
push(java.lang.Object pInstance,
java.lang.String pMethod,
byte pArgument)
Stores a compensating tx |
static void |
push(java.lang.Object pInstance,
java.lang.String pMethod,
char pArgument)
Stores a compensating tx |
static void |
push(java.lang.Object pInstance,
java.lang.String pMethod,
int pArgument)
Stores a compensating tx |
static void |
push(java.lang.Object pInstance,
java.lang.String pMethod,
long pArgument)
Stores a compensating tx |
static void |
push(java.lang.Object pInstance,
java.lang.String pMethod,
java.lang.Object pArgument)
Stores a compensating tx |
static void |
push(java.lang.Object pInstance,
java.lang.String pMethod,
short pArgument)
Stores a compensating tx |
static void |
rollback()
Drops last element from push action |
static void |
start()
Activates undo |
static void |
suspend()
Suspends undo |
static void |
undo()
Executes the compensting transaction, if any. |
static int |
undoCount()
Returns the current number of undo objects |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final boolean VERBOSE_UNDO
| Constructor Detail |
public UndoManager()
| Method Detail |
public static void start()
public static void suspend()
public static boolean isStarted()
public static void clear()
public static void rollback()
throws UndoException
UndoException
public static void push(java.lang.Object pInstance,
java.lang.String pMethod,
java.lang.Object pArgument)
throws UndoException
UndoException
public static void push(java.lang.Object pInstance,
java.lang.String pMethod,
boolean pArgument)
throws UndoException
UndoException
public static void push(java.lang.Object pInstance,
java.lang.String pMethod,
int pArgument)
throws UndoException
UndoException
public static void push(java.lang.Object pInstance,
java.lang.String pMethod,
long pArgument)
throws UndoException
UndoException
public static void push(java.lang.Object pInstance,
java.lang.String pMethod,
short pArgument)
throws UndoException
UndoException
public static void push(java.lang.Object pInstance,
java.lang.String pMethod,
byte pArgument)
throws UndoException
UndoException
public static void push(java.lang.Object pInstance,
java.lang.String pMethod,
char pArgument)
throws UndoException
UndoException
public static void push(java.lang.Object pInstance,
java.lang.String pMethod)
throws UndoException
UndoException
public static void undo()
throws UndoException
UndoException, - if no undo available or tx cannot be executed
UndoExceptionpublic static java.util.Stack getUndoStack()
public static void beginCompoundUndo()
public static void endCompoundUndo()
UndoException, - if not compound undo was begunpublic static int undoCount()
public static boolean canUndo()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||