Rev | Line | |
---|
[32556] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
[13545] | 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 |
|
---|
[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.