Copyright (C) 2001, Geert Vernaeve. All Rights Reserved.
package
gve.calc.formula;
import
gve.calc.formula.*;
public
class
ReplaceUndo
extends
UndoAction
{
private
Part
toReplace,byThat;
Formula
f;
public
ReplaceUndo
(
Formula
f,
Part
toReplace,
Part
byThat) { this.toReplace = toReplace; this.byThat = byThat; this.f = f; }
public
void
undo() {
if
(f.contains(toReplace)) f.replace(toReplace,byThat); } }