Changeset 16791 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
- Timestamp:
- 2009-08-03T11:47:01+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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( newLayerListDialog.ShowHideLayerAction(this)),218 new JMenuItem( newLayerListDialog.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.
