|
Last change
on this file since 20214 was 18544, checked in by pieren, 16 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
|
|---|
| 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 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.