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:
11: /**
12: * Class that realizes <B>package properties</B> action.
13: */
14: public class ProcessWorkflowRelevantData extends ActionBase {
15:
16: public ProcessWorkflowRelevantData(JaWEComponent jawecomponent) {
17: super (jawecomponent);
18: }
19:
20: public void enableDisableAction() {
21: if (getWorkflowProcess() != null)
22: setEnabled(true);
23: else
24: setEnabled(false);
25: }
26:
27: public void actionPerformed(ActionEvent e) {
28: if (getWorkflowProcess() == null)
29: return;
30: JaWEController jc = (JaWEController) jawecomponent;
31: jc.getSelectionManager().setSelection(
32: getWorkflowProcess().getDataFields(), false);
33: XPDLElementEditor ed = JaWEManager.getInstance()
34: .getXPDLElementEditor();
35: ed.editXPDLElement(getWorkflowProcess().getDataFields());
36: }
37: }
|