Package org.omegat.gui.editor
Class TranslationUndoManager
- java.lang.Object
-
- org.omegat.gui.editor.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 Summary
Constructors Constructor Description TranslationUndoManager(EditorTextArea3 editor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
redo()
void
remember(int caretPos)
Remember change.void
reset()
void
undo()
void
undoableEditHappened(javax.swing.event.UndoableEditEvent e)
-
-
-
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 interfacejavax.swing.event.UndoableEditListener
-
-