Adds the listener to the collection of listeners who will be notified when an event of the given type occurs. When the event does occur in the widget, the listener is notified by sending it the
handleEvent()
message. The event type is one of the event constants defined in class
SWT
.
@param eventType the type of event to listen for
@param listener the listener which should be notified when the event occurs
@exception IllegalArgumentException
- ERROR_NULL_ARGUMENT - if the listener is null
@exception SWTException
- ERROR_WIDGET_DISPOSED - if the receiver has been disposed
- ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
@see Listener
@see SWT
@see #getListeners(int)
@see #removeListener(int,Listener)
@see #notifyListeners