jcreek.cke.browser
Class CreekUndoManager

java.lang.Object
  extended byjavax.swing.undo.AbstractUndoableEdit
      extended byjavax.swing.undo.CompoundEdit
          extended byjavax.swing.undo.UndoManager
              extended byjcreek.cke.browser.CreekUndoManager
All Implemented Interfaces:
java.util.EventListener, java.io.Serializable, javax.swing.undo.UndoableEdit, javax.swing.event.UndoableEditListener

public class CreekUndoManager
extends javax.swing.undo.UndoManager

Our specialized undo manager that adds functionality to remove undoable edits that are associated with a specific Creek document.

Version:
Author:
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.undo.CompoundEdit
edits
 
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
CreekUndoManager()
          Creates a new CreekUndoManager object.
 
Method Summary
 void reattachEdits(CreekDocument oldDoc, CreekDocument newDoc)
          Tell the edits associated with the old document that they should reattach themselves to the new document.
 void trimEdits(CreekDocument doc)
          Removes all edits associated with the given document.
 
Methods inherited from class javax.swing.undo.UndoManager
addEdit, canRedo, canUndo, canUndoOrRedo, discardAllEdits, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redo, redoTo, setLimit, toString, trimEdits, trimForLimit, undo, undoableEditHappened, 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
 

Constructor Detail

CreekUndoManager

public CreekUndoManager()
Creates a new CreekUndoManager object.

Method Detail

reattachEdits

public void reattachEdits(CreekDocument oldDoc,
                          CreekDocument newDoc)
Tell the edits associated with the old document that they should reattach themselves to the new document.

Parameters:
oldDoc - previous document
newDoc - new document

trimEdits

public void trimEdits(CreekDocument doc)
Removes all edits associated with the given document.

Parameters:
doc - document for which all edits should be removed


Created at IDI, NTNU by the Artificial Intelligence and Learning group