source: osm/applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrab.java@ 31993

Last change on this file since 31993 was 30701, checked in by donvip, 10 years ago

[josm_plugins] fix various compilation warnings

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1// License: GPL. v2 and later. Copyright 2008-2009 by Pieren <pieren3@gmail.com> and others
2package cadastre_fr;
3
4import static org.openstreetmap.josm.tools.I18n.marktr;
5import static org.openstreetmap.josm.tools.I18n.tr;
6
7import java.awt.event.ActionEvent;
8import java.awt.event.KeyEvent;
9
10import org.openstreetmap.josm.Main;
11import org.openstreetmap.josm.actions.JosmAction;
12import org.openstreetmap.josm.tools.Shortcut;
13
14/**
15 * Action calling the wms grabber for cadastre.gouv.fr
16 */
17public class MenuActionGrab extends JosmAction {
18
19 public static String name = marktr("Cadastre grab");
20
21 public MenuActionGrab() {
22 super(tr(name), "cadastre_small", tr("Download Image from French Cadastre WMS"),
23 Shortcut.registerShortcut("cadastre:grab", tr("Cadastre: {0}", tr("Download Image from French Cadastre WMS")),
24 KeyEvent.VK_F10, Shortcut.DIRECT), false, "cadastrefr/grab", true);
25 }
26
27 public void actionPerformed(ActionEvent e) {
28 if (Main.map != null) {
29 if (CadastrePlugin.isCadastreProjection()) {
30 WMSLayer wmsLayer = WMSDownloadAction.getLayer();
31 if (wmsLayer != null)
32 DownloadWMSVectorImage.download(wmsLayer);
33 } else {
34 CadastrePlugin.askToChangeProjection();
35 }
36 } else
37 new MenuActionNewLocation().actionPerformed(e);
38 }
39
40}
Note: See TracBrowser for help on using the repository browser.