01: /**
02: * Miroslav Popov, Sep 20, 2005 miroslav.popov@gmail.com
03: */package org.enhydra.jawe.components.graph.actions;
04:
05: import org.enhydra.jawe.JaWEConstants;
06: import org.enhydra.jawe.JaWEManager;
07: import org.enhydra.jawe.components.graph.GraphController;
08: import org.enhydra.shark.xpdl.XMLUtil;
09:
10: /**
11: * @author Miroslav Popov
12: */
13: public class SetParticipantMode extends SetToolboxMode {
14:
15: public SetParticipantMode(GraphController jawecomponent,
16: String subType) {
17: super (jawecomponent, JaWEConstants.PARTICIPANT_TYPE, subType);
18: }
19:
20: public void enableDisableAction() {
21: GraphController gc = (GraphController) jawecomponent;
22:
23: if (gc.getSelectedGraph() != null
24: && XMLUtil.getPackage(gc.getSelectedGraph()
25: .getXPDLObject()) == JaWEManager.getInstance()
26: .getJaWEController().getMainPackage())
27: setEnabled(true);
28: else
29: setEnabled(false);
30: }
31:
32: }
|