Changeset 32060 in osm for applications/editors/josm
- Timestamp:
- 2016-02-09T23:50:50+01:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/Address.java
r31443 r32060 64 64 65 65 public class Address extends MapMode implements MouseListener, MouseMotionListener, ActionListener { 66 private static final long serialVersionUID = 1L;67 66 68 67 // perhaps make all these tags configurable in the future … … 114 113 } 115 114 // dialog.setVisible(false); 116 // kill the window completely to fix an issue on some linux distro and 117 // full screen mode. 115 // kill the window completely to fix an issue on some linux distro and full screen mode. 118 116 if(dialog != null) 119 117 { … … 251 249 revertInputNumberChange(); 252 250 } catch (NumberFormatException en) { 253 Main.warn("Unable to parse house number \"" + inputNumber.getText() + "\""); 254 } 255 251 Main.warn("Unable to parse house number \"" + inputNumber.getText() + "\""); 252 } 256 253 } 257 254 cmds.add(new ChangePropertyCommand(osm, tagHouseNumber, inputNumber.getText())); … … 263 260 setNewSelection(osm); 264 261 } catch (NumberFormatException en) { 265 262 Main.warn("Unable to parse house number \"" + inputNumber.getText() + "\""); 266 263 } 267 264 } … … 467 464 clearButton.addActionListener(new ActionListener() { 468 465 @Override 469 466 public void actionPerformed(ActionEvent e) { 470 467 inputNumber.setText(""); 471 468 inputStreet.setText(""); … … 518 515 } 519 516 @Override 520 521 @Override 522 523 @Override 524 525 @Override 526 527 @Override 528 529 @Override 530 517 public void windowClosed(WindowEvent e) {} 518 @Override 519 public void windowActivated(WindowEvent arg0) {} 520 @Override 521 public void windowDeactivated(WindowEvent arg0) {} 522 @Override 523 public void windowDeiconified(WindowEvent arg0) {} 524 @Override 525 public void windowIconified(WindowEvent arg0) {} 526 @Override 527 public void windowOpened(WindowEvent arg0) {} 531 528 }); 532 529 String bounds = Main.pref.get("cadastrewms.addr.bounds",null); … … 536 533 Integer.parseInt(b[0]),Integer.parseInt(b[1]),Integer.parseInt(b[2]),Integer.parseInt(b[3]))); 537 534 } 538 }535 } 539 536 540 537 private void setSelectedWay(Way w) { … … 553 550 getCurrentDataSet().setSelected(osm); 554 551 } 555 556 552 } -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java
r30859 r32060 92 92 } 93 93 if (size > (long)cacheSize*1024*1024) { 94 94 Main.info("Delete oldest file \""+ files[oldestFile].getName() 95 95 + "\" in cache dir to stay under the limit of " + cacheSize + " MB."); 96 96 files[oldestFile].delete(); … … 135 135 delete(new File(CadastrePlugin.cacheDir + wmsLayer.getName() + "." + WMSFileExtension())); 136 136 } catch (Exception e) { 137 137 Main.error(e); 138 138 } 139 139 } … … 224 224 return ext; 225 225 } 226 227 226 } -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastreInterface.java
r31993 r32060 350 350 String lov = new String(input.substring(i+c0ptionListStart.length()-1, j)); 351 351 if (lov.indexOf(">") != -1) { 352 352 Main.info("parse "+lov); 353 353 listOfCommunes.add(lov); 354 354 } else … … 547 547 for (Layer l : Main.map.mapView.getAllLayers()) { 548 548 if (l instanceof WMSLayer && l.getName().equals(wmsLayer.getName()) && (l != wmsLayer)) { 549 549 Main.info("Try to grab into a new layer when "+wmsLayer.getName()+" is already opened."); 550 550 // remove the duplicated layer 551 551 Main.main.removeLayer(wmsLayer); … … 565 565 lastWMSLayerName = null; 566 566 } 567 568 567 } -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
r31665 r32060 232 232 menuSource.addActionListener(new ActionListener() { 233 233 @Override 234 234 public void actionPerformed(ActionEvent ev) { 235 235 Main.pref.put("cadastrewms.autosourcing", menuSource.isSelected()); 236 236 autoSourcing = menuSource.isSelected(); … … 367 367 368 368 @Override 369 369 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 370 370 if (cadastreJMenu != null) { 371 371 if (oldFrame == null && newFrame != null) { … … 439 439 dialog.setAlwaysOnTop(true); 440 440 } catch(SecurityException e) { 441 441 Main.warn(tr("Warning: failed to put option pane dialog always on top. Exception was: {0}", e.toString())); 442 442 } 443 443 } … … 478 478 } catch (NumberFormatException e) {} 479 479 if (srcYear.equals("AAAA") || (year != null && year < currentYear)) { 480 480 Main.info("Replace source year "+srcYear+" by current year "+currentYear); 481 481 src = src.substring(0, src.lastIndexOf(" ")+1)+currentYear; 482 482 Main.pref.put("cadastrewms.source", src); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGBuilding.java
r30859 r32060 68 68 } 69 69 } catch (DuplicateLayerException e) { 70 70 Main.warn("removed a duplicated layer"); 71 71 } catch (WMSException e) { 72 72 errorMessage = e.getMessage(); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadSVGTask.java
r30859 r32060 74 74 } 75 75 } catch (DuplicateLayerException e) { 76 76 Main.warn("removed a duplicated layer"); 77 77 } catch (WMSException e) { 78 78 errorMessage = e.getMessage(); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSPlanImage.java
r30859 r32060 85 85 } catch (DuplicateLayerException e) { 86 86 // we tried to grab onto a duplicated layer (removed) 87 87 Main.warn("removed a duplicated layer"); 88 88 } catch (WMSException e) { 89 89 errorMessage = e.getMessage(); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSVectorImage.java
r30859 r32060 59 59 } catch (DuplicateLayerException e) { 60 60 // we tried to grab onto a duplicated layer (removed) 61 61 Main.warn("removed a duplicated layer"); 62 62 } catch (WMSException e) { 63 63 errorMessage = e.getMessage(); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/GrabThread.java
r30859 r32060 92 92 newImage = grabber.grab(wmsLayer, currentGrabImage.min, currentGrabImage.max); 93 93 } catch (IOException e) { 94 94 Main.warn("Download action canceled by user or server did not respond"); 95 95 setCanceled(true); 96 96 break; … … 106 106 } 107 107 try { 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 108 if (CadastrePlugin.backgroundTransparent) { 109 wmsLayer.imagesLock.lock(); 110 for (GeorefImage img : wmsLayer.getImages()) { 111 if (img.overlap(newImage)) 112 // mask overlapping zone in already grabbed image 113 img.withdraw(newImage); 114 else 115 // mask overlapping zone in new image only when new image covers completely the 116 // existing image 117 newImage.withdraw(img); 118 } 119 wmsLayer.imagesLock.unlock(); 120 } 121 wmsLayer.addImage(newImage); 122 Main.map.mapView.repaint(); 123 saveToCache(newImage); 124 124 } catch (NullPointerException e) { 125 125 Main.info("Layer destroyed. Cancel grab thread"); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java
r30859 r32060 25 25 26 26 @Override 27 27 public void actionPerformed(ActionEvent e) { 28 28 JFileChooser fc = createAndOpenFileChooser(); 29 29 if (fc == null) -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionNewLocation.java
r30859 r32060 53 53 54 54 @Override 55 55 public void actionPerformed(ActionEvent e) { 56 56 WMSLayer wmsLayer = addNewLayer(new ArrayList<WMSLayer>()); 57 57 if (wmsLayer != null) -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionSaveRasterAs.java
r30859 r32060 72 72 73 73 @Override 74 74 public void actionPerformed(ActionEvent arg0) { 75 75 File file; 76 76 JFileChooser fc = new JFileChooser(); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/RasterImageGeoreferencer.java
r30859 r32060 68 68 69 69 /** 70 *71 * @return false if all operations are canceled72 */70 * 71 * @return false if all operations are canceled 72 */ 73 73 public boolean startGeoreferencing(WMSLayer wmsLayer) { 74 74 this.wmsLayer = wmsLayer; … … 91 91 } 92 92 93 94 93 public boolean isRunning() 95 94 { … … 98 97 99 98 @Override 100 public void mouseClicked(MouseEvent e) {99 public void mouseClicked(MouseEvent e) { 101 100 if (System.currentTimeMillis() - mouseClickedTime < initialClickDelay) { 102 101 Main.info("mouse click bounce detected"); … … 147 146 148 147 /** 149 *150 * @return false if all operations are canceled151 */148 * 149 * @return false if all operations are canceled 150 */ 152 151 private boolean canceledOrRestartCurrAction(String action) { 153 152 Object[] options = { "Cancel", "Retry" }; … … 251 250 pane.addPropertyChangeListener(new PropertyChangeListener() { 252 251 @Override 253 252 public void propertyChange(PropertyChangeEvent evt) { 254 253 if (JOptionPane.VALUE_PROPERTY.equals(evt.getPropertyName())) { 255 254 ignoreMouseClick = false; … … 355 354 356 355 @Override 357 public void mouseEntered(MouseEvent arg0) {356 public void mouseEntered(MouseEvent arg0) { 358 357 } 359 358 360 359 @Override 361 public void mouseExited(MouseEvent arg0) {360 public void mouseExited(MouseEvent arg0) { 362 361 } 363 362 364 363 @Override 365 public void mousePressed(MouseEvent arg0) {364 public void mousePressed(MouseEvent arg0) { 366 365 } 367 366 368 367 @Override 369 public void mouseReleased(MouseEvent arg0) { 370 } 371 368 public void mouseReleased(MouseEvent arg0) { 369 } 372 370 } -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
r30859 r32060 620 620 */ 621 621 @Override 622 622 public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) { 623 623 return false; 624 624 }
Note:
See TracChangeset
for help on using the changeset viewer.