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 PackageProperties extends ActionBase {
15:
16: public PackageProperties(JaWEComponent jawecomponent) {
17: super (jawecomponent);
18: }
19:
20: public void enableDisableAction() {
21: if (getPackage() != null)
22: setEnabled(true);
23: else
24: setEnabled(false);
25: }
26:
27: public void actionPerformed(ActionEvent e) {
28: if (getPackage() == null)
29: return;
30: JaWEController jc = (JaWEController) jawecomponent;
31: jc.getSelectionManager().setSelection(getPackage(), false);
32: XPDLElementEditor ed = JaWEManager.getInstance()
33: .getXPDLElementEditor();
34: ed.editXPDLElement(getPackage());
35: }
36: }
|