Revision 21299 branches/v2_0_0_prep/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/toolListeners/InfoListener.java

View differences:

InfoListener.java
47 47
import java.awt.geom.Point2D;
48 48
import java.util.Vector;
49 49

  
50
import javax.swing.ImageIcon;
51 50
import javax.swing.JDialog;
52 51
import javax.swing.tree.DefaultMutableTreeNode;
53 52
import javax.swing.tree.DefaultTreeModel;
54 53
import javax.swing.tree.TreePath;
55 54

  
56 55
import org.apache.log4j.Logger;
57
import org.gvsig.fmap.drivers.exceptions.VisitorException;
58
import org.gvsig.fmap.drivers.reading.DriverIOException;
56
import org.gvsig.data.ReadException;
57
import org.gvsig.data.vectorial.FeatureCollection;
58
import org.gvsig.data.vectorial.FeatureStore;
59 59
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
60 60
import org.gvsig.fmap.mapcontext.layers.FBitSet;
61 61
import org.gvsig.fmap.mapcontext.layers.FLayer;
......
70 70
import org.xml.sax.ContentHandler;
71 71
import org.xml.sax.SAXException;
72 72

  
73
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
74 73
import com.iver.andami.PluginServices;
75 74
import com.iver.andami.messages.NotificationManager;
76 75
import com.iver.cit.gvsig.project.documents.view.info.gui.FInfoDialog;
......
98 97

  
99 98
	/**
100 99
	 * The cursor used to work with this tool listener.
101
	 * 
100
	 *
102 101
	 * @see #getCursor()
103 102
	 */
104 103
	private Cursor cur = Toolkit.getDefaultToolkit().createCustomCursor(img,
......
116 115

  
117 116
	/**
118 117
	 * <p>Creates a new <code>InfoListener</code> object.</p>
119
	 * 
118
	 *
120 119
	 * @param mc the <code>MapControl</code> where will be applied the changes
121 120
	 */
122 121
	public InfoListener(MapControl mc) {
......
126 125
	/**
127 126
	 * When user clicks on the associated <code>MapControl</code>'s view, the point is caught and handled by this method,
128 127
	 *  which will look for alphanumeric information in features at that position in the active layers.
129
	 * 
128
	 *
130 129
	 * @param event mouse event with the coordinates of the point pressed
131 130
	 *
132 131
	 * @throws BehaviorException will be thrown when fails this process
......
153 152
            if (laCapa instanceof FLyrVect)
154 153
            {
155 154
                FLyrVect lyrVect = (FLyrVect) laCapa;
156
                FBitSet newBitSet;
155
                FeatureCollection newSelection;
157 156
                try {
158
                    newBitSet = lyrVect.queryByPoint(pReal, tol);
159
                    items[i] = new VectorialXMLItem(newBitSet, laCapa);
157
                    newSelection = lyrVect.queryByPoint(pReal, tol);
158
                    items[i] = new VectorialXMLItem(newSelection, laCapa);
160 159
                    numLayersInfoable++;
161
                } catch (ReadDriverException e) {
160
                } catch (ReadException e) {
162 161
                    e.printStackTrace();
163 162
                    throw new BehaviorException("Fallo al consultar " + lyrVect.getName());
164
                } catch (VisitorException e) {
165
                	 e.printStackTrace();
166
                     throw new BehaviorException("Fallo al consultar " + lyrVect.getName());
167
				}
163
                }
168 164

  
169 165
			}
170 166
			// TODO: PROVISIONAL PARA LA CAPA WMS
......
237 233
//					items[i] = new StringXMLItem(text);
238 234
					items[i] = layer.getInfo(imagePoint, tol, null)[0];
239 235
					numLayersInfoable++;
240
				} catch (ReadDriverException e) {
236
				} catch (ReadException e) {
241 237
					throw new BehaviorException("No se pudo procesar la capa",
242 238
							e);
243
				} catch (VisitorException e) {
244
					throw new BehaviorException("No se pudo procesar la capa",
245
							e);
246 239
				} catch (LoadLayerException e) {
247 240
					throw new BehaviorException("No se pudo procesar la capa",
248 241
							e);
......
304 297
	/**
305 298
	 * When user clicks on the associated <code>MapControl</code>'s view, the point is caught and handled by this method, which will look
306 299
	 * for alphanumeric information in features at that position in the active layers.
307
	 * 
300
	 *
308 301
	 * @param event mouse event with the coordinates of the point pressed
309 302
	 *
310 303
	 * @throws BehaviorException will be thrown when fails this process
......
334 327
						itemsVector.add(aux[j]);
335 328
						numLayersInfoable++;
336 329
					}
337
				} catch (ReadDriverException e) {
330
				} catch (ReadException e) {
338 331
					throw new BehaviorException("Processing layer",e);
339
				} catch (VisitorException e) {
340
					throw new BehaviorException("Processing layer",e);
341 332
				} catch (LoadLayerException e) {
342 333
					throw new BehaviorException("No se pudo procesar la capa",
343 334
							e);
......
426 417
							numLayersInfoable++;
427 418
						}
428 419
					}
429
				} catch (ReadDriverException e) {
420
				} catch (ReadException e) {
430 421
					throw new BehaviorException("Processing layer",e);
431
				} catch (VisitorException e) {
432
					throw new BehaviorException("Processing layer",e);
433 422
				} catch (LoadLayerException e) {
434 423
					throw new BehaviorException("No se pudo procesar la capa",
435 424
							e);

Also available in: Unified diff