Changeset 16581 in osm for applications/editors/josm/plugins
- Timestamp:
- 2009-07-19T18:01:42+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/cadastre-fr
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/build.xml
r16007 r16581 26 26 <attribute name="Plugin-Description" value="A special handler for the French land registry WMS server."/> 27 27 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/FR:JOSM/Fr:Plugin/Cadastre"/> 28 <attribute name="Plugin-Mainversion" value="1 646"/>28 <attribute name="Plugin-Mainversion" value="1811"/> 29 29 <attribute name="Plugin-Stage" value="60"/> 30 30 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreGrabber.java
r15961 r16581 12 12 import javax.imageio.ImageIO; 13 13 14 import org.openstreetmap.josm.Main;15 14 import org.openstreetmap.josm.data.coor.EastNorth; 15 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 16 16 import org.openstreetmap.josm.io.OsmTransferException; 17 17 import org.openstreetmap.josm.io.ProgressInputStream; … … 84 84 wmsInterface.urlConn.setRequestMethod("GET"); 85 85 wmsInterface.setCookie(); 86 InputStream is = new ProgressInputStream(wmsInterface.urlConn, Main.pleaseWaitDlg);86 InputStream is = new ProgressInputStream(wmsInterface.urlConn, NullProgressMonitor.INSTANCE); 87 87 BufferedImage img = ImageIO.read(is); 88 88 is.close(); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java
r16007 r16581 78 78 urlConn.connect(); 79 79 if (urlConn.getResponseCode() != HttpURLConnection.HTTP_OK) { 80 throw (IOException)new IOException("Cannot get Cadastre cookie.");80 throw new IOException("Cannot get Cadastre cookie."); 81 81 } 82 82 BufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream())); … … 148 148 urlConn.connect(); 149 149 if (urlConn.getResponseCode() != HttpURLConnection.HTTP_OK) { 150 throw (IOException)new IOException("Cannot open Cadastre interface. GET response:"+urlConn.getResponseCode());150 throw new IOException("Cannot open Cadastre interface. GET response:"+urlConn.getResponseCode()); 151 151 } 152 152 BufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream())); … … 330 330 urlConn.connect(); 331 331 if (urlConn.getResponseCode() != HttpURLConnection.HTTP_OK) { 332 throw (IOException)new IOException("Cannot get Cadastre response.");332 throw new IOException("Cannot get Cadastre response."); 333 333 } 334 334 BufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream())); … … 371 371 372 372 public void cancel() { 373 Main.pleaseWaitDlg.currentAction.setText(tr("Aborting..."));374 373 if (urlConn != null) { 375 374 urlConn.setConnectTimeout(1); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java
r16160 r16581 29 29 import org.openstreetmap.josm.gui.MapView; 30 30 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 31 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 31 32 import org.openstreetmap.josm.io.OsmTransferException; 32 33 import org.openstreetmap.josm.io.ProgressInputStream; … … 50 51 @Override 51 52 public void realRun() throws IOException, OsmTransferException { 52 Main.pleaseWaitDlg.currentAction.setText(tr("Contacting WMS Server..."));53 progressMonitor.indeterminateSubTask(tr("Contacting WMS Server...")); 53 54 try { 54 55 if (wmsInterface.retrieveInterface(wmsLayer)) { … … 232 233 wmsInterface.urlConn.setRequestMethod("GET"); 233 234 wmsInterface.setCookie(); 234 InputStream is = new ProgressInputStream(wmsInterface.urlConn, Main.pleaseWaitDlg);235 InputStream is = new ProgressInputStream(wmsInterface.urlConn, NullProgressMonitor.INSTANCE); 235 236 File file = new File(CadastrePlugin.cacheDir + "building.svg"); 236 237 String svg = new String(); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGTask.java
r15961 r16581 29 29 import org.openstreetmap.josm.data.osm.Way; 30 30 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 31 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 31 32 import org.openstreetmap.josm.io.OsmTransferException; 32 33 import org.openstreetmap.josm.io.ProgressInputStream; … … 54 55 @Override 55 56 public void realRun() throws IOException, OsmTransferException { 56 Main.pleaseWaitDlg.currentAction.setText(tr("Contacting WMS Server..."));57 progressMonitor.indeterminateSubTask(tr("Contacting WMS Server...")); 57 58 try { 58 59 if (wmsInterface.retrieveInterface(wmsLayer)) { … … 60 61 if (svg == null) 61 62 return; 62 Main.pleaseWaitDlg.currentAction.setText(tr("Extract SVG ViewBox..."));63 progressMonitor.indeterminateSubTask(tr("Extract SVG ViewBox...")); 63 64 getViewBox(svg); 64 65 if (viewBox == null) 65 66 return; 66 Main.pleaseWaitDlg.currentAction.setText(tr("Extract best fitting boundary..."));67 progressMonitor.indeterminateSubTask(tr("Extract best fitting boundary...")); 67 68 createWay(svg); 68 69 } … … 187 188 wmsInterface.urlConn.setRequestMethod("GET"); 188 189 wmsInterface.setCookie(); 189 InputStream is = new ProgressInputStream(wmsInterface.urlConn, Main.pleaseWaitDlg);190 InputStream is = new ProgressInputStream(wmsInterface.urlConn, NullProgressMonitor.INSTANCE); 190 191 File file = new File(CadastrePlugin.cacheDir + "boundary.svg"); 191 192 String svg = new String(); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSTask.java
r15961 r16581 4 4 5 5 import java.io.IOException; 6 6 7 import org.openstreetmap.josm.Main; 8 import org.openstreetmap.josm.data.Bounds; 9 import org.openstreetmap.josm.gui.MapView; 7 10 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 8 import org.openstreetmap.josm.gui.MapView;9 import org.openstreetmap.josm.data.Bounds;10 11 11 12 public class DownloadWMSTask extends PleaseWaitRunnable { … … 26 27 @Override 27 28 public void realRun() throws IOException { 28 Main.pleaseWaitDlg.currentAction.setText(tr("Contacting WMS Server..."));29 progressMonitor.indeterminateSubTask(tr("Contacting WMS Server...")); 29 30 try { 30 31 if (grabber.getWmsInterface().retrieveInterface(wmsLayer)) {
Note:
See TracChangeset
for help on using the changeset viewer.