source: josm/trunk/src/org/openstreetmap/josm/actions/ExitAction.java@ 12464

Last change on this file since 12464 was 11093, checked in by simon04, 8 years ago

fix #13320 - Use restart text and icon in unsaved changes dialog

  • Property svn:eol-style set to native
File size: 932 bytes
RevLine 
[6380]1// License: GPL. For details, see LICENSE file.
[626]2package org.openstreetmap.josm.actions;
3
[3378]4import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
[626]5import static org.openstreetmap.josm.tools.I18n.tr;
6
7import java.awt.event.ActionEvent;
8import java.awt.event.KeyEvent;
9
10import org.openstreetmap.josm.Main;
[1084]11import org.openstreetmap.josm.tools.Shortcut;
[626]12
13/**
[655]14 * Exit the application. May ask for permission first (if something has changed).
[1023]15 *
[626]16 * @author imi
17 */
18public class ExitAction extends JosmAction {
[1169]19 /**
20 * Construct the action with "Exit" as label
21 */
22 public ExitAction() {
23 super(tr("Exit"), "exit", tr("Exit the application."),
[4982]24 Shortcut.registerShortcut("system:menuexit", tr("Exit"), KeyEvent.VK_Q, Shortcut.CTRL), true);
[2323]25 putValue("help", ht("/Action/Exit"));
[1169]26 }
[626]27
[6084]28 @Override
[1169]29 public void actionPerformed(ActionEvent e) {
[11093]30 Main.exitJosm(true, 0, null);
[1169]31 }
[626]32}
Note: See TracBrowser for help on using the repository browser.