Class ScriptEditUndoActions


  • public class ScriptEditUndoActions
    extends java.lang.Object
    Implements undo and redo actions.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addDocument​(@NotNull javax.swing.text.Document document)
      Adds a document.
      void removeDocument​(@NotNull javax.swing.text.Document document)
      Removes a document.
      void resetUndo​(@NotNull javax.swing.text.Document document)
      Forget all undo-able operations for a document.
      void scriptEditRedo()
      Action method for "redo".
      void scriptEditUndo()
      Action method for "undo".
      void setCurrentDocument​(@Nullable javax.swing.text.Document currentDocument)
      Sets the current document.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScriptEditUndoActions

        public ScriptEditUndoActions()
    • Method Detail

      • addDocument

        public void addDocument​(@NotNull
                                @NotNull javax.swing.text.Document document)
        Adds a document.
        Parameters:
        document - the document to add
      • removeDocument

        public void removeDocument​(@NotNull
                                   @NotNull javax.swing.text.Document document)
        Removes a document.
        Parameters:
        document - the document to remove
      • resetUndo

        public void resetUndo​(@NotNull
                              @NotNull javax.swing.text.Document document)
        Forget all undo-able operations for a document.
        Parameters:
        document - the document
      • scriptEditUndo

        @ActionMethod
        public void scriptEditUndo()
        Action method for "undo".
      • scriptEditRedo

        @ActionMethod
        public void scriptEditRedo()
        Action method for "redo".
      • setCurrentDocument

        public void setCurrentDocument​(@Nullable
                                       @Nullable javax.swing.text.Document currentDocument)
        Sets the current document. Undo, redo and menu states use this document.
        Parameters:
        currentDocument - the current document to set