1 56 package org.objectstyle.cayenne.modeler.action; 57 58 import java.awt.event.ActionEvent ; 59 60 import org.objectstyle.cayenne.modeler.Application; 61 import org.objectstyle.cayenne.modeler.ModelerPreferences; 62 import org.objectstyle.cayenne.project.ProjectPath; 63 64 67 public class ExitAction extends ProjectAction { 68 69 public static String getActionName() { 70 return "Exit"; 71 } 72 73 76 public ExitAction(Application application) { 77 super(getActionName(), application); 78 } 79 80 public void performAction(ActionEvent e) { 81 exit(); 82 } 83 84 public void exit() { 85 if (!checkSaveOnClose()) { 86 return; 87 } 88 89 ModelerPreferences.getPreferences().storePreferences(); 91 92 System.exit(0); 94 } 95 96 99 public boolean enableForPath(ProjectPath path) { 100 return true; 101 } 102 } 103 | Popular Tags |