Class UndoRedoSupport


  • class UndoRedoSupport
    extends java.lang.Object
    Provides Undo/Redo support and actions for JTextComponent
    • Field Detail

      • undoManager

        private final javax.swing.undo.UndoManager undoManager
      • messages

        private final java.util.ResourceBundle messages
      • compoundMode

        private boolean compoundMode
      • ce

        private javax.swing.undo.CompoundEdit ce
    • Constructor Detail

      • UndoRedoSupport

        UndoRedoSupport​(javax.swing.text.JTextComponent textComponent,
                        java.util.ResourceBundle messages)
    • Method Detail

      • startCompoundEdit

        void startCompoundEdit()
        Notify manager to start merging undoable edits. Calling startCompoundEdit when already in compound mode is an error and will throw a RuntimeException.
        Since:
        2.7
      • endCompoundEdit

        void endCompoundEdit()
        Notify manager to stop merging undoable edits. Calling endCompoundEdit when not in compound mode is an error and will throw a RuntimeException.
        Since:
        2.7