Revision 1691 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/DefaultStrategy.java

View differences:

DefaultStrategy.java
48 48
import com.iver.cit.gvsig.fmap.drivers.DriverIOException;
49 49
import com.iver.cit.gvsig.fmap.drivers.VectorialFileDriver;
50 50
import com.iver.cit.gvsig.fmap.layers.FLayer;
51
import com.iver.cit.gvsig.fmap.layers.SelectableDataSource;
51 52
import com.iver.cit.gvsig.fmap.layers.VectorialAdapter;
52 53
import com.iver.cit.gvsig.fmap.layers.layerOperations.AlphanumericData;
53 54
import com.iver.cit.gvsig.fmap.layers.layerOperations.ClassifiableVectorial;
......
147 148
			adapter.start();
148 149

  
149 150
			logger.debug("getCapa().getRecordset().start()");
150
			((AlphanumericData) getCapa()).getRecordset().start();
151
			SelectableDataSource rsSel = ((AlphanumericData) getCapa()).getRecordset(); 
152
			if (rsSel != null)
153
			    rsSel.start();
151 154

  
152
			VectorialFileDriver driver = (VectorialFileDriver) adapter.getDriver();
153 155
			int sc;
154 156
			long t1 = System.currentTimeMillis();
155 157
			Rectangle2D extent = viewPort.getAdjustedExtent();
......
173 175
					break;
174 176
				}
175 177

  
178
				
176 179
				IGeometry geom = adapter.getShape(i);
177 180

  
178 181
				if (geom == null) {
......
186 189
				}
187 190

  
188 191
				VectorialLegend l = (VectorialLegend) ((ClassifiableVectorial) capa).getLegend();
189

  
192
				// if (geom.intersects(extent)) {
190 193
				if (geom.fastIntersects(extent.getMinX(), extent.getMinY(), 
191
				        extent.getWidth(), extent.getHeight())) {
194
				         extent.getWidth(), extent.getHeight())) {
192 195
					FSymbol symbol = l.getSymbol(i);
196
					
193 197
					geom.draw(g, viewPort, symbol);
194 198
				}
199
				/* else
200
				{
201
				    System.out.println("no pinto id=" + i);
202
				} */
195 203
			}
196 204

  
197 205
			logger.debug("getCapa().getRecordset().stop()");
198
			((AlphanumericData) getCapa()).getRecordset().stop();
206
			if (rsSel != null)
207
			    rsSel.stop();
199 208

  
200 209
			long t2 = System.currentTimeMillis();
201 210
			logger.debug("adapter.stop()");
......
233 242
	}
234 243

  
235 244
	/**
236
	 * @see com.iver.cit.gvsig.fmap.operations.LayerOperations#getFullExtent()
237
	 */
238
	public Rectangle2D getFullExtent() throws DriverException {
239
		return null;
240
	}
241

  
242
	/**
243 245
	 * @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#process(com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor,
244 246
	 * 		java.util.BitSet)
245 247
	 */

Also available in: Unified diff