KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > workflow > designer > actions > EditRedo


1 package com.opensymphony.workflow.designer.actions;
2
3 import java.awt.event.ActionEvent JavaDoc;
4 import javax.swing.*;
5 import javax.swing.undo.CannotUndoException JavaDoc;
6
7 import com.opensymphony.workflow.designer.WorkflowDesigner;
8 import com.opensymphony.workflow.designer.WorkflowGraph;
9
10 /**
11  * @version $Revision: 1.1 $
12  * @author Quake Wang
13  * @since 2004-4-29
14  */

15
16 public class EditRedo extends AbstractAction
17 {
18   public EditRedo()
19   {
20     setEnabled(false);
21   }
22
23   public void actionPerformed(ActionEvent JavaDoc e)
24   {
25     try
26     {
27       WorkflowGraph graph = WorkflowDesigner.INSTANCE.getCurrentGraph();
28       graph.getUndoManager().redo(graph.getGraphLayoutCache());
29       graph.getUndoManager().updateHistoryButtons();
30     }
31     catch(CannotUndoException JavaDoc ex)
32     {
33       System.out.println("Unable to redo: " + ex);
34       ex.printStackTrace();
35     }
36   }
37 }
38
Popular Tags