Changeset 17089 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java
- Timestamp:
- 2009-08-16T23:36:16+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java
r15961 r17089 16 16 import java.util.concurrent.locks.ReentrantLock; 17 17 18 import javax.swing.JDialog; 18 19 import javax.swing.JOptionPane; 19 20 import org.openstreetmap.josm.Main; … … 78 79 public boolean loadCacheIfExist() { 79 80 try { 80 File file = new File(CadastrePlugin.cacheDir + wmsLayer. name+ "." + String.valueOf(wmsLayer.lambertZone+1));81 File file = new File(CadastrePlugin.cacheDir + wmsLayer.getName() + "." + String.valueOf(wmsLayer.lambertZone+1)); 81 82 if (file.exists()) { 82 int reply =JOptionPane.showConfirmDialog(null,83 "Location \" "+wmsLayer.name+"\" found in cache.\n"+83 JOptionPane pane = new JOptionPane( 84 tr("Location \"{0}\" found in cache.\n"+ 84 85 "Load cache first ?\n"+ 85 "(No = new cache)", 86 "Location in cache", 87 JOptionPane.YES_NO_OPTION); 86 "(No = new cache)", wmsLayer.getName()), 87 JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION, null); 88 // this below is a temporary workaround to fix the "always on top" issue 89 JDialog dialog = pane.createDialog(Main.parent, tr("Select Feuille")); 90 CadastrePlugin.prepareDialog(dialog); 91 dialog.setVisible(true); 92 int reply = (Integer)pane.getValue(); 93 // till here 94 88 95 if (reply == JOptionPane.OK_OPTION) { 89 96 return loadCache(file, wmsLayer.lambertZone); … … 99 106 public void deleteCacheFile() { 100 107 try { 101 File file = new File(CadastrePlugin.cacheDir + wmsLayer. name+ "." + String.valueOf(wmsLayer.lambertZone+1));108 File file = new File(CadastrePlugin.cacheDir + wmsLayer.getName() + "." + String.valueOf(wmsLayer.lambertZone+1)); 102 109 if (file.exists()) 103 110 file.delete(); … … 142 149 imagesLock.unlock(); 143 150 if (images != null && !images.isEmpty()) { 144 File file = new File(CadastrePlugin.cacheDir + wmsLayer. name+ "." + String.valueOf((wmsLayer.lambertZone + 1)));151 File file = new File(CadastrePlugin.cacheDir + wmsLayer.getName() + "." + String.valueOf((wmsLayer.lambertZone + 1))); 145 152 try { 146 153 if (file.exists()) {
Note:
See TracChangeset
for help on using the changeset viewer.
