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

Last change on this file since 13545 was 13545, checked in by pieren, 16 years ago

Add municipality boundary import from SVG data delivered by cadastre WMS.

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