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