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: * Shows all Transitions for the process.
14: */
15: public class ProcessTransitionsOverview extends ActionBase {
16:
17: public ProcessTransitionsOverview(JaWEComponent jawecomponent) {
18: super (jawecomponent);
19: }
20:
21: public void enableDisableAction() {
22: if (getWorkflowProcess() != null)
23: setEnabled(true);
24: else
25: setEnabled(false);
26: }
27:
28: public void actionPerformed(ActionEvent e) {
29: WorkflowProcess wp = getWorkflowProcess();
30: if (wp == null)
31: return;
32: JaWEController jc = (JaWEController) jawecomponent;
33: jc.getSelectionManager().setSelection(
34: getWorkflowProcess().getTransitions(), true);
35: XPDLElementEditor ed = JaWEManager.getInstance()
36: .getXPDLElementEditor();
37: ed.editXPDLElement(wp.getTransitions());
38: }
39: }
|