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

Last change on this file since 1 was 1, checked in by imi, 21 years ago

wiki 19:37, 27. Sep 2005

File size: 633 bytes
Line 
1package org.openstreetmap.josm.actions;
2
3import java.awt.event.ActionEvent;
4import java.awt.event.KeyEvent;
5
6import javax.swing.AbstractAction;
7import javax.swing.ImageIcon;
8
9/**
10 * Exit the application. May ask for permition first (if something has changed).
11 *
12 * @author imi
13 */
14public class ExitAction extends AbstractAction {
15
16 /**
17 * Construct the action with "Exit" as label
18 */
19 public ExitAction() {
20 super("Exit", new ImageIcon("images/exit.png"));
21 putValue(MNEMONIC_KEY, KeyEvent.VK_X);
22 }
23
24 public void actionPerformed(ActionEvent e) {
25 // todo: check for modified windows before exiting
26 System.exit(0);
27 }
28
29}
Note: See TracBrowser for help on using the repository browser.