01: package org.enhydra.jawe.base.controller.actions;
02:
03: import java.awt.event.ActionEvent;
04:
05: import org.enhydra.jawe.ActionBase;
06: import org.enhydra.jawe.JaWEComponent;
07: import org.enhydra.jawe.JaWEManager;
08: import org.enhydra.jawe.base.controller.JaWEController;
09: import org.enhydra.jawe.base.editor.XPDLElementEditor;
10: import org.enhydra.shark.xpdl.elements.WorkflowProcess;
11:
12: /**
13: * Class that realizes <B>activities overview</B> action.
14: * @author Sasa Bojanic
15: */
16: public class ProcessActivitySetsOverview extends ActionBase {
17:
18: public ProcessActivitySetsOverview(JaWEComponent jawecomponent) {
19: super (jawecomponent);
20: }
21:
22: public void enableDisableAction() {
23: if (getWorkflowProcess() != null)
24: setEnabled(true);
25: else
26: setEnabled(false);
27: }
28:
29: public void actionPerformed(ActionEvent e) {
30: WorkflowProcess wp = getWorkflowProcess();
31: if (wp == null)
32: return;
33: JaWEController jc = (JaWEController) jawecomponent;
34: jc.getSelectionManager().setSelection(wp.getActivitySets(),
35: true);
36: XPDLElementEditor ed = JaWEManager.getInstance()
37: .getXPDLElementEditor();
38: ed.editXPDLElement(wp.getActivitySets());
39: }
40: }
|