source: josm/src/org/openstreetmap/josm/actions/SaveGpxAction.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: 1.0 KB
Line 
1package org.openstreetmap.josm.actions;
2
3import java.awt.event.ActionEvent;
4import java.awt.event.KeyEvent;
5import java.io.File;
6
7import javax.swing.AbstractAction;
8import javax.swing.ImageIcon;
9import javax.swing.JFileChooser;
10
11import org.openstreetmap.josm.gui.Main;
12
13/**
14 * Export the current selected window's DataSet as gpx values. Remember, that some
15 * information could be lost. If so, an information message will ask the user to proceed.
16 * (Means, if all information can be saved, no warning message appears).
17 *
18 * @author imi
19 */
20public class SaveGpxAction extends AbstractAction {
21
22 /**
23 * Construct the action with "Save GPX" as label.
24 */
25 public SaveGpxAction() {
26 super("Save GPX", new ImageIcon("images/savegpx.png"));
27 putValue(MNEMONIC_KEY, KeyEvent.VK_S);
28 }
29
30 @SuppressWarnings("unchecked")
31 public void actionPerformed(ActionEvent e) {
32 JFileChooser fc = new JFileChooser("data");
33 fc.showSaveDialog(Main.main);
34 File gpxFile = fc.getSelectedFile();
35 if (gpxFile == null)
36 return;
37 }
38
39}
Note: See TracBrowser for help on using the repository browser.