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 ProcessActivitiesOverview extends ActionBase {
17:
18: public ProcessActivitiesOverview(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.getActivities(), true);
35: XPDLElementEditor ed = JaWEManager.getInstance()
36: .getXPDLElementEditor();
37: ed.editXPDLElement(wp.getActivities());
38: }
39: }
|