< prev index next >
test/jdk/java/awt/event/MouseEvent/EventTimeInFuture/EventTimeInFuture.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2007, 2016, 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.
--- 1,7 ----
/*
! * Copyright (c) 2007, 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.
*** 56,67 ****
*/
Point start = new Point(frame.getLocationOnScreen().x - frame.getWidth()/5,
frame.getLocationOnScreen().y - frame.getHeight()/5);
Point end = new Point(frame.getLocationOnScreen().x + frame.getWidth() * 6 / 5,
frame.getLocationOnScreen().y + frame.getHeight() * 6 / 5);
! Sysout.println("start = " + start);
! Sysout.println("end = " + end);
Util.mouseMove(robot, start, end);
// Start drag inside toplevel.
start = new Point(frame.getLocationOnScreen().x + frame.getWidth()/2,
frame.getLocationOnScreen().y + frame.getHeight()/2);
--- 56,67 ----
*/
Point start = new Point(frame.getLocationOnScreen().x - frame.getWidth()/5,
frame.getLocationOnScreen().y - frame.getHeight()/5);
Point end = new Point(frame.getLocationOnScreen().x + frame.getWidth() * 6 / 5,
frame.getLocationOnScreen().y + frame.getHeight() * 6 / 5);
! System.out.println("start = " + start);
! System.out.println("end = " + end);
Util.mouseMove(robot, start, end);
// Start drag inside toplevel.
start = new Point(frame.getLocationOnScreen().x + frame.getWidth()/2,
frame.getLocationOnScreen().y + frame.getHeight()/2);
*** 85,95 ****
private void traceMouse(String k, MouseEvent e){
long eventTime = e.getWhen();
long currTime = System.currentTimeMillis();
long diff = currTime - eventTime;
! Sysout.println(k + " diff is " + diff + ", event is "+ e);
if (diff < 0){
AbstractTest.fail(k + " diff is " + diff + ", event = "+e);
}
}
--- 85,95 ----
private void traceMouse(String k, MouseEvent e){
long eventTime = e.getWhen();
long currTime = System.currentTimeMillis();
long diff = currTime - eventTime;
! System.out.println(k + " diff is " + diff + ", event is "+ e);
if (diff < 0){
AbstractTest.fail(k + " diff is " + diff + ", event = "+e);
}
}
< prev index next >