java.awt
Class MouseInfo
java.lang.Object
java.awt.MouseInfo
public class MouseInfo
- extends Object
MouseInfo is a class containing utility functions for mouse information.
- Since:
- 1.5
Method Summary |
static int |
getNumberOfButtons()
Returns the number of mouse buttons, or -1 if no mouse is connected. |
static PointerInfo |
getPointerInfo()
Returns a PointerInfo object containing information about the current
location of the mouse pointer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MouseInfo
public MouseInfo()
getPointerInfo
public static PointerInfo getPointerInfo()
throws HeadlessException
- Returns a PointerInfo object containing information about the current
location of the mouse pointer
- Returns:
- a PointerInfo object.
- Throws:
HeadlessException
- if the current GraphicsEnvironment is headless.
getNumberOfButtons
public static int getNumberOfButtons()
throws HeadlessException
- Returns the number of mouse buttons, or -1 if no mouse is connected.
(mentioned in the 1.5 release notes)
- Returns:
- an integer number of buttons.
- Throws:
HeadlessException
- if the current GraphicsEnvironment is headless.