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
RevLine 
[32556]1// License: GPL. For details, see LICENSE file.
[13545]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
[33047]15 public static final String NAME = "Administrative boundary";
16
[13545]17 private static final long serialVersionUID = 1L;
18 private WMSLayer wmsLayer = null;
[33047]19
20 /**
21 * Constructs a new {@code MenuActionBoundaries}.
22 */
[13545]23 public MenuActionBoundaries() {
[33047]24 super(tr(NAME), "cadastre_small", tr("Extract commune boundary"), null, false);
[13545]25 }
26
[32556]27 @Override
[13545]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.