Revision 244
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java | ||
---|---|---|
12 | 12 |
import com.iver.cit.gvsig.fmap.XMLEntity; |
13 | 13 |
import com.iver.cit.gvsig.fmap.core.FGeometry; |
14 | 14 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
15 |
import com.iver.cit.gvsig.fmap.operations.Cancellable; |
|
15 | 16 |
import com.iver.cit.gvsig.fmap.operations.QueriedPoint; |
16 | 17 |
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor; |
17 | 18 |
import com.iver.cit.gvsig.fmap.operations.strategies.Strategy; |
... | ... | |
87 | 88 |
/** |
88 | 89 |
* @see com.iver.cit.gvsig.fmap.layers.LayerOperations#draw(java.awt.image.BufferedImage, java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
89 | 90 |
*/ |
90 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) throws DriverIOException { |
|
91 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel) throws DriverIOException {
|
|
91 | 92 |
Strategy strategy = StrategyManager.getStrategy(this); |
92 | 93 |
|
93 |
strategy.draw(image, g, viewPort); |
|
94 |
strategy.draw(image, g, viewPort, cancel);
|
|
94 | 95 |
} |
95 | 96 |
|
96 | 97 |
/** |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/ChildrenNotAllowedException.java | ||
---|---|---|
5 | 5 |
* Excepci?n lanzada cuando se intenta insertar una instancia de FLayer dentro |
6 | 6 |
* de una instancia de una capa que no es instancia de FLayers. |
7 | 7 |
*/ |
8 |
public class ChildrenNotAllowedException extends Exception { |
|
8 |
public class ChildrenNotAllowedException extends RuntimeException {
|
|
9 | 9 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLayers.java | ||
---|---|---|
5 | 5 |
import com.iver.cit.gvsig.fmap.XMLEntity; |
6 | 6 |
import com.iver.cit.gvsig.fmap.core.FGeometry; |
7 | 7 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
8 |
import com.iver.cit.gvsig.fmap.operations.Cancellable; |
|
8 | 9 |
import com.iver.cit.gvsig.fmap.operations.QueriedPoint; |
9 | 10 |
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor; |
10 | 11 |
|
... | ... | |
262 | 263 |
* @param image DOCUMENT ME! |
263 | 264 |
* @param g DOCUMENT ME! |
264 | 265 |
* @param viewPort DOCUMENT ME! |
266 |
* @param cancel |
|
265 | 267 |
* |
266 | 268 |
* @throws DriverIOException |
267 | 269 |
* |
268 | 270 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#draw(java.awt.image.BufferedImage, |
269 | 271 |
* java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
270 | 272 |
*/ |
271 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) |
|
273 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel)
|
|
272 | 274 |
throws DriverIOException { |
273 | 275 |
for (Iterator iter = layers.iterator(); iter.hasNext();) { |
274 | 276 |
LayerOperations capa = (LayerOperations) iter.next(); |
275 | 277 |
|
276 | 278 |
//TODO comprobar si la capa es visible |
277 | 279 |
// if (capa.isVisible()){ |
278 |
capa.draw(image, g, viewPort); |
|
280 |
capa.draw(image, g, viewPort, cancel);
|
|
279 | 281 |
|
280 | 282 |
// } |
281 | 283 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/ComplexRasterAdapter.java | ||
---|---|---|
11 | 11 |
import com.iver.cit.gvsig.fmap.core.FGeometry; |
12 | 12 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
13 | 13 |
import com.iver.cit.gvsig.fmap.drivers.RasterFileDriver; |
14 |
import com.iver.cit.gvsig.fmap.operations.Cancellable; |
|
14 | 15 |
import com.iver.cit.gvsig.fmap.operations.QueriedPoint; |
15 | 16 |
import com.iver.cit.gvsig.fmap.rendering.ColorRamp; |
16 | 17 |
|
... | ... | |
29 | 30 |
/** |
30 | 31 |
* @see com.iver.cit.gvsig.fmap.layers.LayerOperations#draw(java.awt.image.BufferedImage, java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
31 | 32 |
*/ |
32 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) throws DriverIOException { |
|
33 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel) throws DriverIOException {
|
|
33 | 34 |
} |
34 | 35 |
|
35 | 36 |
/** |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/WMSAdapter.java | ||
---|---|---|
9 | 9 |
import com.iver.cit.gvsig.fmap.ViewPort; |
10 | 10 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
11 | 11 |
import com.iver.cit.gvsig.fmap.drivers.wms.WMSDriver; |
12 |
import com.iver.cit.gvsig.fmap.operations.Cancellable; |
|
12 | 13 |
import com.iver.cit.gvsig.fmap.operations.QueriedPoint; |
13 | 14 |
public class WMSAdapter implements BaseRaster { |
14 | 15 |
private WMSDriver wmsDriver; |
... | ... | |
23 | 24 |
/** |
24 | 25 |
* @see com.iver.cit.gvsig.fmap.layers.LayerOperations#draw(java.awt.image.BufferedImage, java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
25 | 26 |
*/ |
26 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) throws DriverIOException { |
|
27 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel) throws DriverIOException {
|
|
27 | 28 |
} |
28 | 29 |
|
29 | 30 |
/** |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/LayerOperations.java | ||
---|---|---|
8 | 8 |
|
9 | 9 |
import com.iver.cit.gvsig.fmap.ViewPort; |
10 | 10 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
11 |
import com.iver.cit.gvsig.fmap.operations.Cancellable; |
|
11 | 12 |
public interface LayerOperations { |
12 | 13 |
/** |
13 | 14 |
* Obtiene la extensi?n completa de la capa |
... | ... | |
24 | 25 |
* @param image DOCUMENT ME! |
25 | 26 |
* @param g DOCUMENT ME! |
26 | 27 |
* @param viewPort DOCUMENT ME! |
28 |
* @param cancel |
|
27 | 29 |
* |
28 | 30 |
* @throws DriverIOException DOCUMENT ME! |
29 | 31 |
*/ |
30 |
void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) |
|
32 |
void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel)
|
|
31 | 33 |
throws DriverIOException; |
32 | 34 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/BaseRasterAdapter.java | ||
---|---|---|
8 | 8 |
|
9 | 9 |
import com.iver.cit.gvsig.fmap.ViewPort; |
10 | 10 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
11 |
import com.iver.cit.gvsig.fmap.operations.Cancellable; |
|
11 | 12 |
import com.iver.cit.gvsig.fmap.operations.QueriedPoint; |
12 | 13 |
|
13 | 14 |
public class BaseRasterAdapter implements BaseRaster { |
... | ... | |
23 | 24 |
/** |
24 | 25 |
* @see com.iver.cit.gvsig.fmap.layers.LayerOperations#draw(java.awt.image.BufferedImage, java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
25 | 26 |
*/ |
26 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) throws DriverIOException { |
|
27 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel) throws DriverIOException {
|
|
27 | 28 |
} |
28 | 29 |
|
29 | 30 |
/** |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/FMap.java | ||
---|---|---|
20 | 20 |
import com.iver.cit.gvsig.fmap.layers.LayerPath; |
21 | 21 |
import com.iver.cit.gvsig.fmap.layers.ProjectionMismatchException; |
22 | 22 |
import com.iver.cit.gvsig.fmap.layers.VectorialAdapter; |
23 |
import com.iver.cit.gvsig.fmap.operations.Cancellable; |
|
23 | 24 |
import com.iver.cit.gvsig.fmap.operations.selection.Record; |
24 | 25 |
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor; |
25 | 26 |
|
... | ... | |
284 | 285 |
* @see com.iver.cit.gvsig.fmap.operations.LayerOperations#draw(java.awt.image.BufferedImage, |
285 | 286 |
* java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
286 | 287 |
*/ |
288 |
public void draw(BufferedImage image, Graphics2D g, Cancellable cancel) |
|
289 |
throws DriverIOException { |
|
290 |
layers.draw(image, g, viewPort, cancel); |
|
291 |
} |
|
292 |
|
|
293 |
/** |
|
294 |
* DOCUMENT ME! |
|
295 |
* |
|
296 |
* @param image DOCUMENT ME! |
|
297 |
* @param g DOCUMENT ME! |
|
298 |
* @param viewPort DOCUMENT ME! |
|
299 |
* |
|
300 |
* @throws DriverIOException |
|
301 |
* |
|
302 |
* @see com.iver.cit.gvsig.fmap.operations.LayerOperations#draw(java.awt.image.BufferedImage, |
|
303 |
* java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
|
304 |
*/ |
|
287 | 305 |
public void draw(BufferedImage image, Graphics2D g) |
288 | 306 |
throws DriverIOException { |
289 |
layers.draw(image, g, viewPort); |
|
307 |
layers.draw(image, g, viewPort, new Cancellable() { |
|
308 |
/** |
|
309 |
* @see com.iver.cit.gvsig.fmap.operations.Cancellable#isCanceled() |
|
310 |
*/ |
|
311 |
public boolean isCanceled() { |
|
312 |
return false; |
|
313 |
} |
|
314 |
}); |
|
290 | 315 |
} |
316 |
|
|
291 | 317 |
/** |
292 | 318 |
* @return Returns the viewPort. |
293 | 319 |
*/ |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/DefaultStrategy.java | ||
---|---|---|
13 | 13 |
import com.iver.cit.gvsig.fmap.drivers.VectorialFileDriver; |
14 | 14 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
15 | 15 |
import com.iver.cit.gvsig.fmap.layers.VectorialAdapter; |
16 |
import com.iver.cit.gvsig.fmap.operations.Cancellable; |
|
16 | 17 |
import com.iver.cit.gvsig.fmap.operations.QueriedPoint; |
17 | 18 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
18 | 19 |
|
... | ... | |
82 | 83 |
* @see com.iver.cit.gvsig.fmap.operations.LayerOperations#draw(java.awt.image.BufferedImage, |
83 | 84 |
* java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
84 | 85 |
*/ |
85 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) |
|
86 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel)
|
|
86 | 87 |
throws DriverIOException { |
87 | 88 |
VectorialAdapter adapter = capa.getSource(); |
88 | 89 |
|
... | ... | |
97 | 98 |
sc = adapter.getShapeCount(); |
98 | 99 |
|
99 | 100 |
for (int i = 0; i < sc; i++) { |
101 |
if (cancel.isCanceled()) break; |
|
100 | 102 |
FGeometry geom = adapter.getShape(i); |
101 | 103 |
Legend l = capa.getLegend(geom.getType()); |
102 | 104 |
|
... | ... | |
167 | 169 |
/* (non-Javadoc) |
168 | 170 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#print(java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
169 | 171 |
*/ |
170 |
public void print(Graphics2D g, ViewPort viewPort) throws DriverIOException { |
|
171 |
draw(null, g, viewPort); // Quiero ejecutar el draw del padre, que es el que va sin acelaraci?n!! |
|
172 |
public void print(Graphics2D g, ViewPort viewPort, Cancellable cancel) throws DriverIOException {
|
|
173 |
draw(null, g, viewPort, cancel); // Quiero ejecutar el draw del padre, que es el que va sin acelaraci?n!!
|
|
172 | 174 |
|
173 | 175 |
} |
174 | 176 |
|
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/ShpStrategy.java | ||
---|---|---|
9 | 9 |
import java.awt.geom.Rectangle2D; |
10 | 10 |
import java.awt.image.BufferedImage; |
11 | 11 |
import java.io.IOException; |
12 |
import java.util.BitSet; |
|
13 | 12 |
|
14 | 13 |
import org.geotools.renderer.style.Style2D; |
15 | 14 |
|
... | ... | |
20 | 19 |
import com.iver.cit.gvsig.fmap.drivers.VectorialFileDriver; |
21 | 20 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
22 | 21 |
import com.iver.cit.gvsig.fmap.layers.VectorialAdapter; |
23 |
import com.iver.cit.gvsig.fmap.operations.QueriedPoint;
|
|
22 |
import com.iver.cit.gvsig.fmap.operations.Cancellable;
|
|
24 | 23 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
25 | 24 |
|
26 | 25 |
|
... | ... | |
114 | 113 |
|
115 | 114 |
System.out.println(t2 - t1); |
116 | 115 |
} |
117 |
public void print(Graphics2D g, ViewPort viewPort) throws DriverIOException { |
|
118 |
super.draw(null, g, viewPort); // Quiero ejecutar el draw del padre, que es el que va sin acelaraci?n!! |
|
116 |
public void print(Graphics2D g, ViewPort viewPort, Cancellable cancel) throws DriverIOException {
|
|
117 |
super.draw(null, g, viewPort, cancel); // Quiero ejecutar el draw del padre, que es el que va sin acelaraci?n!!
|
|
119 | 118 |
|
120 | 119 |
} |
121 | 120 |
|
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/Strategy.java | ||
---|---|---|
1 | 1 |
/* Generated by Together */ |
2 | 2 |
package com.iver.cit.gvsig.fmap.operations.strategies; |
3 | 3 |
|
4 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
5 |
import com.iver.cit.gvsig.fmap.core.FGeometry; |
|
6 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
7 |
import com.iver.cit.gvsig.fmap.operations.QueriedPoint; |
|
8 |
|
|
9 | 4 |
import java.awt.Graphics2D; |
10 |
import java.awt.geom.AffineTransform; |
|
11 | 5 |
import java.awt.geom.Rectangle2D; |
12 | 6 |
import java.awt.image.BufferedImage; |
13 |
|
|
14 | 7 |
import java.util.BitSet; |
15 | 8 |
|
16 |
import org.geotools.renderer.style.Style2D; |
|
9 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
10 |
import com.iver.cit.gvsig.fmap.core.FGeometry; |
|
11 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
12 |
import com.iver.cit.gvsig.fmap.operations.Cancellable; |
|
13 |
import com.iver.cit.gvsig.fmap.operations.QueriedPoint; |
|
17 | 14 |
|
18 | 15 |
|
19 | 16 |
/** |
... | ... | |
29 | 26 |
* @param image DOCUMENT ME! |
30 | 27 |
* @param g DOCUMENT ME! |
31 | 28 |
* @param viewPort DOCUMENT ME! |
29 |
* @param cancel |
|
32 | 30 |
* |
33 | 31 |
* @throws DriverIOException DOCUMENT ME! |
34 | 32 |
*/ |
35 |
void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) |
|
33 |
void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel)
|
|
36 | 34 |
throws DriverIOException; |
37 | 35 |
|
38 | 36 |
/** |
... | ... | |
46 | 44 |
* @param symbol DOCUMENT ME! |
47 | 45 |
* @param extent DOCUMENT ME! |
48 | 46 |
*/ |
49 |
void print(Graphics2D g, ViewPort viewPort) |
|
47 |
void print(Graphics2D g, ViewPort viewPort, Cancellable cancel)
|
|
50 | 48 |
throws DriverIOException; |
51 | 49 |
|
52 | 50 |
/** |
Also available in: Unified diff