java.lang.Objectjava.awt.PointerInfo
public class PointerInfo
描述指针位置的类。它提供指针所在的 GraphicsDevice,以及表示指针坐标的 Point。
此类的实例应该通过 MouseInfo.getPointerInfo() 来获得。PointerInfo 实例不随鼠标的移动而动态更新。为了获取更新后的位置,必须再次调用 MouseInfo.getPointerInfo()。
MouseInfo.getPointerInfo()
| 方法摘要 | |
|---|---|
GraphicsDevice |
getDevice() 返回在创建此 PointerInfo 时鼠标指针所在的 GraphicsDevice。 |
Point |
getLocation() 返回在屏幕上表示指针坐标的 Point。 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 方法详细信息 |
|---|
public GraphicsDevice getDevice()
PointerInfo 时鼠标指针所在的
GraphicsDevice。
GraphicsDevice
public Point getLocation()
Point。有关多屏幕系统坐标计算的更多信息,请参见
MouseInfo.getPointerInfo()。
MouseInfo,
MouseInfo.getPointerInfo()