Lines 245-250
Link Here
|
245 |
|
245 |
|
246 |
/** |
246 |
/** |
247 |
* Adds the listener to the collection of listeners who will |
247 |
* Adds the listener to the collection of listeners who will |
|
|
248 |
* be notified when the platform-specific context menu trigger |
249 |
* has occurred, by sending it one of the messages defined in |
250 |
* the <code>MenuDetectListener</code> interface. |
251 |
* |
252 |
* @param listener the listener which should be notified |
253 |
* |
254 |
* @exception IllegalArgumentException <ul> |
255 |
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li> |
256 |
* </ul> |
257 |
* @exception SWTException <ul> |
258 |
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
259 |
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
260 |
* </ul> |
261 |
* |
262 |
* @see MenuDetectListener |
263 |
* @see #removeMenuDetectListener |
264 |
* |
265 |
* @since 3.3 |
266 |
*/ |
267 |
public void addMenuDetectListener (MenuDetectListener listener) { |
268 |
checkWidget (); |
269 |
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); |
270 |
TypedListener typedListener = new TypedListener (listener); |
271 |
addListener (SWT.MenuDetect, typedListener); |
272 |
} |
273 |
|
274 |
/** |
275 |
* Adds the listener to the collection of listeners who will |
248 |
* be notified when mouse buttons are pressed and released, by sending |
276 |
* be notified when mouse buttons are pressed and released, by sending |
249 |
* it one of the messages defined in the <code>MouseListener</code> |
277 |
* it one of the messages defined in the <code>MouseListener</code> |
250 |
* interface. |
278 |
* interface. |
Lines 327-332
Link Here
|
327 |
|
355 |
|
328 |
/** |
356 |
/** |
329 |
* Adds the listener to the collection of listeners who will |
357 |
* Adds the listener to the collection of listeners who will |
|
|
358 |
* be notified when the mouse wheel is scrolled, by sending |
359 |
* it one of the messages defined in the |
360 |
* <code>MouseWheelListener</code> interface. |
361 |
* |
362 |
* @param listener the listener which should be notified |
363 |
* |
364 |
* @exception IllegalArgumentException <ul> |
365 |
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li> |
366 |
* </ul> |
367 |
* @exception SWTException <ul> |
368 |
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
369 |
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
370 |
* </ul> |
371 |
* |
372 |
* @see MouseWheelListener |
373 |
* @see #removeMouseWheelListener |
374 |
* |
375 |
* @since 3.3 |
376 |
*/ |
377 |
public void addMouseWheelListener (MouseWheelListener listener) { |
378 |
checkWidget (); |
379 |
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); |
380 |
TypedListener typedListener = new TypedListener (listener); |
381 |
addListener (SWT.MouseWheel, typedListener); |
382 |
} |
383 |
|
384 |
/** |
385 |
* Adds the listener to the collection of listeners who will |
330 |
* be notified when the receiver needs to be painted, by sending it |
386 |
* be notified when the receiver needs to be painted, by sending it |
331 |
* one of the messages defined in the <code>PaintListener</code> |
387 |
* one of the messages defined in the <code>PaintListener</code> |
332 |
* interface. |
388 |
* interface. |
Lines 2047-2052
Link Here
|
2047 |
|
2103 |
|
2048 |
/** |
2104 |
/** |
2049 |
* Removes the listener from the collection of listeners who will |
2105 |
* Removes the listener from the collection of listeners who will |
|
|
2106 |
* be notified when the platform-secific context menu trigger has |
2107 |
* occurred. |
2108 |
* |
2109 |
* @param listener the listener which should no longer be notified |
2110 |
* |
2111 |
* @exception IllegalArgumentException <ul> |
2112 |
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li> |
2113 |
* </ul> |
2114 |
* @exception SWTException <ul> |
2115 |
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
2116 |
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
2117 |
* </ul> |
2118 |
* |
2119 |
* @see MenuDetectListener |
2120 |
* @see #addMenuDetectListener |
2121 |
* |
2122 |
* @since 3.3 |
2123 |
*/ |
2124 |
public void removeMenuDetectListener (MenuDetectListener listener) { |
2125 |
checkWidget (); |
2126 |
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); |
2127 |
if (eventTable == null) return; |
2128 |
eventTable.unhook (SWT.MenuDetect, listener); |
2129 |
} |
2130 |
|
2131 |
/** |
2132 |
* Removes the listener from the collection of listeners who will |
2050 |
* be notified when the mouse passes or hovers over controls. |
2133 |
* be notified when the mouse passes or hovers over controls. |
2051 |
* |
2134 |
* |
2052 |
* @param listener the listener which should no longer be notified |
2135 |
* @param listener the listener which should no longer be notified |
Lines 2123-2128
Link Here
|
2123 |
|
2206 |
|
2124 |
/** |
2207 |
/** |
2125 |
* Removes the listener from the collection of listeners who will |
2208 |
* Removes the listener from the collection of listeners who will |
|
|
2209 |
* be notified when the mouse wheel is scrolled. |
2210 |
* |
2211 |
* @param listener the listener which should no longer be notified |
2212 |
* |
2213 |
* @exception IllegalArgumentException <ul> |
2214 |
* <li>ERROR_NULL_ARGUMENT - if the listener is null</li> |
2215 |
* </ul> |
2216 |
* @exception SWTException <ul> |
2217 |
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
2218 |
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
2219 |
* </ul> |
2220 |
* |
2221 |
* @see MouseWheelListener |
2222 |
* @see #addMouseWheelListener |
2223 |
* |
2224 |
* @since 3.3 |
2225 |
*/ |
2226 |
public void removeMouseWheelListener (MouseWheelListener listener) { |
2227 |
checkWidget (); |
2228 |
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); |
2229 |
if (eventTable == null) return; |
2230 |
eventTable.unhook (SWT.MouseWheel, listener); |
2231 |
} |
2232 |
|
2233 |
/** |
2234 |
* Removes the listener from the collection of listeners who will |
2126 |
* be notified when the receiver needs to be painted. |
2235 |
* be notified when the receiver needs to be painted. |
2127 |
* |
2236 |
* |
2128 |
* @param listener the listener which should no longer be notified |
2237 |
* @param listener the listener which should no longer be notified |