Class TranslationUndoManager

  • All Implemented Interfaces:
    java.util.EventListener, javax.swing.event.UndoableEditListener

    public class TranslationUndoManager
    extends java.lang.Object
    implements javax.swing.event.UndoableEditListener
    Class for process undo/redo operations. We can't use standard UndoManager because OmegaT changes text attributes, which affects on standard UndoManager. Instead, TranslationUndoManager remember only text changes. But changed text should be stored only on UndoableEditEvent, because composed text chars(Japanese, Chinese) should be stored as one char.
    • Constructor Detail

      • TranslationUndoManager

        public TranslationUndoManager​(EditorTextArea3 editor)
    • Method Detail

      • reset

        public void reset()
      • undo

        public void undo()
      • redo

        public void redo()
      • remember

        public void remember​(int caretPos)
        Remember change.
      • undoableEditHappened

        public void undoableEditHappened​(javax.swing.event.UndoableEditEvent e)
        Specified by:
        undoableEditHappened in interface javax.swing.event.UndoableEditListener