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

Last change on this file since 33047 was 33047, checked in by donvip, 8 years ago

findbugs

File size: 1.2 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package cadastre_fr;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import java.awt.event.ActionEvent;
7
8import javax.swing.JOptionPane;
9
10import org.openstreetmap.josm.Main;
11import org.openstreetmap.josm.actions.JosmAction;
12
13public class MenuActionBoundaries extends JosmAction {
14
15 public static final String NAME = "Administrative boundary";
16
17 private static final long serialVersionUID = 1L;
18 private WMSLayer wmsLayer = null;
19
20 /**
21 * Constructs a new {@code MenuActionBoundaries}.
22 */
23 public MenuActionBoundaries() {
24 super(tr(NAME), "cadastre_small", tr("Extract commune boundary"), null, false);
25 }
26
27 @Override
28 public void actionPerformed(ActionEvent arg0) {
29 wmsLayer = WMSDownloadAction.getLayer();
30 if (wmsLayer != null) {
31 if (wmsLayer.isRaster()) {
32 JOptionPane.showMessageDialog(Main.parent,
33 tr("Only on vectorized layers"), tr("Error"),
34 JOptionPane.ERROR_MESSAGE);
35 return;
36 }
37 DownloadSVGTask.download(wmsLayer);
38 }
39 }
40}
Note: See TracBrowser for help on using the repository browser.