|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.jaspira.undo.UndoMgr
public class UndoMgr
This Manager controls the states of the application. If any plugin is performing an action and changing the state of the application it has to notify the Manager. Transitions are used to undo one or a set of actions. If a state changing process is being started a new Transition has to be created. All undoable actions fired after this will be saved in the transition.
| Nested Class Summary | |
|---|---|
class |
UndoMgr.Transaction
A Transaction is a set of actions. |
| Field Summary | |
|---|---|
static int |
DEFAULT_HISTORY_SIZE
Default history size: 10 operations |
static java.lang.String |
TRANSITION_OPTION_NAME
Name for the max history size option |
static int |
UNLIMITED_HISTORY_SIZE
Unlimited history - all transitions will be saved |
| Constructor Summary | |
|---|---|
UndoMgr()
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
canRedo()
Returns true if a redoable transition exists. |
boolean |
canUndo()
Returns true if a undoable transition exists. |
void |
redo()
Redoes the next redo transition. |
void |
registerUndoable(Undoable undo)
Registers an undoable action. |
void |
reloadHistorySize()
Reloads the history size. |
UndoMgr.Transaction |
startTransaction(java.lang.String displayName)
Starts a new Transaction and returns it. |
void |
stopTransaction(UndoMgr.Transaction trans)
Stops the Transaction. |
void |
undo()
Undoes the last transition. |
void |
updateActions()
Updates the actions undo and redo. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int UNLIMITED_HISTORY_SIZE
public static final int DEFAULT_HISTORY_SIZE
public static final java.lang.String TRANSITION_OPTION_NAME
| Constructor Detail |
|---|
public UndoMgr()
| Method Detail |
|---|
public UndoMgr.Transaction startTransaction(java.lang.String displayName)
displayName - Displayable name of the transaction.public void stopTransaction(UndoMgr.Transaction trans)
trans - - the current transition for identificationpublic void registerUndoable(Undoable undo)
undo - - the action, to undopublic boolean canRedo()
public void redo()
public boolean canUndo()
public void undo()
public void updateActions()
public void reloadHistorySize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||