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

Last change on this file since 12652 was 12652, checked in by michael2402, 7 years ago

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

  • Property svn:eol-style set to native
File size: 1.2 KB
RevLine 
[6380]1// License: GPL. For details, see LICENSE file.
[612]2package org.openstreetmap.josm.actions;
3
[2327]4import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
[612]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;
[1084]11import org.openstreetmap.josm.tools.Shortcut;
[612]12
13/**
[655]14 * Action that opens a connection to the osm server and downloads map data.
[612]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 {
[7509]22
[6509]23 /**
24 * Constructs a new {@code DownloadAction}.
25 */
[1169]26 public DownloadAction() {
[12652]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),
[11621]29 true);
[2323]30 putValue("help", ht("/Action/Download"));
[1169]31 }
[612]32
[6084]33 @Override
[2132]34 public void actionPerformed(ActionEvent e) {
[2331]35 DownloadDialog dialog = DownloadDialog.getInstance();
[2335]36 dialog.restoreSettings();
[2331]37 dialog.setVisible(true);
[2512]38 }
[612]39}
Note: See TracBrowser for help on using the repository browser.