source: josm/trunk/src/org/openstreetmap/josm/actions/DownloadAction.java @ 12652

Last change on this file since 12652 was 12652, checked in by michael2402, 2 months ago

Apply #15167: Merge OSM and overpass download dialog. Patch by bafonins

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.actions;
3
4import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
5import static org.openstreetmap.josm.tools.I18n.tr;
6
7import java.awt.event.ActionEvent;
8import java.awt.event.KeyEvent;
9
10import org.openstreetmap.josm.gui.download.DownloadDialog;
11import org.openstreetmap.josm.tools.Shortcut;
12
13/**
14 * Action that opens a connection to the osm server and downloads map data.
15 *
16 * An dialog is displayed asking the user to specify a rectangle to grab.
17 * The url and account settings from the preferences are used.
18 *
19 * @author imi
20 */
21public class DownloadAction extends JosmAction {
22
23    /**
24     * Constructs a new {@code DownloadAction}.
25     */
26    public DownloadAction() {
27        super(tr("Download data"), "download", tr("Download map data from a server of your choice"),
28              Shortcut.registerShortcut("file:download", tr("File: {0}", tr("Download data")), KeyEvent.VK_DOWN, Shortcut.CTRL_SHIFT),
29              true);
30        putValue("help", ht("/Action/Download"));
31    }
32
33    @Override
34    public void actionPerformed(ActionEvent e) {
35        DownloadDialog dialog = DownloadDialog.getInstance();
36        dialog.restoreSettings();
37        dialog.setVisible(true);
38    }
39}
Note: See TracBrowser for help on using the repository browser.