Revision 308
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/MemoryShapeInfo.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
|
|
3 |
package com.iver.cit.gvsig.fmap.operations.strategies; |
|
4 |
|
|
5 |
import java.awt.geom.Rectangle2D; |
|
6 |
|
|
7 |
public class MemoryShapeInfo implements ShapeInfo { |
|
8 |
|
|
9 |
/** |
|
10 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#addShapeInfo(java.awt.geom.Rectangle2D, int) |
|
11 |
*/ |
|
12 |
public void addShapeInfo(Rectangle2D boundingBox, int type) { |
|
13 |
} |
|
14 |
|
|
15 |
/** |
|
16 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#addShapeInfo(int, java.awt.geom.Rectangle2D, int) |
|
17 |
*/ |
|
18 |
public void addShapeInfo(int index, Rectangle2D boundingBox, int type) throws ArrayIndexOutOfBoundsException { |
|
19 |
} |
|
20 |
|
|
21 |
/** |
|
22 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#getBoundingBox(int) |
|
23 |
*/ |
|
24 |
public Rectangle2D getBoundingBox(int index) { |
|
25 |
return null; |
|
26 |
} |
|
27 |
|
|
28 |
/** |
|
29 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#getType(int) |
|
30 |
*/ |
|
31 |
public int getType(int index) { |
|
32 |
return 0; |
|
33 |
} |
|
34 |
} |
|
0 | 35 |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/FirstStrategy.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
|
|
3 |
package com.iver.cit.gvsig.fmap.operations.strategies; |
|
4 |
|
|
5 |
import java.awt.Graphics2D; |
|
6 |
import java.awt.image.BufferedImage; |
|
7 |
|
|
8 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
9 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
10 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
|
11 |
import com.iver.cit.gvsig.fmap.operations.Cancellable; |
|
12 |
/** |
|
13 |
* Estrategia empleada para las capas vectoriales, que dibuja y guarda en un fichero el bounding box de cada shape junto con su tipo. No se deber? de dibujar dos veces un adaptador con esta estrateg?a |
|
14 |
*/ |
|
15 |
public class FirstStrategy extends DefaultStrategy { |
|
16 |
|
|
17 |
/** |
|
18 |
* @param capa |
|
19 |
*/ |
|
20 |
public FirstStrategy(FLyrVect capa) { |
|
21 |
super(capa); |
|
22 |
} |
|
23 |
|
|
24 |
/** |
|
25 |
* Dibuja metiendo en una estructura de datos para cada geometr?a que se dibuja |
|
26 |
* su boundingbox y su tipo |
|
27 |
*/ |
|
28 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel) |
|
29 |
throws DriverIOException { |
|
30 |
|
|
31 |
//TODO implementar |
|
32 |
} |
|
33 |
} |
|
0 | 34 |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/ShapeInfo.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
package com.iver.cit.gvsig.fmap.operations.strategies; |
|
3 |
|
|
4 |
import java.awt.geom.Rectangle2D; |
|
5 |
|
|
6 |
|
|
7 |
/** |
|
8 |
* Estructura de datos con la informaci?n relativa a las geometr?as de una |
|
9 |
* fuente de datos necesaria para acelerar el procesado de la capa |
|
10 |
*/ |
|
11 |
public interface ShapeInfo { |
|
12 |
/** |
|
13 |
* A?ade al final de la estructura de datos la informaci?n de una geometr?a |
|
14 |
* |
|
15 |
* @param boundingBox DOCUMENT ME! |
|
16 |
* @param type DOCUMENT ME! |
|
17 |
*/ |
|
18 |
void addShapeInfo(Rectangle2D boundingBox, int type); |
|
19 |
|
|
20 |
/** |
|
21 |
* Establece en la posici?n index-?sima de la estructura de datos la |
|
22 |
* informaci?n de una geometr?a |
|
23 |
* |
|
24 |
* @param index DOCUMENT ME! |
|
25 |
* @param boundingBox DOCUMENT ME! |
|
26 |
* @param type DOCUMENT ME! |
|
27 |
* |
|
28 |
* @throws ArrayIndexOutOfBoundsException Si se intenta establecer la informaci?n para una geometr?a que no existe |
|
29 |
*/ |
|
30 |
void addShapeInfo(int index, Rectangle2D boundingBox, int type) |
|
31 |
throws ArrayIndexOutOfBoundsException; |
|
32 |
|
|
33 |
/** |
|
34 |
* Obtiene el bounding box de la geometr?a index-?sima |
|
35 |
* |
|
36 |
* @param index DOCUMENT ME! |
|
37 |
* |
|
38 |
* @return DOCUMENT ME! |
|
39 |
*/ |
|
40 |
Rectangle2D getBoundingBox(int index); |
|
41 |
|
|
42 |
/** |
|
43 |
* Obtiene el tipo de la geometr?a index-?sima |
|
44 |
* |
|
45 |
* @param index DOCUMENT ME! |
|
46 |
* |
|
47 |
* @return DOCUMENT ME! |
|
48 |
*/ |
|
49 |
int getType(int index); |
|
50 |
} |
|
0 | 51 |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/DiskShapeInfo.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
|
|
3 |
package com.iver.cit.gvsig.fmap.operations.strategies; |
|
4 |
|
|
5 |
import java.awt.geom.Rectangle2D; |
|
6 |
|
|
7 |
public class DiskShapeInfo implements ShapeInfo { |
|
8 |
|
|
9 |
/** |
|
10 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#addShapeInfo(java.awt.geom.Rectangle2D, int) |
|
11 |
*/ |
|
12 |
public void addShapeInfo(Rectangle2D boundingBox, int type) { |
|
13 |
} |
|
14 |
|
|
15 |
/** |
|
16 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#getBoundingBox(int) |
|
17 |
*/ |
|
18 |
public Rectangle2D getBoundingBox(int index) { |
|
19 |
return null; |
|
20 |
} |
|
21 |
|
|
22 |
/** |
|
23 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#getType(int) |
|
24 |
*/ |
|
25 |
public int getType(int index) { |
|
26 |
return 0; |
|
27 |
} |
|
28 |
|
|
29 |
/** |
|
30 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.ShapeInfo#addShapeInfo(int, java.awt.geom.Rectangle2D, int) |
|
31 |
*/ |
|
32 |
public void addShapeInfo(int index, Rectangle2D boundingBox, int type) throws ArrayIndexOutOfBoundsException { |
|
33 |
} |
|
34 |
} |
|
0 | 35 |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/StrategyManager.java | ||
---|---|---|
4 | 4 |
|
5 | 5 |
import com.iver.cit.gvsig.fmap.drivers.BoundedShapes; |
6 | 6 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
7 |
import com.iver.cit.gvsig.fmap.layers.VectorialAdapter; |
|
7 | 8 |
|
8 | 9 |
|
9 | 10 |
public class StrategyManager { |
... | ... | |
17 | 18 |
return new DefaultStrategy(v); |
18 | 19 |
} |
19 | 20 |
} |
21 |
|
|
22 |
/** |
|
23 |
* Crea un ShapeInfo en memoria o en disco en funci?n de la memoria disponible |
|
24 |
*/ |
|
25 |
private static ShapeInfo createShapeInfo(VectorialAdapter adapter) { |
|
26 |
//TODO implementar bien |
|
27 |
return null; |
|
28 |
} |
|
20 | 29 |
} |
Also available in: Unified diff