Revision 20098 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/toolListeners/InfoListener.java

View differences:

InfoListener.java
78 78
import com.iver.utiles.xmlViewer.XMLContent;
79 79

  
80 80
/**
81
 * DOCUMENT ME!
81
 * <p>Listener that looks for alphanumeric information at the point selected by one click of any mouse's button,
82
 *   in the active layers of the associated <code>MapControl</code>, and displays that alphanumeric data on a
83
 *   {@link FInfoDialog FInfoDialog} dialog.</p>
82 84
 *
83 85
 * @author Vicente Caballero Navarro
84 86
 */
85 87
public class InfoListener implements PointListener {
86

  
88
	/**
89
	 * Object used to log messages for this listener.
90
	 */
87 91
	private static Logger logger = Logger.getLogger(InfoListener.class
88 92
			.getName());
89 93

  
94
	/**
95
	 * The image to display when the cursor is active.
96
	 */
90 97
	private final Image img = PluginServices.getIconTheme().get("cursor-query-information").getImage();
91
	
92 98

  
99
	/**
100
	 * The cursor used to work with this tool listener.
101
	 * 
102
	 * @see #getCursor()
103
	 */
93 104
	private Cursor cur = Toolkit.getDefaultToolkit().createCustomCursor(img,
94 105
			new Point(16, 16), "");
95 106

  
107
	/**
108
	 * Reference to the <code>MapControl</code> object that uses.
109
	 */
96 110
	private MapControl mapCtrl;
111

  
112
	/**
113
	 * Radius as tolerance around the selected point, the area will be used to look for information.
114
	 */
97 115
	private static int TOL=7;
98 116

  
99 117
	/**
100
	 * Crea un nuevo InfoListener: Herramamienta que obtiene la informacion alfanumerica asociada a una feature
101
	 * de una capa en un punto determinado.
102
	 *
103
	 * Creates a new InfoListener: Tool that gets the alfanumeric information of a feature identified by a point.
104
	 *
105
	 * @param mc
118
	 * <p>Creates a new <code>InfoListener</code> object.</p>
119
	 * 
120
	 * @param mc the <code>MapControl</code> where will be applied the changes
106 121
	 */
107 122
	public InfoListener(MapControl mc) {
108 123
		this.mapCtrl = mc;
109 124
	}
110 125

  
111 126
	/**
112
	 * When the users click over the view the point is caught and handel in this method, which will look
113
	 * for alfanumeric information at that feature in the active layers.
114
	 * @param event
127
	 * When user clicks on the associated <code>MapControl</code>'s view, the point is caught and handled by this method,
128
	 *  which will look for alphanumeric information in features at that position in the active layers.
129
	 * 
130
	 * @param event mouse event with the coordinates of the point pressed
115 131
	 *
116
	 * @throws DriverIOException
132
	 * @throws BehaviorException will be thrown when fails this process
117 133
	 * @deprecated
118 134
	 * @see com.iver.cit.gvsig.fmap.tools.Listeners.PointListener#point(com.iver.cit.gvsig.fmap.tools.Events.PointEvent)
119 135
	 */
......
286 302
	}
287 303

  
288 304
	/**
289
	 * When the users click over the view the point is caught and handel in this method, which will look
290
	 * for alfanumeric information at that feature in the active layers.
291
	 * @param event
305
	 * When user clicks on the associated <code>MapControl</code>'s view, the point is caught and handled by this method, which will look
306
	 * for alphanumeric information in features at that position in the active layers.
307
	 * 
308
	 * @param event mouse event with the coordinates of the point pressed
292 309
	 *
293
	 * @throws DriverIOException
310
	 * @throws BehaviorException will be thrown when fails this process
294 311
	 * @deprecated
295 312
	 * @see com.iver.cit.gvsig.fmap.tools.Listeners.PointListener#point(com.iver.cit.gvsig.fmap.tools.Events.PointEvent)
296 313
	 */
......
379 396
			}
380 397
		}
381 398
	}
382
	/**
383
	 * When the users click over the view the point is caught and handled in this method, which will look
384
	 * for alfanumeric information at that feature in the active layers.
385
	 * @param event
399

  
400
	/*
401
	 * (To use the old info tool, use again the point2 method!)
386 402
	 *
387
	 * To use the old info tool, use again the point2 method!
388
	 * @throws BehaviorException
403
	 * @see com.iver.cit.gvsig.fmap.tools.Listeners.PointListener#point(com.iver.cit.gvsig.fmap.tools.Events.PointEvent)
389 404
	 */
390 405
	public void point(PointEvent event) throws BehaviorException {
391 406

  
......
447 462
		}
448 463
	}
449 464

  
450
	/**
465
	/*
466
	 * (non-Javadoc)
451 467
	 * @see com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener#getCursor()
452 468
	 */
453 469
	public Cursor getCursor() {
454 470
		return cur;
455 471
	}
456 472

  
457
	/**
473
	/*
474
	 * (non-Javadoc)
458 475
	 * @see com.iver.cit.gvsig.fmap.tools.Listeners.ToolListener#cancelDrawing()
459 476
	 */
460 477
	public boolean cancelDrawing() {
461 478
		return false;
462 479
	}
463 480

  
464

  
481
	/*
482
	 * (non-Javadoc)
483
	 * @see com.iver.cit.gvsig.fmap.tools.Listeners.PointListener#pointDoubleClick(com.iver.cit.gvsig.fmap.tools.Events.PointEvent)
484
	 */
465 485
	public void pointDoubleClick(PointEvent event) throws BehaviorException {
466 486
		// TODO Auto-generated method stub
467 487

  

Also available in: Unified diff