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

Last change on this file since 1054 was 1054, checked in by stoecker, 16 years ago

fixed a lot of the shortcut related translations

  • Property svn:eol-style set to native
File size: 815 bytes
Line 
1// License: GPL. Copyright 2007 by Immanuel Scholz and others
2package org.openstreetmap.josm.actions;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import java.awt.event.ActionEvent;
7import java.awt.event.KeyEvent;
8
9import org.openstreetmap.josm.Main;
10import org.openstreetmap.josm.tools.ShortCut;
11
12/**
13 * Exit the application. May ask for permission first (if something has changed).
14 *
15 * @author imi
16 */
17public class ExitAction extends JosmAction {
18 /**
19 * Construct the action with "Exit" as label
20 */
21 public ExitAction() {
22 super(tr("Exit"), "exit", tr("Exit the application."),
23 ShortCut.registerShortCut("system:menuexit", tr("Exit"), KeyEvent.VK_Q, ShortCut.GROUP_MENU), true);
24 }
25
26 public void actionPerformed(ActionEvent e) {
27 if (!Main.breakBecauseUnsavedChanges())
28 System.exit(0);
29 }
30}
Note: See TracBrowser for help on using the repository browser.