Changeset 20412 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSVectorImage.java
- Timestamp:
- 2010-03-11T00:58:51+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSVectorImage.java
r20390 r20412 5 5 6 6 import java.io.IOException; 7 8 import javax.swing.JOptionPane; 7 9 8 10 import org.openstreetmap.josm.Main; … … 14 16 15 17 private WMSLayer wmsLayer; 16 17 private Bounds bounds; 18 19 private CadastreGrabber grabber = CadastrePlugin.cadastreGrabber; 18 private Bounds bounds; 19 private CadastreGrabber grabber = CadastrePlugin.cadastreGrabber; 20 private static String errorMessage; 20 21 21 22 public DownloadWMSVectorImage(WMSLayer wmsLayer, Bounds bounds, boolean buildingsOnly) { … … 30 31 public void realRun() throws IOException { 31 32 progressMonitor.indeterminateSubTask(tr("Contacting WMS Server...")); 33 errorMessage = null; 32 34 try { 33 35 if (grabber.getWmsInterface().retrieveInterface(wmsLayer)) { … … 62 64 // we tried to grab onto a duplicated layer (removed) 63 65 System.err.println("removed a duplicated layer"); 66 } catch (WMSException e) { 67 errorMessage = e.getMessage(); 68 grabber.getWmsInterface().resetCookie(); 64 69 } 65 70 } … … 68 73 protected void cancel() { 69 74 grabber.getWmsInterface().cancel(); 75 if (wmsLayer != null) 76 wmsLayer.cancelled = true; 70 77 } 71 78 … … 79 86 80 87 Main.worker.execute(new DownloadWMSVectorImage(wmsLayer, bounds, buildingsOnly)); 81 88 if (errorMessage != null) 89 JOptionPane.showMessageDialog(Main.parent, errorMessage); 82 90 } 83 91 }
Note:
See TracChangeset
for help on using the changeset viewer.
