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.base.controller.JaWEController;
08:
09: /**
10: * Class that implements <B>package check validity</B> action.
11: */
12: public class PackageCheckValidity extends ActionBase {
13:
14: public PackageCheckValidity(JaWEComponent jawecomponent) {
15: super (jawecomponent);
16: }
17:
18: public void enableDisableAction() {
19: JaWEController jc = (JaWEController) jawecomponent;
20: if (jc.getMainPackage() != null)
21: setEnabled(true);
22: else
23: setEnabled(false);
24: }
25:
26: public void actionPerformed(ActionEvent e) {
27: JaWEController jc = (JaWEController) jawecomponent;
28: jc.checkValidity(jc.getMainPackage(), true, true, false);
29: }
30: }
|