swingwtx.swing.undo
Class AbstractUndoableEdit

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

public class AbstractUndoableEdit
extends java.lang.Object
implements UndoableEdit

AbstractUndoableEdit


Field Summary
protected static java.lang.String RedoName
           
protected static java.lang.String UndoName
           
 
Constructor Summary
AbstractUndoableEdit()
           
 
Method Summary
 boolean addEdit(UndoableEdit anEdit)
          Default implementations do nothing.
 boolean canRedo()
           
 boolean canUndo()
           
 void die()
          Kill off the edit...
 java.lang.String getPresentationName()
           
 java.lang.String getRedoPresentationName()
           
 java.lang.String getUndoPresentationName()
           
 boolean isSignificant()
           
 void redo()
           
 boolean replaceEdit(UndoableEdit anEdit)
           
 void undo()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UndoName

protected static final java.lang.String UndoName
See Also:
Constant Field Values

RedoName

protected static final java.lang.String RedoName
See Also:
Constant Field Values
Constructor Detail

AbstractUndoableEdit

public AbstractUndoableEdit()
Method Detail

undo

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

redo

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

die

public void die()
Kill off the edit... can no longer undo

Specified by:
die in interface UndoableEdit

canUndo

public boolean canUndo()
Specified by:
canUndo in interface UndoableEdit

canRedo

public boolean canRedo()
Specified by:
canRedo in interface UndoableEdit

getUndoPresentationName

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

getRedoPresentationName

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

addEdit

public boolean addEdit(UndoableEdit anEdit)
Default implementations do nothing. Override in implementing classes

Specified by:
addEdit in interface UndoableEdit

replaceEdit

public boolean replaceEdit(UndoableEdit anEdit)
Specified by:
replaceEdit in interface UndoableEdit

isSignificant

public boolean isSignificant()
Specified by:
isSignificant in interface UndoableEdit

getPresentationName

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