Changeset 16791 in osm for applications/editors
- Timestamp:
- 2009-08-03T11:47:01+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/cadastre-fr
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/build.xml
r16620 r16791 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="18 15"/>28 <attribute name="Plugin-Mainversion" value="1893"/> 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/CadastreInterface.java
r16581 r16791 50 50 51 51 public boolean retrieveInterface(WMSLayer wmsLayer) throws DuplicateLayerException { 52 if (wmsLayer. name.equals(""))52 if (wmsLayer.getName().equals("")) 53 53 return false; 54 54 // open the session with the French Cadastre web front end 55 55 downloadCancelled = false; 56 56 try { 57 if (cookie == null || !wmsLayer. name.equals(cadastreGrabber.getLastWMSLayerName())) {57 if (cookie == null || !wmsLayer.getName().equals(cadastreGrabber.getLastWMSLayerName())) { 58 58 getCookie(); 59 59 getInterface(wmsLayer); 60 cadastreGrabber.setLastWMSLayerName(wmsLayer. name);60 cadastreGrabber.setLastWMSLayerName(wmsLayer.getName()); 61 61 } 62 62 openInterface(); … … 360 360 if (Main.map != null) { 361 361 for (Layer l : Main.map.mapView.getAllLayers()) { 362 if (l instanceof WMSLayer && l. name.equals(wmsLayer.name) && (l != wmsLayer)) {363 System.out.println("Try to grab into a new layer when "+wmsLayer. name+" is already opened.");362 if (l instanceof WMSLayer && l.getName().equals(wmsLayer.getName()) && (l != wmsLayer)) { 363 System.out.println("Try to grab into a new layer when "+wmsLayer.getName()+" is already opened."); 364 364 // remove the duplicated layer 365 365 Main.map.mapView.removeLayer(wmsLayer); -
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
r16007 r16791 174 174 @Override 175 175 public String getToolTipText() { 176 String str = tr("WMS layer ({0}), {1} tile(s) loaded", name, images.size());176 String str = tr("WMS layer ({0}), {1} tile(s) loaded", getName(), images.size()); 177 177 if (isRaster) { 178 178 str += "\n"+tr("Is not vectorized."); … … 215 215 @Override 216 216 public Component[] getMenuEntries() { 217 component = new Component[] { new JMenuItem( new LayerListDialog.ShowHideLayerAction(this)),218 new JMenuItem( new LayerListDialog.DeleteLayerAction(this)), new JMenuItem(new MenuActionLoadFromCache()),217 component = new Component[] { new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)), 218 new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)), new JMenuItem(new MenuActionLoadFromCache()), 219 219 new JMenuItem(new LayerListPopup.InfoAction(this)) }; 220 220 return component; … … 285 285 public void setLocation(String location) { 286 286 this.location = location; 287 this.name = rebuildName(); 288 repaintLayerListDialog(); 287 setName(rebuildName()); 289 288 } 290 289 … … 295 294 public void setCodeCommune(String codeCommune) { 296 295 this.codeCommune = codeCommune; 297 this.name = rebuildName(); 298 repaintLayerListDialog(); 296 setName(rebuildName()); 299 297 } 300 298 … … 350 348 for (GeorefImage img : images) 351 349 img.rotate(rasterCenter, angle); 352 }353 354 /**355 * Repaint the LayerList dialog.356 * This is the only way I found to refresh the layer name in the layer list when it changes357 * later (after the construction).358 */359 private void repaintLayerListDialog() {360 if (Main.map != null) {361 for (Component c : Main.map.toggleDialogs.getComponents()) {362 if (c instanceof LayerListDialog) {363 c.repaint();364 }365 }366 }367 350 } 368 351
Note:
See TracChangeset
for help on using the changeset viewer.