01: package jimm.datavision.gui.cmd;
02:
03: import jimm.datavision.Nameable;
04:
05: /**
06: * A Command knows how to perform an action, undo it, and redo it. It has
07: * a name that can be used for menu items.
08: * <p>
09: * The concrete implementor <code>CommandAdapter</code> treats the name
10: * as immutable; the <code>setName</code> method does nothing.
11: *
12: * @author Jim Menard, <a href="mailto:jimm@io.com">jimm@io.com</a>
13: */
14: public interface Command extends Nameable {
15:
16: abstract public void perform();
17:
18: abstract public void undo();
19:
20: abstract public void redo();
21:
22: }
|