changeset 11744:141c4f62924b

7081580: Specification for MouseInfo.getNumberOfButtons() doesn't contain info about "awt.mouse.numButtons" Reviewed-by: serb, ant
author ssadetsky
date Thu, 09 Apr 2015 18:09:55 +0400
parents ffe817b77f6a
children 79e1488924cd
files src/java.desktop/share/classes/java/awt/MouseInfo.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/share/classes/java/awt/MouseInfo.java	Thu Apr 09 17:41:08 2015 +0400
+++ b/src/java.desktop/share/classes/java/awt/MouseInfo.java	Thu Apr 09 18:09:55 2015 +0400
@@ -113,9 +113,13 @@
     /**
      * Returns the number of buttons on the mouse.
      * On systems without a mouse, returns <code>-1</code>.
+     * The number of buttons is obtained from the AWT Toolkit
+     * by requesting the {@code "awt.mouse.numButtons"} desktop property
+     * which is set by the underlying native platform.
      *
      * @exception HeadlessException if GraphicsEnvironment.isHeadless() returns true
      * @return number of buttons on the mouse
+     * @see Toolkit#getDesktopProperty
      * @since 1.5
      */
     public static int getNumberOfButtons() throws HeadlessException {