Ignore:
Timestamp:
2009-08-16T23:36:16+02:00 (16 years ago)
Author:
pieren
Message:

raster image feature implementation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java

    r15961 r17089  
    1616import java.util.concurrent.locks.ReentrantLock;
    1717
     18import javax.swing.JDialog;
    1819import javax.swing.JOptionPane;
    1920import org.openstreetmap.josm.Main;
     
    7879    public boolean loadCacheIfExist() {
    7980        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));
    8182            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"+
    8485                        "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
    8895                if (reply == JOptionPane.OK_OPTION) {
    8996                    return loadCache(file, wmsLayer.lambertZone);
     
    99106    public void deleteCacheFile() {
    100107        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));
    102109            if (file.exists())
    103110                file.delete();
     
    142149            imagesLock.unlock();
    143150            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)));
    145152                try {
    146153                    if (file.exists()) {
Note: See TracChangeset for help on using the changeset viewer.