Package com.bc.ceres.swing.undo
Class RestorableEdit
- java.lang.Object
-
- javax.swing.undo.AbstractUndoableEdit
-
- com.bc.ceres.swing.undo.RestorableEdit
-
- All Implemented Interfaces:
Serializable,UndoableEdit
public class RestorableEdit extends AbstractUndoableEdit
A very simpleUndoableEditwhich is acts upon aRestorablerepresenting the changed object and the memento of that object before it was changed.- Since:
- Ceres 0.10
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.undo.AbstractUndoableEdit
RedoName, UndoName
-
-
Constructor Summary
Constructors Constructor Description RestorableEdit(Restorable changedObject, Object memento)RestorableEdit(Restorable changedObject, Object memento, String presentationName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddie()RestorablegetChangedObject()StringgetPresentationName()voidredo()protected voidrememberMemento()voidundo()-
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
addEdit, canRedo, canUndo, getRedoPresentationName, getUndoPresentationName, isSignificant, replaceEdit, toString
-
-
-
-
Constructor Detail
-
RestorableEdit
public RestorableEdit(Restorable changedObject, Object memento)
-
RestorableEdit
public RestorableEdit(Restorable changedObject, Object memento, String presentationName)
-
-
Method Detail
-
getChangedObject
public Restorable getChangedObject()
-
getPresentationName
public String getPresentationName()
- Specified by:
getPresentationNamein interfaceUndoableEdit- Overrides:
getPresentationNamein classAbstractUndoableEdit
-
die
public void die()
- Specified by:
diein interfaceUndoableEdit- Overrides:
diein classAbstractUndoableEdit
-
undo
public void undo() throws CannotUndoException- Specified by:
undoin interfaceUndoableEdit- Overrides:
undoin classAbstractUndoableEdit- Throws:
CannotUndoException
-
redo
public void redo() throws CannotRedoException- Specified by:
redoin interfaceUndoableEdit- Overrides:
redoin classAbstractUndoableEdit- Throws:
CannotRedoException
-
rememberMemento
protected void rememberMemento()
-
-