summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java
diff options
context:
space:
mode:
authorDuong Nguyen <dnguyen>2008-01-31 23:46:46 +0000
committerDuong Nguyen <dnguyen>2008-01-31 23:46:46 +0000
commitaa5419e56e01885ca4c9df155e825d50244cd302 (patch)
treee5739923fbbd22a81d785d24db99bc1287c778c0 /bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java
parenta20b50f37993a2c9cacb239016558958f4a7c1bd (diff)
downloadeclipse.platform.swt-aa5419e56e01885ca4c9df155e825d50244cd302.tar.gz
eclipse.platform.swt-aa5419e56e01885ca4c9df155e825d50244cd302.tar.xz
eclipse.platform.swt-aa5419e56e01885ca4c9df155e825d50244cd302.zip
Bug 215388 - Add API to make the DropTarget more open
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java
index b240ffb31d..c2a6aca195 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Widget.java
@@ -464,6 +464,31 @@ public Display getDisplay () {
if (display == null) error (SWT.ERROR_WIDGET_DISPOSED);
return display;
}
+/**
+ * Returns an array of listeners who will be notified when an event
+ * of the given type occurs. The event type is one of the event constants
+ * defined in class <code>SWT</code>.
+ *
+ * @param eventType the type of event to listen for
+ * @return an array of listeners that will be notified when the event occurs
+ *
+ * @exception SWTException <ul>
+ * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
+ * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
+ * </ul>
+ *
+ * @see Listener
+ * @see SWT
+ * @see #addListener(int, Listener)
+ * @see #removeListener(int, Listener)
+ * @see #notifyListeners
+ *
+ * @since 3.4
+ */
+public Listener[] getListeners (int eventType) {
+ checkWidget();
+ return eventTable.getListeners(eventType);
+}
String getName () {
String string = getClass ().getName ();
int index = string.lastIndexOf ('.');