classes
Class CompoundUndoManager

java.lang.Object
  extended by javax.swing.undo.AbstractUndoableEdit
      extended by javax.swing.undo.CompoundEdit
          extended by javax.swing.undo.UndoManager
              extended by classes.CompoundUndoManager
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, javax.swing.event.DocumentListener, javax.swing.event.UndoableEditListener, javax.swing.undo.UndoableEdit

public class CompoundUndoManager
extends javax.swing.undo.UndoManager
implements javax.swing.event.UndoableEditListener, javax.swing.event.DocumentListener

Tegevuste unustamine ja taasloomine

See Also:
Serialized Form

Nested Class Summary
(package private)  class CompoundUndoManager.MyCompoundEdit
           
(package private)  class CompoundUndoManager.RedoAction
          Taasta viimati tehtud tegevus ja uuneda unusta/taasloo olekuid
(package private)  class CompoundUndoManager.UndoAction
          Unusta viimane tegevus ja uuenda unusta/taasloo olekuid
 
Field Summary
private  javax.swing.undo.CompoundEdit compoundEdit
           
private  int lastLength
           
private  int lastOffset
           
private  CompoundUndoManager.RedoAction redoAction
           
private  javax.swing.text.JTextComponent textComponent
           
private  CompoundUndoManager.UndoAction undoAction
           
private  javax.swing.undo.UndoManager undoManager
           
 
Fields inherited from class javax.swing.undo.CompoundEdit
edits
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
CompoundUndoManager(javax.swing.text.JTextComponent textComponent)
           
 
Method Summary
 void changedUpdate(javax.swing.event.DocumentEvent e)
           
 void insertUpdate(javax.swing.event.DocumentEvent e)
           
 void redo()
          Taastaloob viimati unustatud tegevuse
 void removeUpdate(javax.swing.event.DocumentEvent e)
           
private  javax.swing.undo.CompoundEdit startCompoundEdit(javax.swing.undo.UndoableEdit anEdit)
          Loob uue tagasivõetava tegevuse
 void undo()
          Unustab viimati tehtud tegevus
 void undoableEditHappened(javax.swing.event.UndoableEditEvent e)
          Tagasivõetava tegevuse toimumisel jätan selle meelde
 
Methods inherited from class javax.swing.undo.UndoManager
addEdit, canRedo, canUndo, canUndoOrRedo, discardAllEdits, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoOrRedo, undoTo
 
Methods inherited from class javax.swing.undo.CompoundEdit
die, getPresentationName, isInProgress, isSignificant, lastEdit
 
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

undoManager

private javax.swing.undo.UndoManager undoManager

compoundEdit

private javax.swing.undo.CompoundEdit compoundEdit

textComponent

private javax.swing.text.JTextComponent textComponent

undoAction

private CompoundUndoManager.UndoAction undoAction

redoAction

private CompoundUndoManager.RedoAction redoAction

lastOffset

private int lastOffset

lastLength

private int lastLength
Constructor Detail

CompoundUndoManager

public CompoundUndoManager(javax.swing.text.JTextComponent textComponent)
Method Detail

undo

public void undo()
Unustab viimati tehtud tegevus

Specified by:
undo in interface javax.swing.undo.UndoableEdit
Overrides:
undo in class javax.swing.undo.UndoManager

redo

public void redo()
Taastaloob viimati unustatud tegevuse

Specified by:
redo in interface javax.swing.undo.UndoableEdit
Overrides:
redo in class javax.swing.undo.UndoManager

undoableEditHappened

public void undoableEditHappened(javax.swing.event.UndoableEditEvent e)
Tagasivõetava tegevuse toimumisel jätan selle meelde

Specified by:
undoableEditHappened in interface javax.swing.event.UndoableEditListener
Overrides:
undoableEditHappened in class javax.swing.undo.UndoManager
Parameters:
e -

startCompoundEdit

private javax.swing.undo.CompoundEdit startCompoundEdit(javax.swing.undo.UndoableEdit anEdit)
Loob uue tagasivõetava tegevuse

Parameters:
anEdit -

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent e)
Specified by:
insertUpdate in interface javax.swing.event.DocumentListener
Parameters:
e -

removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent e)
Specified by:
removeUpdate in interface javax.swing.event.DocumentListener
Parameters:
e -

changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent e)
Specified by:
changedUpdate in interface javax.swing.event.DocumentListener
Parameters:
e -