01: package com.opensymphony.workflow.designer.actions;
02:
03: import java.awt.event.ActionEvent;
04: import javax.swing.*;
05:
06: import com.opensymphony.workflow.designer.WorkflowDesigner;
07: import com.opensymphony.workflow.FactoryException;
08:
09: /**
10: * User: Hani Suleiman
11: * Date: Jan 13, 2004
12: * Time: 3:21:54 PM
13: */
14: public class DeleteWorkflow extends AbstractAction {
15: private WorkflowDesigner designer;
16: private String name;
17:
18: public DeleteWorkflow(WorkflowDesigner designer) {
19: this .designer = designer;
20: }
21:
22: public void actionPerformed(ActionEvent e) {
23: try {
24: designer.deleteWorkflow(name);
25: } catch (FactoryException e1) {
26: e1.printStackTrace();
27: }
28: }
29:
30: public void setWorkflow(String name) {
31: this.name = name;
32: }
33: }
|