Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java	(revision 24913)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java	(revision 24934)
@@ -153,5 +153,5 @@
         if (successfulRead && wmsLayer.isRaster()) {
             // serialized raster bufferedImage hangs-up on Java6. Recreate them here
-            wmsLayer.images.get(0).image = RasterImageModifier.fixRasterImage(wmsLayer.images.get(0).image);
+            wmsLayer.getImage(0).image = RasterImageModifier.fixRasterImage(wmsLayer.getImage(0).image);
         }
         return successfulRead;
@@ -172,5 +172,4 @@
         for (;;) {
             imagesLock.lock();
-            //ArrayList<GeorefImage> images = new ArrayList<GeorefImage>(imagesToSave);
             int size = imagesToSave.size();
             imagesLock.unlock();
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSPlanImage.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSPlanImage.java	(revision 24913)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSPlanImage.java	(revision 24934)
@@ -35,5 +35,5 @@
             try {
                 if (grabber.getWmsInterface().retrieveInterface(wmsLayer)) {
-                    if (!wmsLayer.images.isEmpty()) {
+                    if (!wmsLayer.getImages().isEmpty()) {
                         //JOptionPane.showMessageDialog(Main.parent,tr("Image already loaded"));
                         JOptionPane pane = new JOptionPane(
@@ -51,5 +51,5 @@
                         // first time we grab an image for this layer
                         if (CacheControl.cacheEnabled) {
-                            if (wmsLayer.getCacheControl().loadCacheIfExist()) {
+                            if (wmsLayer.grabThread.getCacheControl().loadCacheIfExist()) {
                                 dontGeoreference = true;
                                 Main.map.mapView.repaint();
@@ -64,5 +64,5 @@
                             wmsLayer.grab(grabber, bounds);
                             if (grabber.getWmsInterface().downloadCancelled) {
-                                wmsLayer.images.clear();
+                                wmsLayer.clearImages();
                                 Main.map.mapView.repaint();
                             } else {
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSVectorImage.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSVectorImage.java	(revision 24913)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSVectorImage.java	(revision 24934)
@@ -33,8 +33,8 @@
         try {
             if (grabber.getWmsInterface().retrieveInterface(wmsLayer)) {
-                if (wmsLayer.images.isEmpty()) {
+                if (wmsLayer.getImages().isEmpty()) {
                     // first time we grab an image for this layer
                     if (CacheControl.cacheEnabled) {
-                        if (wmsLayer.getCacheControl().loadCacheIfExist()) {
+                        if (wmsLayer.grabThread.getCacheControl().loadCacheIfExist()) {
                             Main.map.mapView.zoomTo(wmsLayer.getCommuneBBox().toBounds());
                             //Main.map.mapView.repaint();
@@ -69,5 +69,5 @@
         grabber.getWmsInterface().cancel();
         if (wmsLayer != null)
-            wmsLayer.cancelled = true;
+            wmsLayer.grabThread.setCancelled(true);
     }
 
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/GeorefImage.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/GeorefImage.java	(revision 24913)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/GeorefImage.java	(revision 24934)
@@ -23,5 +23,5 @@
 import org.openstreetmap.josm.gui.NavigatableComponent;
 
-public class GeorefImage implements Serializable, ImageObserver {
+public class GeorefImage implements Serializable, ImageObserver, Cloneable {
     private static final long serialVersionUID = 1L;
 
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/GrabThread.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/GrabThread.java	(revision 24934)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/GrabThread.java	(revision 24934)
@@ -0,0 +1,205 @@
+package cadastre_fr;
+
+import java.awt.Color;
+import java.awt.Graphics;
+import java.awt.Point;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.coor.EastNorth;
+import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.io.OsmTransferException;
+
+public class GrabThread extends Thread {
+
+    private boolean cancelled;
+
+    private CadastreGrabber grabber;
+
+    private WMSLayer wmsLayer;
+
+    private Lock lock = new ReentrantLock();
+
+    private ArrayList<EastNorthBound> imagesToGrab = new ArrayList<EastNorthBound>();
+
+    private CacheControl cacheControl = null;
+    
+    private EastNorthBound currentGrabImage;
+
+    public void addImages(ArrayList<EastNorthBound> moreImages) {
+        lock.lock();
+        imagesToGrab.addAll(moreImages);
+        lock.unlock();
+        synchronized(this) {
+            this.notify();
+        }
+        System.out.println("Added " + moreImages.size() + " to the grab thread");
+    }
+
+    public int getImagesToGrabSize() {
+        lock.lock();
+        int size = imagesToGrab.size();
+        lock.unlock();
+        return size;
+    }
+    
+    public ArrayList<EastNorthBound> getImagesToGrabCopy() {
+        ArrayList<EastNorthBound> copyList = new ArrayList<EastNorthBound>(); 
+        lock.lock();
+        for (EastNorthBound img : imagesToGrab) {
+            EastNorthBound imgCpy = new EastNorthBound(img.min, img.max);
+            copyList.add(imgCpy);
+        }
+        lock.unlock();
+        return copyList;
+    }
+    
+    public void clearImagesToGrab() {        
+        lock.lock();
+        imagesToGrab.clear();
+        lock.unlock();
+    }
+    
+    @Override
+    public void run() {
+        for (;;) {
+            while (getImagesToGrabSize() > 0) {
+                lock.lock();
+                currentGrabImage = imagesToGrab.get(0);
+                imagesToGrab.remove(0);
+                lock.unlock();
+                if (cancelled) {
+                    break;
+                } else {
+                    GeorefImage newImage;
+                    try {
+                        newImage = grabber.grab(wmsLayer, currentGrabImage.min, currentGrabImage.max);
+                    } catch (IOException e) {
+                        System.out
+                                .println("Download action cancelled by user or server did not respond");
+                        setCancelled(true);
+                        break;
+                    } catch (OsmTransferException e) {
+                        System.out.println("OSM transfer failed");
+                        setCancelled(true);
+                        break;
+                    }
+                    if (grabber.getWmsInterface().downloadCancelled) {
+                        System.out.println("Download action cancelled by user");
+                        setCancelled(true);
+                        break;
+                    }
+                    if (CadastrePlugin.backgroundTransparent) {
+                        wmsLayer.imagesLock.lock();
+                        for (GeorefImage img : wmsLayer.getImages()) {
+                            if (img.overlap(newImage))
+                                // mask overlapping zone in already grabbed image
+                                img.withdraw(newImage);
+                            else
+                                // mask overlapping zone in new image only when new image covers completely the 
+                                // existing image
+                                newImage.withdraw(img);
+                        }
+                        wmsLayer.imagesLock.unlock();
+                    }
+                    wmsLayer.addImage(newImage);
+                    Main.map.mapView.repaint();
+                    saveToCache(newImage);
+                }
+            }
+            System.out.println("grab thread list empty");
+            currentGrabImage = null;
+            if (cancelled) {
+                clearImagesToGrab();
+                cancelled = false;
+            }
+            synchronized(this) {
+                try {
+                    wait();
+                } catch (InterruptedException e) {
+                    e.printStackTrace(System.out);
+                }
+            }
+        }
+    }
+
+    public void saveToCache(GeorefImage image) {
+        if (CacheControl.cacheEnabled && !wmsLayer.isRaster()) {
+            getCacheControl().saveCache(image);
+        }
+    }
+
+    public void saveNewCache() {
+        if (CacheControl.cacheEnabled) {
+            getCacheControl().deleteCacheFile();
+            wmsLayer.imagesLock.lock();
+            for (GeorefImage image : wmsLayer.getImages())
+                getCacheControl().saveCache(image);
+            wmsLayer.imagesLock.unlock();
+        }
+    }
+
+    public void cancel() {
+        clearImagesToGrab();
+        if (cacheControl != null) {
+            while (!cacheControl.isCachePipeEmpty()) {
+                System.out
+                        .println("Try to close a WMSLayer which is currently saving in cache : wait 1 sec.");
+                CadastrePlugin.safeSleep(1000);
+            }
+        }
+    }
+
+    public CacheControl getCacheControl() {
+        if (cacheControl == null)
+            cacheControl = new CacheControl(wmsLayer);
+        return cacheControl;
+    }
+
+    public GrabThread(WMSLayer wmsLayer) {
+        this.wmsLayer = wmsLayer;
+    }
+
+    public void paintBoxesToGrab(Graphics g, MapView mv) {
+        ArrayList<EastNorthBound> imagesToGrab = getImagesToGrabCopy();
+        for (EastNorthBound img : imagesToGrab) {
+            paintBox(g, mv, img, Color.red);
+        }
+        if (currentGrabImage != null) {
+            paintBox(g, mv, currentGrabImage, Color.orange);
+        }
+    }
+    
+    private void paintBox(Graphics g, MapView mv, EastNorthBound img, Color color) {
+        Point[] croppedPoint = new Point[5];
+        croppedPoint[0] = mv.getPoint(img.min);
+        croppedPoint[1] = mv.getPoint(new EastNorth(img.min.east(), img.max.north()));
+        croppedPoint[2] = mv.getPoint(img.max);
+        croppedPoint[3] = mv.getPoint(new EastNorth(img.max.east(), img.min.north()));
+        croppedPoint[4] = croppedPoint[0];
+        for (int i=0; i<4; i++) {
+            g.setColor(color);
+            g.drawLine(croppedPoint[i].x, croppedPoint[i].y, croppedPoint[i+1].x, croppedPoint[i+1].y);
+        }
+    }
+    
+    public boolean isCancelled() {
+        return cancelled;
+    }
+
+    public void setCancelled(boolean cancelled) {
+        this.cancelled = cancelled;
+    }
+
+    public CadastreGrabber getGrabber() {
+        return grabber;
+    }
+
+    public void setGrabber(CadastreGrabber grabber) {
+        this.grabber = grabber;
+    }
+
+}
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionCancelGrab.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionCancelGrab.java	(revision 24934)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionCancelGrab.java	(revision 24934)
@@ -0,0 +1,29 @@
+package cadastre_fr;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+
+import org.openstreetmap.josm.actions.JosmAction;
+
+@SuppressWarnings("serial")
+public class MenuActionCancelGrab extends JosmAction {
+
+    public static String name = "Cancel current grab";
+
+    private WMSLayer wmsLayer;
+    
+    public MenuActionCancelGrab(WMSLayer wmsLayer) {
+        super(tr(name), null, tr("Cancel current grab (only vector images)"), null, false);
+        this.wmsLayer = wmsLayer;
+    }
+
+
+    @Override
+    public void actionPerformed(ActionEvent arg0) {
+        if (wmsLayer.grabThread.getImagesToGrabSize() > 0) {
+            wmsLayer.grabThread.cancel();
+        }
+    }
+
+}
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java	(revision 24913)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionGrabPlanImage.java	(revision 24934)
@@ -106,5 +106,5 @@
         if (loadedFromCache) {
             Main.map.repaint();
-        } else if (wmsLayer.images.size() == 0) {
+        } else if (wmsLayer.getImages().size() == 0) {
             // action cancelled or image loaded from cache (and already georeferenced)
             actionInterrupted();
@@ -149,6 +149,6 @@
             countMouseClicked++;
             // ignore clicks outside the image
-            if (ea.east() < wmsLayer.images.get(0).min.east() || ea.east() > wmsLayer.images.get(0).max.east()
-                    || ea.north() < wmsLayer.images.get(0).min.north() || ea.north() > wmsLayer.images.get(0).max.north())
+            if (ea.east() < wmsLayer.getImage(0).min.east() || ea.east() > wmsLayer.getImage(0).max.east()
+                    || ea.north() < wmsLayer.getImage(0).min.north() || ea.north() > wmsLayer.getImage(0).max.north())
                 return;
             if (mode == cGetCorners) {
@@ -259,5 +259,5 @@
         Main.map.mapView.removeMouseListener(this);
         affineTransform(ea1, ea2, georefpoint1, georefpoint2);
-        wmsLayer.saveNewCache();
+        wmsLayer.grabThread.saveNewCache();
         Main.map.mapView.repaint();
         actionCompleted();
@@ -378,12 +378,12 @@
         double dx = dst1.getX() - org1.getX();
         double dy = dst1.getY() - org1.getY();
-        wmsLayer.images.get(0).shear(dx, dy);
+        wmsLayer.getImage(0).shear(dx, dy);
         org1 = org1.add(dx, dy); // org1=dst1 now
         org2 = org2.add(dx, dy);
         // rotate : org1(=dst1 now) is anchor for rotation and scale
-        wmsLayer.images.get(0).rotate(dst1, angle);
+        wmsLayer.getImage(0).rotate(dst1, angle);
         org2 = org2.rotate(dst1, angle);
         // scale image from anchor org1(=dst1 now)
-        wmsLayer.images.get(0).scale(dst1, proportion);
+        wmsLayer.getImage(0).scale(dst1, proportion);
     }
 
@@ -392,8 +392,8 @@
         georefpoint2 = new EastNorth(wmsLayer.X0+wmsLayer.fX*wmsLayer.communeBBox.max.getX(),
                 wmsLayer.Y0+wmsLayer.fY*wmsLayer.communeBBox.max.getX());
-        ea1 = new EastNorth(wmsLayer.images.get(0).min.east(), wmsLayer.images.get(0).max.north());
-        EastNorth ea2 = wmsLayer.images.get(0).max;
+        ea1 = new EastNorth(wmsLayer.getImage(0).min.east(), wmsLayer.getImage(0).max.north());
+        EastNorth ea2 = wmsLayer.getImage(0).max;
         affineTransform(ea1, ea2, georefpoint1, georefpoint2);
-        wmsLayer.saveNewCache();
+        wmsLayer.grabThread.saveNewCache();
         Main.map.mapView.repaint();
     }
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java	(revision 24913)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java	(revision 24934)
@@ -75,5 +75,5 @@
                     // create layer and load cache
                     WMSLayer wmsLayer = new WMSLayer("", "", Integer.parseInt(ext)-1);
-                    if (wmsLayer.getCacheControl().loadCache(file, layoutZone)) {
+                    if (wmsLayer.grabThread.getCacheControl().loadCache(file, layoutZone)) {
                         CadastrePlugin.addWMSLayer(wmsLayer);
                     }
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionSaveRasterAs.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionSaveRasterAs.java	(revision 24913)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionSaveRasterAs.java	(revision 24934)
@@ -56,5 +56,5 @@
             if (!file.getName().endsWith(".png"))
                 file = new File(file.getParent(), file.getName()+".png");
-            BufferedImage bi = wmsLayer.images.get(0).image; 
+            BufferedImage bi = wmsLayer.getImage(0).image; 
             try {
                 ImageIO.write(bi, "png", file);
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSAdjustAction.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSAdjustAction.java	(revision 24913)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSAdjustAction.java	(revision 24934)
@@ -165,7 +165,7 @@
             double endAngle = Math.atan2(end.east()-pivot.east(), end.north()-pivot.north());
             double rotationAngle = endAngle - startAngle;
-            if (selectedLayer.images.get(0).orgCroppedRaster != null) {
+            if (selectedLayer.getImage(0).orgCroppedRaster != null) {
                 for (int i=0; i<4; i++) {
-                    croppedRaster[i] = selectedLayer.images.get(0).orgCroppedRaster[i].rotate(pivot, rotationAngle);
+                    croppedRaster[i] = selectedLayer.getImage(0).orgCroppedRaster[i].rotate(pivot, rotationAngle);
                 }
                 croppedRaster[4] = croppedRaster[0];
@@ -198,5 +198,5 @@
     private void saveModifiedLayers() {
         for (WMSLayer wmsLayer : modifiedLayers) {
-            wmsLayer.saveNewCache();
+            wmsLayer.grabThread.saveNewCache();
         }
     }
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java	(revision 24913)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java	(revision 24934)
@@ -20,4 +20,6 @@
 import java.util.HashSet;
 import java.util.Vector;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
 
 import javax.swing.Action;
@@ -34,5 +36,4 @@
 import org.openstreetmap.josm.gui.dialogs.LayerListPopup;
 import org.openstreetmap.josm.gui.layer.Layer;
-import org.openstreetmap.josm.io.OsmTransferException;
 
 /**
@@ -48,5 +49,7 @@
             CadastrePlugin.class.getResource("/images/cadastre_small.png")));
 
-    protected Vector<GeorefImage> images = new Vector<GeorefImage>();
+    private Vector<GeorefImage> images = new Vector<GeorefImage>();
+
+    public Lock imagesLock = new ReentrantLock();
 
     /**
@@ -61,6 +64,4 @@
     private ArrayList<EastNorthBound> dividedBbox = new ArrayList<EastNorthBound>();
 
-    private CacheControl cacheControl = null;
-
     private String location = "";
 
@@ -70,6 +71,4 @@
 
     public EastNorthBound communeBBox = new EastNorthBound(new EastNorth(0,0), new EastNorth(0,0));
-
-    public boolean cancelled;
 
     private boolean isRaster = false;
@@ -84,7 +83,10 @@
     private Action saveAsPng;
 
+    private Action cancelGrab;
+
     public boolean adjustModeEnabled;
 
-
+    public GrabThread grabThread;
+    
     public WMSLayer() {
         this(tr("Blank Layer"), "", -1);
@@ -96,4 +98,6 @@
         this.codeCommune = codeCommune;
         this.lambertZone = lambertZone;
+        grabThread = new GrabThread(this);
+        grabThread.start();
         // enable auto-sourcing option
         CadastrePlugin.pluginUsed = true;
@@ -103,10 +107,5 @@
     public void destroy() {
         // if the layer is currently saving the images in the cache, wait until it's finished
-        if (cacheControl != null) {
-            while (!cacheControl.isCachePipeEmpty()) {
-                System.out.println("Try to close a WMSLayer which is currently saving in cache : wait 1 sec.");
-                CadastrePlugin.safeSleep(1000);
-            }
-        }
+        grabThread.cancel();
         super.destroy();
         images = null;
@@ -127,5 +126,6 @@
 
     public void grab(CadastreGrabber grabber, Bounds b) throws IOException {
-        cancelled = false;
+        grabThread.setCancelled(false);
+        grabThread.setGrabber(grabber);
         // if it is the first layer, use the communeBBox as grab bbox (and not divided)
         if (Main.map.mapView.getAllLayers().size() == 1 ) {
@@ -142,40 +142,6 @@
         }
 
-        int lastSavedImage = images.size();
-        for (EastNorthBound n : dividedBbox) {
-            if (cancelled)
-                return;
-            GeorefImage newImage;
-            try {
-                newImage = grabber.grab(this, n.min, n.max);
-            } catch (IOException e) {
-                System.out.println("Download action cancelled by user or server did not respond");
-                break;
-            } catch (OsmTransferException e) {
-                System.out.println("OSM transfer failed");
-                break;
-            }
-            if (grabber.getWmsInterface().downloadCancelled) {
-                System.out.println("Download action cancelled by user");
-                break;
-            }
-            if (CadastrePlugin.backgroundTransparent) {
-                for (GeorefImage img : images) {
-                    if (img.overlap(newImage))
-                        // mask overlapping zone in already grabbed image
-                        img.withdraw(newImage);
-                    else
-                        // mask overlapping zone in new image only when new
-                        // image covers completely the existing image
-                        newImage.withdraw(img);
-                }
-            }
-            images.add(newImage);
-            Main.map.mapView.repaint();
-        }
-        if (!cancelled) {
-            for (int i=lastSavedImage; i < images.size(); i++)
-                saveToCache(images.get(i));
-        }
+        grabThread.addImages(dividedBbox);
+        Main.map.repaint();
     }
 
@@ -255,13 +221,16 @@
             else
                 g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR);
-            synchronized(this){
-                for (GeorefImage img : images)
-                    img.paint(g, mv, CadastrePlugin.backgroundTransparent,
-                            CadastrePlugin.transparency, CadastrePlugin.drawBoundaries);
-            }
+            imagesLock.lock();
+            for (GeorefImage img : images)
+                img.paint(g, mv, CadastrePlugin.backgroundTransparent,
+                        CadastrePlugin.transparency, CadastrePlugin.drawBoundaries);
+            imagesLock.unlock();
             g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, savedInterpolation);
         }
         if (this.isRaster) {
             paintCrosspieces(g, mv);
+        }
+        if (grabThread.getImagesToGrabSize() > 0) {
+            grabThread.paintBoxesToGrab(g, mv);
         }
         if (this.adjustModeEnabled) {
@@ -287,4 +256,6 @@
         saveAsPng = new MenuActionSaveRasterAs(this);
         saveAsPng.setEnabled(isRaster);
+        cancelGrab = new MenuActionCancelGrab(this);
+        cancelGrab.setEnabled(!isRaster && grabThread.getImagesToGrabSize() > 0);
         return new Action[] {
                 LayerListDialog.getInstance().createShowHideLayerAction(),
@@ -292,4 +263,5 @@
                 new MenuActionLoadFromCache(),
                 saveAsPng,
+                cancelGrab,
                 new LayerListPopup.InfoAction(this),
 
@@ -318,24 +290,4 @@
         }
         return false;
-    }
-
-    public void saveToCache(GeorefImage image) {
-        if (CacheControl.cacheEnabled && !isRaster()) {
-            getCacheControl().saveCache(image);
-        }
-    }
-
-    public void saveNewCache() {
-        if (CacheControl.cacheEnabled) {
-            getCacheControl().deleteCacheFile();
-            for (GeorefImage image : images)
-                getCacheControl().saveCache(image);
-        }
-    }
-
-    public CacheControl getCacheControl() {
-        if (cacheControl == null)
-            cacheControl = new CacheControl(this);
-        return cacheControl;
     }
 
@@ -642,3 +594,37 @@
     }
 
+    public GeorefImage getImage(int index) {
+        imagesLock.lock();
+        GeorefImage img = null;
+        try {
+            img = this.images.get(index);
+        } catch (ArrayIndexOutOfBoundsException e) {
+            e.printStackTrace(System.out);
+        }
+        imagesLock.unlock();
+        return img;
+    }
+    
+    public Vector<GeorefImage> getImages() {
+        return this.images;
+    }
+    
+    public void addImage(GeorefImage img) {
+        imagesLock.lock();
+        this.images.add(img);
+        imagesLock.unlock();
+    }
+    
+    public void setImages(Vector<GeorefImage> images) {
+        imagesLock.lock();
+        this.images = images;
+        imagesLock.unlock();
+    }
+    
+    public void clearImages() {
+        imagesLock.lock();
+        this.images.clear();
+        imagesLock.unlock();
+    }
+
 }
