01: /*
02: * $Id: ExecutableChange.java,v 1.1 2006/10/27 15:33:08 david Exp $
03: * Copyright (c) 2001-2005, Gaudenz Alder
04: *
05: * All rights reserved.
06: *
07: * See LICENSE file for license details. If you are unable to locate
08: * this file please contact info (at) jgraph (dot) com.
09: */
10: package org.jgraph.graph;
11:
12: import javax.swing.undo.AbstractUndoableEdit;
13:
14: /**
15: * The interface executable changes must adhere to
16: */
17: public abstract class ExecutableChange extends AbstractUndoableEdit {
18:
19: /*
20: * (non-Javadoc)
21: *
22: * @see javax.swing.undo.UndoableEdit#undo()
23: */
24: public void undo() {
25: execute();
26: }
27:
28: /*
29: * (non-Javadoc)
30: *
31: * @see javax.swing.undo.UndoableEdit#redo()
32: */
33: public void redo() {
34: execute();
35: }
36:
37: /**
38: *
39: */
40: public abstract void execute();
41:
42: }
|