swingwtx.swing.undo
Class CompoundEdit

java.lang.Object
  extended byswingwtx.swing.undo.AbstractUndoableEdit
      extended byswingwtx.swing.undo.CompoundEdit
All Implemented Interfaces:
UndoableEdit
Direct Known Subclasses:
AbstractDocument.DefaultDocumentEvent, UndoManager

public class CompoundEdit
extends AbstractUndoableEdit

Implementation of UndoableEdit that acts as a container for multiple edits.


Field Summary
protected  java.util.Vector edits
           
 
Fields inherited from class swingwtx.swing.undo.AbstractUndoableEdit
RedoName, UndoName
 
Constructor Summary
CompoundEdit()
           
 
Method Summary
 boolean addEdit(UndoableEdit undoableEdit)
          Default implementations do nothing.
 boolean canRedo()
           
 boolean canUndo()
           
 void die()
          Kill off the edit...
 void end()
           
 java.lang.String getPresentationName()
           
 java.lang.String getRedoPresentationName()
           
 java.lang.String getUndoPresentationName()
           
 boolean isInProgress()
           
 boolean isSignificant()
           
protected  UndoableEdit lastEdit()
           
 void redo()
           
 void undo()
           
 
Methods inherited from class swingwtx.swing.undo.AbstractUndoableEdit
replaceEdit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

edits

protected java.util.Vector edits
Constructor Detail

CompoundEdit

public CompoundEdit()
Method Detail

canUndo

public boolean canUndo()
Specified by:
canUndo in interface UndoableEdit
Overrides:
canUndo in class AbstractUndoableEdit

undo

public void undo()
          throws CannotUndoException
Specified by:
undo in interface UndoableEdit
Overrides:
undo in class AbstractUndoableEdit
Throws:
CannotUndoException

canRedo

public boolean canRedo()
Specified by:
canRedo in interface UndoableEdit
Overrides:
canRedo in class AbstractUndoableEdit

redo

public void redo()
          throws CannotRedoException
Specified by:
redo in interface UndoableEdit
Overrides:
redo in class AbstractUndoableEdit
Throws:
CannotRedoException

lastEdit

protected UndoableEdit lastEdit()

isInProgress

public boolean isInProgress()

end

public void end()

die

public void die()
Description copied from class: AbstractUndoableEdit
Kill off the edit... can no longer undo

Specified by:
die in interface UndoableEdit
Overrides:
die in class AbstractUndoableEdit

addEdit

public boolean addEdit(UndoableEdit undoableEdit)
Description copied from class: AbstractUndoableEdit
Default implementations do nothing. Override in implementing classes

Specified by:
addEdit in interface UndoableEdit
Overrides:
addEdit in class AbstractUndoableEdit

isSignificant

public boolean isSignificant()
Specified by:
isSignificant in interface UndoableEdit
Overrides:
isSignificant in class AbstractUndoableEdit

getPresentationName

public java.lang.String getPresentationName()
Specified by:
getPresentationName in interface UndoableEdit
Overrides:
getPresentationName in class AbstractUndoableEdit

getUndoPresentationName

public java.lang.String getUndoPresentationName()
Specified by:
getUndoPresentationName in interface UndoableEdit
Overrides:
getUndoPresentationName in class AbstractUndoableEdit

getRedoPresentationName

public java.lang.String getRedoPresentationName()
Specified by:
getRedoPresentationName in interface UndoableEdit
Overrides:
getRedoPresentationName in class AbstractUndoableEdit