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

Last change on this file was 17806, checked in by simon04, 3 years ago

fix #17838 - Cmd+Shift+Down selects text on the welcome screen

  • Property svn:eol-style set to native
File size: 1.4 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 * Action shortcut (ctrl-shift-down by default), made public in order to be used from {@code GettingStarted} page.
25 */
26 public static final Shortcut SHORTCUT =
27 Shortcut.registerShortcut("file:download", tr("File: {0}", tr("Download data")), KeyEvent.VK_DOWN, Shortcut.CTRL_SHIFT);
28
29 /**
30 * Constructs a new {@code DownloadAction}.
31 */
32 public DownloadAction() {
33 super(tr("Download data..."), "download", tr("Download map data from a server of your choice"),
34 SHORTCUT, true, false);
35 setHelpId(ht("/Action/Download"));
36 }
37
38 @Override
39 public void actionPerformed(ActionEvent e) {
40 DownloadDialog dialog = DownloadDialog.getInstance();
41 dialog.restoreSettings();
42 dialog.setVisible(true);
43 }
44}
Note: See TracBrowser for help on using the repository browser.