KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > workflow > designer > UndoManager


1 package com.opensymphony.workflow.designer;
2
3 import javax.swing.event.UndoableEditEvent JavaDoc;
4
5 import org.jgraph.graph.GraphUndoManager;
6
7 /**
8  * @version $Revision: 1.1 $
9  * @author Quake Wang
10  * @since 2004-4-29
11  */

12 public class UndoManager extends GraphUndoManager
13 {
14   public void undoableEditHappened(UndoableEditEvent JavaDoc e)
15   {
16     super.undoableEditHappened(e);
17     updateHistoryButtons();
18   }
19
20   public void updateHistoryButtons()
21   {
22     ActionManager.get("redo").setEnabled(this.canRedo());
23     ActionManager.get("undo").setEnabled(this.canUndo());
24   }
25 }
26
Popular Tags