Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package cadastre_fr;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import java.awt.event.ActionEvent;
|
---|
7 |
|
---|
8 | import javax.swing.JOptionPane;
|
---|
9 |
|
---|
10 | import org.openstreetmap.josm.Main;
|
---|
11 | import org.openstreetmap.josm.actions.JosmAction;
|
---|
12 |
|
---|
13 | public 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.