PointerInfo (Java SE 10 & JDK 10 )
- java.lang.Object
-
- java.awt.PointerInfo
-
public class PointerInfo extends Object
A class that describes the pointer position. It provides the
GraphicsDevicewhere the pointer is and thePointthat represents the coordinates of the pointer.Instances of this class should be obtained via
MouseInfo.getPointerInfo(). ThePointerInfoinstance is not updated dynamically as the mouse moves. To get the updated location, you must callMouseInfo.getPointerInfo()again.- Since:
- 1.5
- See Also:
MouseInfo.getPointerInfo()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphicsDevicegetDevice()Returns the
GraphicsDevicewhere the mouse pointer was at the moment thisPointerInfowas created.PointgetLocation()Returns the
Pointthat represents the coordinates of the pointer on the screen.
-
-
-
Method Detail
-
getDevice
public GraphicsDevice getDevice()
Returns the
GraphicsDevicewhere the mouse pointer was at the moment thisPointerInfowas created.- Returns:
GraphicsDevicecorresponding to the pointer- Since:
- 1.5
-
getLocation
public Point getLocation()
Returns the
Pointthat represents the coordinates of the pointer on the screen. SeeMouseInfo.getPointerInfo()for more information about coordinate calculation for multiscreen systems.- Returns:
- coordinates of mouse pointer
- Since:
- 1.5
- See Also:
MouseInfo,MouseInfo.getPointerInfo()
-
-
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2018, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.