Class UndoManager
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.UndoManager
-
public class UndoManager extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
UndoManager.UndoAction
static class
UndoManager.UndoStack
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(UndoManager.UndoAction action)
Adds an undo action into the currently selected contextvoid
add(UndoManager.UndoAction action, java.lang.Object context)
Adds an undo action for the given context.void
destroyContext(java.lang.Object context)
void
disableActions()
void
doRedo()
void
doUndo()
static UndoManager
getInstance()
javax.swing.Action
getRedoAction()
java.lang.Object
getSelectedContext()
javax.swing.Action
getUndoAction()
void
reset()
void
setSelectedContext(java.lang.Object context)
Called by the property change listener when the window changes, or by other contexts who manage their own selectednessvoid
updateActions()
Called whenever things are added/removed to the current stack or the current stack changes, so the actions need to be updated b/c the top of the stack has effectively changed
-
-
-
Method Detail
-
getInstance
public static UndoManager getInstance()
-
updateActions
public void updateActions()
Called whenever things are added/removed to the current stack or the current stack changes, so the actions need to be updated b/c the top of the stack has effectively changed
-
disableActions
public void disableActions()
-
setSelectedContext
public void setSelectedContext(java.lang.Object context)
Called by the property change listener when the window changes, or by other contexts who manage their own selectedness- Parameters:
context
- An object that uniquely represents a portion of the UI that will be adding UndoAction objects. Optionally may implementUndoDelegateContext
for UI areas that want to manage their own Undo/Redo stack.
-
destroyContext
public void destroyContext(java.lang.Object context)
-
getSelectedContext
public java.lang.Object getSelectedContext()
-
reset
public void reset()
-
getUndoAction
public javax.swing.Action getUndoAction()
-
getRedoAction
public javax.swing.Action getRedoAction()
-
doUndo
public void doUndo()
-
doRedo
public void doRedo()
-
add
public void add(UndoManager.UndoAction action)
Adds an undo action into the currently selected context
-
add
public void add(UndoManager.UndoAction action, java.lang.Object context)
Adds an undo action for the given context.
-
-