Revision 30187 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/view/toolListeners/InfoListener.java
InfoListener.java | ||
---|---|---|
43 | 43 |
import java.awt.Image; |
44 | 44 |
import java.awt.Point; |
45 | 45 |
import java.awt.geom.Point2D; |
46 |
import java.util.Iterator; |
|
46 | 47 |
import java.util.Vector; |
47 | 48 |
|
48 | 49 |
import javax.swing.JDialog; |
... | ... | |
232 | 233 |
InfoByPoint layer = (InfoByPoint) laCapa; |
233 | 234 |
// text = layer.getInfo(imagePoint, tol); |
234 | 235 |
// items[i] = new StringXMLItem(text); |
235 |
items[i] = layer.getInfo(imagePoint, tol, null)[0]; |
|
236 |
numLayersInfoable++; |
|
237 |
} catch (DataException e) { |
|
238 |
throw new BehaviorException("No se pudo procesar la capa", |
|
239 |
e); |
|
240 |
} catch (LoadLayerException e) { |
|
241 |
throw new BehaviorException("No se pudo procesar la capa", |
|
242 |
e); |
|
243 |
} |
|
236 |
|
|
237 |
//TODO:jcarrasco Adapt this to the new infoByPoint |
|
238 |
// items[i] = layer.getInfo(imagePoint, tol, null)[0]; |
|
239 |
// numLayersInfoable++; |
|
240 |
// } catch (DataException e) { |
|
241 |
// throw new BehaviorException("No se pudo procesar la capa", |
|
242 |
// e); |
|
243 |
// } catch (LoadLayerException e) { |
|
244 |
// throw new BehaviorException("No se pudo procesar la capa", |
|
245 |
// e); |
|
246 |
} finally {} |
|
244 | 247 |
} |
245 | 248 |
} |
246 | 249 |
|
... | ... | |
323 | 326 |
if (laCapa instanceof InfoByPoint) { |
324 | 327 |
try { |
325 | 328 |
InfoByPoint layer = (InfoByPoint) laCapa; |
326 |
aux = layer.getInfo(imagePoint, tol, null); |
|
327 |
for(int j = 0; j < aux.length; j++){ |
|
328 |
itemsVector.add(aux[j]); |
|
329 |
numLayersInfoable++; |
|
330 |
} |
|
331 |
} catch (DataException e) { |
|
332 |
throw new BehaviorException("Processing layer",e); |
|
333 |
} catch (LoadLayerException e) { |
|
334 |
throw new BehaviorException("No se pudo procesar la capa", |
|
335 |
e); |
|
336 |
} |
|
329 |
//TODO: jcarrasco Adapt it to the new layer.getInfo() |
|
330 |
//aux = layer.getInfo(imagePoint, tol, null); |
|
331 |
// for(int j = 0; j < aux.length; j++){ |
|
332 |
// itemsVector.add(aux[j]); |
|
333 |
// numLayersInfoable++; |
|
334 |
// } |
|
335 |
// } catch (DataException e) { |
|
336 |
// throw new BehaviorException("Processing layer",e); |
|
337 |
// } catch (LoadLayerException e) { |
|
338 |
// throw new BehaviorException("No se pudo procesar la capa", |
|
339 |
// e); |
|
340 |
} finally{} |
|
337 | 341 |
} |
338 | 342 |
} |
339 | 343 |
final XMLItem[] items = (XMLItem[])itemsVector.toArray(new XMLItem[0]); |
... | ... | |
411 | 415 |
if (laCapa instanceof InfoByPoint) { |
412 | 416 |
try { |
413 | 417 |
InfoByPoint layer = (InfoByPoint) laCapa; |
414 |
if (!(laCapa.getParentLayer().isActive())){ |
|
415 |
aux = layer.getInfo(imagePoint, tol, null); |
|
416 |
for(int j = 0; j < aux.length; j++){ |
|
417 |
itemsVector.add(aux[j]); |
|
418 |
numLayersInfoable++; |
|
419 |
} |
|
420 |
} |
|
421 |
} catch (DataException e) { |
|
422 |
throw new BehaviorException("Processing layer",e); |
|
423 |
} catch (LoadLayerException e) { |
|
424 |
throw new BehaviorException("No se pudo procesar la capa", |
|
425 |
e); |
|
426 |
} |
|
418 |
// if (!(laCapa.getParentLayer().isActive())){ |
|
419 |
//TODO: jcarrasco Adapt it to the new layer.getInfo() |
|
420 |
//Iterator it = layer.getInfo(imagePoint, tol, null); |
|
421 |
// while(it.hasNext()){ |
|
422 |
// |
|
423 |
// } |
|
424 |
// for(int j = 0; j < aux.length; j++){ |
|
425 |
// itemsVector.add(aux[j]); |
|
426 |
// numLayersInfoable++; |
|
427 |
// } |
|
428 |
// } |
|
429 |
// } catch (DataException e) { |
|
430 |
// throw new BehaviorException("Processing layer",e); |
|
431 |
// } catch (LoadLayerException e) { |
|
432 |
// throw new BehaviorException("No se pudo procesar la capa", |
|
433 |
// e); |
|
434 |
} finally{} |
|
427 | 435 |
} |
428 | 436 |
} |
429 | 437 |
final XMLItem[] items = (XMLItem[])itemsVector.toArray(new XMLItem[0]); |
Also available in: Unified diff