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 simpleUndoableEdit
which is acts upon aRestorable
representing 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 void
die()
Restorable
getChangedObject()
String
getPresentationName()
void
redo()
protected void
rememberMemento()
void
undo()
-
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:
getPresentationName
in interfaceUndoableEdit
- Overrides:
getPresentationName
in classAbstractUndoableEdit
-
die
public void die()
- Specified by:
die
in interfaceUndoableEdit
- Overrides:
die
in classAbstractUndoableEdit
-
undo
public void undo() throws CannotUndoException
- Specified by:
undo
in interfaceUndoableEdit
- Overrides:
undo
in classAbstractUndoableEdit
- Throws:
CannotUndoException
-
redo
public void redo() throws CannotRedoException
- Specified by:
redo
in interfaceUndoableEdit
- Overrides:
redo
in classAbstractUndoableEdit
- Throws:
CannotRedoException
-
rememberMemento
protected void rememberMemento()
-
-