Revision 652 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/DefaultStrategy.java
DefaultStrategy.java | ||
---|---|---|
10 | 10 |
import org.apache.log4j.Logger; |
11 | 11 |
|
12 | 12 |
import com.hardcode.driverManager.DriverLoadException; |
13 |
import com.hardcode.gdbms.engine.data.DriverException;
|
|
13 |
import com.iver.cit.gvsig.fmap.DriverException;
|
|
14 | 14 |
import com.iver.cit.gvsig.fmap.ViewPort; |
15 | 15 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
16 | 16 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
... | ... | |
48 | 48 |
/** |
49 | 49 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#queryByRect(java.awt.geom.Rectangle2D) |
50 | 50 |
*/ |
51 |
public BitSet queryByRect(Rectangle2D rect) throws DriverIOException {
|
|
51 |
public BitSet queryByRect(Rectangle2D rect) throws DriverException { |
|
52 | 52 |
QueryByRectVisitor visitor = new QueryByRectVisitor(); |
53 | 53 |
visitor.setRect(rect); |
54 | 54 |
process(visitor); |
... | ... | |
70 | 70 |
* int) |
71 | 71 |
*/ |
72 | 72 |
public BitSet queryByShape(IGeometry g, int relationship) |
73 |
throws DriverIOException {
|
|
73 |
throws DriverException { |
|
74 | 74 |
QueryByShapeVisitor visitor = new QueryByShapeVisitor(); |
75 | 75 |
visitor.setRelationShip(relationship); |
76 | 76 |
visitor.setShape(g); |
... | ... | |
109 | 109 |
*/ |
110 | 110 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, |
111 | 111 |
Cancellable cancel) |
112 |
throws DriverIOException, DriverLoadException, DriverException { |
|
112 |
throws DriverException { |
|
113 |
try{ |
|
113 | 114 |
VectorialAdapter adapter = ((SingleLayer) capa).getSource(); |
114 | 115 |
logger.debug("adapter.start()"); |
115 | 116 |
adapter.start(); |
... | ... | |
146 | 147 |
adapter.stop(); |
147 | 148 |
|
148 | 149 |
System.out.println(t2 - t1); |
150 |
|
|
151 |
}catch(DriverIOException e){ |
|
152 |
throw new DriverException(e); |
|
153 |
} |
|
149 | 154 |
} |
150 | 155 |
|
151 | 156 |
/** |
... | ... | |
160 | 165 |
/** |
161 | 166 |
* @see com.iver.cit.gvsig.fmap.operations.LayerOperations#getFullExtent() |
162 | 167 |
*/ |
163 |
public Rectangle2D getFullExtent() throws DriverIOException {
|
|
168 |
public Rectangle2D getFullExtent() throws DriverException { |
|
164 | 169 |
return null; |
165 | 170 |
} |
166 | 171 |
|
... | ... | |
176 | 181 |
* com.iver.cit.gvsig.fmap.operations.selection.VectorialSubSet) |
177 | 182 |
*/ |
178 | 183 |
public void process(FeatureVisitor visitor, BitSet subset) |
179 |
throws DriverIOException { |
|
184 |
throws DriverException { |
|
185 |
try{ |
|
180 | 186 |
logger.debug("visitor.start()"); |
181 | 187 |
|
182 | 188 |
if (visitor.start(capa)) { |
... | ... | |
191 | 197 |
logger.debug("visitor.stop()"); |
192 | 198 |
visitor.stop(capa); |
193 | 199 |
} |
200 |
}catch(DriverIOException e){ |
|
201 |
throw new DriverException(e); |
|
194 | 202 |
} |
203 |
} |
|
195 | 204 |
|
196 | 205 |
/** |
197 | 206 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#process(com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor) |
198 | 207 |
*/ |
199 |
public void process(FeatureVisitor visitor) throws DriverIOException { |
|
208 |
public void process(FeatureVisitor visitor) throws DriverException { |
|
209 |
try{ |
|
200 | 210 |
logger.debug("visitor.start()"); |
201 | 211 |
|
202 | 212 |
if (visitor.start(capa)) { |
... | ... | |
209 | 219 |
logger.debug("visitor.stop()"); |
210 | 220 |
visitor.stop(capa); |
211 | 221 |
} |
222 |
}catch(DriverIOException e){ |
|
223 |
throw new DriverException(e); |
|
224 |
} |
|
212 | 225 |
} |
213 | 226 |
|
214 | 227 |
/** |
... | ... | |
216 | 229 |
* double) |
217 | 230 |
*/ |
218 | 231 |
public BitSet queryByPoint(QueriedPoint p, double tolerance) |
219 |
throws DriverIOException {
|
|
232 |
throws DriverException { |
|
220 | 233 |
QueryByPointVisitor visitor = new QueryByPointVisitor(); |
221 | 234 |
visitor.setLayer(capa); |
222 | 235 |
visitor.setTolerance(tolerance); |
... | ... | |
230 | 243 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#print(java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
231 | 244 |
*/ |
232 | 245 |
public void print(Graphics2D g, ViewPort viewPort, Cancellable cancel) |
233 |
throws DriverIOException, DriverLoadException, DriverException {
|
|
246 |
throws DriverException { |
|
234 | 247 |
draw(null, g, viewPort, cancel); // Quiero ejecutar el draw del padre, que es el que va sin acelaraci?n!! |
235 | 248 |
} |
236 | 249 |
} |
Also available in: Unified diff