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

Last change on this file since 18544 was 18544, checked in by pieren, 15 years ago

Add licence in headers for GPL compliance.

File size: 1.1 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.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 String name = "Administrative boundary";
16
17 private static final long serialVersionUID = 1L;
18 private WMSLayer wmsLayer = null;
19
20 public MenuActionBoundaries() {
21 super(tr(name), "cadastre_small", tr("Extract commune boundary"), null, false);
22 }
23
24 public void actionPerformed(ActionEvent arg0) {
25 wmsLayer = WMSDownloadAction.getLayer();
26 if (wmsLayer != null) {
27 if (wmsLayer.isRaster()) {
28 JOptionPane.showMessageDialog(Main.parent,
29 tr("Only on vectorized layers"), tr("Error"),
30 JOptionPane.ERROR_MESSAGE);
31 return;
32 }
33 DownloadSVGTask.download(wmsLayer);
34 }
35 }
36
37}
Note: See TracBrowser for help on using the repository browser.