< prev index next >
src/java.desktop/windows/classes/sun/awt/windows/WRobotPeer.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 23,35 ****
* questions.
*/
package sun.awt.windows;
! import java.awt.*;
import java.awt.peer.RobotPeer;
final class WRobotPeer extends WObjectPeer implements RobotPeer
{
WRobotPeer() {
create();
}
--- 23,39 ----
* questions.
*/
package sun.awt.windows;
! import java.awt.GraphicsDevice;
! import java.awt.Point;
! import java.awt.Rectangle;
import java.awt.peer.RobotPeer;
+ import sun.java2d.SunGraphicsEnvironment;
+
final class WRobotPeer extends WObjectPeer implements RobotPeer
{
WRobotPeer() {
create();
}
*** 46,56 ****
public native void create();
public native void mouseMoveImpl(int x, int y);
@Override
public void mouseMove(int x, int y) {
! mouseMoveImpl(x, y);
}
@Override
public native void mousePress(int buttons);
@Override
public native void mouseRelease(int buttons);
--- 50,61 ----
public native void create();
public native void mouseMoveImpl(int x, int y);
@Override
public void mouseMove(int x, int y) {
! Point point = SunGraphicsEnvironment.convertToDeviceSpace(x, y);
! mouseMoveImpl(point.x, point.y);
}
@Override
public native void mousePress(int buttons);
@Override
public native void mouseRelease(int buttons);
< prev index next >