Class TranslationUndoManager

java.lang.Object
org.omegat.gui.editor.TranslationUndoManager
All Implemented Interfaces:
EventListener, UndoableEditListener

public class TranslationUndoManager extends Object implements 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 Details

    • TranslationUndoManager

      public TranslationUndoManager(EditorTextArea3 editor)
  • Method Details

    • reset

      public void reset()
    • undo

      public void undo()
    • redo

      public void redo()
    • remember

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

      public void undoableEditHappened(UndoableEditEvent e)
      Specified by:
      undoableEditHappened in interface UndoableEditListener