diff options
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java | 14 | ||||
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/MenuDetectEvent.java | 22 |
2 files changed, 21 insertions, 15 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java index 3c8bf55320..2f3e1a0e8d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java @@ -33,7 +33,6 @@ import org.eclipse.swt.internal.*; * </p> * * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> - * @since 3.8 */ /* NOTE: @@ -536,6 +535,11 @@ public class SWT { * @see org.eclipse.swt.widgets.Display#addFilter * @see org.eclipse.swt.widgets.Event * + * @see org.eclipse.swt.widgets.Control#addMenuDetectListener + * @see org.eclipse.swt.widgets.TrayItem#addMenuDetectListener + * @see org.eclipse.swt.events.MenuDetectListener#menuDetected + * @see org.eclipse.swt.events.MenuDetectEvent + * * @since 3.0 */ public static final int MenuDetect = 35; @@ -1027,16 +1031,16 @@ public class SWT { public static final int TOUCHSTATE_UP = 1 << 2; /** - * Menu detect event detail value indicating that a context menu - * was requested by a mouse or other pointing device. + * MenuDetect event detail value indicating that a context menu + * was requested by a mouse or other pointing device (value is 1<<1). * * @since 3.8 */ public static final int MENU_MOUSE = 1 << 1; /** - * Menu detect event detail value indicating that a context menu - * was requested by a keyboard or other focus-based device. + * MenuDetect event detail value indicating that a context menu + * was requested by a keyboard or other focus-based device (value is 1<<2). * * @since 3.8 */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/MenuDetectEvent.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/MenuDetectEvent.java index 1fa5bc99d9..ac21b9c951 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/MenuDetectEvent.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/events/MenuDetectEvent.java @@ -26,14 +26,14 @@ import org.eclipse.swt.widgets.Event; public final class MenuDetectEvent extends TypedEvent { /** - * the display-relative x coordinate of the pointer - * at the time the context menu trigger occurred + * The display-relative x coordinate of the pointer + * at the time the context menu trigger occurred. */ public int x; /** - * the display-relative y coordinate of the pointer - * at the time the context menu trigger occurred + * The display-relative y coordinate of the pointer + * at the time the context menu trigger occurred. */ public int y; @@ -44,17 +44,17 @@ public final class MenuDetectEvent extends TypedEvent { public boolean doit; /** - * The event trigger type. + * The context menu trigger type. * <p><ul> - * <li>{@link org.eclipse.swt.SWT#CONTEXT_NONE}</li> * <li>{@link org.eclipse.swt.SWT#MENU_MOUSE}</li> * <li>{@link org.eclipse.swt.SWT#MENU_KEYBOARD}</li> * </ul></p> * - * A field indicating whether the event was triggered by a pointing device, - * such as a mouse, or by a focus-based device such as a keyboard. - * If the trigger was CONTEXT_FOCUS, then the application should provide - * new display-relative x and y coordinates based on the current + * A field indicating whether the context menu was triggered by a + * pointing device such as a mouse (indicated by <code>MENU_MOUSE</code>), + * or by a focus-based device such as a keyboard (<code>MENU_KEYBOARD</code>). + * If the trigger was <code>MENU_KEYBOARD</code>, then the application should + * provide new display-relative x and y coordinates based on the current * selection or the current focus. * * @since 3.8 @@ -75,6 +75,7 @@ public MenuDetectEvent(Event e) { this.x = e.x; this.y = e.y; this.doit = e.doit; + this.detail = e.detail; } /** @@ -89,6 +90,7 @@ public String toString() { + " x=" + x + " y=" + y + " doit=" + doit + + " detail=" + detail + "}"; } } |