01: package com.opensymphony.workflow.designer;
02:
03: import javax.swing.event.UndoableEditEvent;
04:
05: import org.jgraph.graph.GraphUndoManager;
06:
07: /**
08: * @version $Revision: 1.1 $
09: * @author Quake Wang
10: * @since 2004-4-29
11: */
12: public class UndoManager extends GraphUndoManager {
13: public void undoableEditHappened(UndoableEditEvent e) {
14: super .undoableEditHappened(e);
15: updateHistoryButtons();
16: }
17:
18: public void updateHistoryButtons() {
19: ActionManager.get("redo").setEnabled(this .canRedo());
20: ActionManager.get("undo").setEnabled(this.canUndo());
21: }
22: }
|