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 interfaceUndoManager.UndoAction
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(UndoManager.UndoAction action)Adds an undo action into the currently selected contextvoidadd(UndoManager.UndoAction action, java.lang.Object context)Adds an undo action for the given context.voiddestroyContext(java.lang.Object context)voiddoRedo()voiddoUndo()static UndoManagergetInstance()javax.swing.ActiongetRedoAction()java.lang.ObjectgetSelectedContext()javax.swing.ActiongetUndoAction()voidreset()voidsetSelectedContext(java.lang.Object context)Called by the property change listener when the window changes, or by other contexts who manage their own selectedness
-
-
-
Method Detail
-
getInstance
public static UndoManager getInstance()
-
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 implementUndoDelegateContextfor 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.
-
-