Class UndoManager

java.lang.Object
com.inductiveautomation.ignition.designer.UndoManager

public class UndoManager extends Object
  • Method Details

    • 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(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 implement UndoDelegateContext for UI areas that want to manage their own Undo/Redo stack.
    • destroyContext

      public void destroyContext(Object context)
    • getSelectedContext

      public Object getSelectedContext()
    • reset

      public void reset()
    • getUndoAction

      public Action getUndoAction()
    • getRedoAction

      public 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, Object context)
      Adds an undo action for the given context.