java.awt
Class PointerInfo

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.PointerInfo

public class PointerInfo
extends Object sample code for java.lang.Object definition code for java.lang.Object

A class that describes the pointer position. It provides the GraphicsDevice where the pointer is and the Point that represents the coordinates of the pointer.

Instances of this class should be obtained via MouseInfo.getPointerInfo() sample code for java.awt.MouseInfo.getPointerInfo() definition code for java.awt.MouseInfo.getPointerInfo() . The PointerInfo instance is not updated dynamically as the mouse moves. To get the updated location, you must call MouseInfo.getPointerInfo() sample code for java.awt.MouseInfo.getPointerInfo() definition code for java.awt.MouseInfo.getPointerInfo() again.

Since:
1.5
See Also:
MouseInfo.getPointerInfo() sample code for java.awt.MouseInfo.getPointerInfo() definition code for java.awt.MouseInfo.getPointerInfo()

Method Summary
 GraphicsDevice sample code for java.awt.GraphicsDevice definition code for java.awt.GraphicsDevice getDevice sample code for java.awt.PointerInfo.getDevice() definition code for java.awt.PointerInfo.getDevice() ()
          Returns the GraphicsDevice where the mouse pointer was at the moment this PointerInfo was created.
 Point sample code for java.awt.Point definition code for java.awt.Point getLocation sample code for java.awt.PointerInfo.getLocation() definition code for java.awt.PointerInfo.getLocation() ()
          Returns the Point that represents the coordinates of the pointer on the screen.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Method Detail

getDevice sample code for java.awt.PointerInfo.getDevice() definition code for java.awt.PointerInfo.getDevice()

public GraphicsDevice sample code for java.awt.GraphicsDevice definition code for java.awt.GraphicsDevice  getDevice()
Returns the GraphicsDevice where the mouse pointer was at the moment this PointerInfo was created.

Returns:
GraphicsDevice corresponding to the pointer
Since:
1.5

getLocation sample code for java.awt.PointerInfo.getLocation() definition code for java.awt.PointerInfo.getLocation()

public Point sample code for java.awt.Point definition code for java.awt.Point  getLocation()
Returns the Point that represents the coordinates of the pointer on the screen. See MouseInfo.getPointerInfo() sample code for java.awt.MouseInfo.getPointerInfo() definition code for java.awt.MouseInfo.getPointerInfo() for more information about coordinate calculation for multiscreen systems.

Returns:
coordinates of mouse pointer
Since:
1.5
See Also:
MouseInfo sample code for java.awt.MouseInfo definition code for java.awt.MouseInfo , MouseInfo.getPointerInfo() sample code for java.awt.MouseInfo.getPointerInfo() definition code for java.awt.MouseInfo.getPointerInfo()