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:
10: /**
11: * Class that realizes <B>exit</B> action.
12: * Really lame implementation of an exit command.
13: * @author Sasa Bojanic
14: */
15: public class Exit extends ActionBase {
16:
17: public Exit(JaWEComponent jawecomponent) {
18: super (jawecomponent);
19: }
20:
21: public void enableDisableAction() {
22: }
23:
24: public void actionPerformed(ActionEvent e) {
25: JaWEController jc = JaWEManager.getInstance()
26: .getJaWEController();
27: if (jc.tryToClosePackage(jc.getMainPackageId(), false)) {
28: System.exit(0);
29: }
30: }
31: }
|