MouseDispatcher.java 文件源码

java
阅读 32 收藏 0 点赞 0 评论 0

项目:cn1 作者:
private void dispatchMotionEvent(PointerInfo info, NativeEvent event) {
    propagateEvent(info, AWTEvent.MOUSE_MOTION_EVENT_MASK,
                   MouseMotionListener.class, false);
    final Point pos = info.position;
    if ((lastUnderMotion != info.src) ||
        !lastLocalPos.equals(pos)) {

        lastUnderMotion = info.src;
        lastLocalPos = pos;

        if (info.src.isIndirectlyEnabled()) {
            toolkit.getSystemEventQueueImpl().postEvent(
                        new MouseEvent(info.src, event.getEventId(),
                        event.getTime(),
                        event.getInputModifiers(),
                        pos.x, pos.y, 0, false));
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号