01: package com.opensymphony.workflow.designer.actions;
02:
03: import java.awt.event.ActionEvent;
04: import javax.swing.*;
05: import javax.swing.undo.CannotUndoException;
06:
07: import com.opensymphony.workflow.designer.WorkflowDesigner;
08: import com.opensymphony.workflow.designer.WorkflowGraph;
09:
10: /**
11: * @version $Revision: 1.1 $
12: * @author Quake Wang
13: * @since 2004-4-29
14: */
15:
16: public class EditRedo extends AbstractAction {
17: public EditRedo() {
18: setEnabled(false);
19: }
20:
21: public void actionPerformed(ActionEvent e) {
22: try {
23: WorkflowGraph graph = WorkflowDesigner.INSTANCE
24: .getCurrentGraph();
25: graph.getUndoManager().redo(graph.getGraphLayoutCache());
26: graph.getUndoManager().updateHistoryButtons();
27: } catch (CannotUndoException ex) {
28: System.out.println("Unable to redo: " + ex);
29: ex.printStackTrace();
30: }
31: }
32: }
|