< prev index next >

test/jdk/java/awt/Robot/RobotWheelTest/RobotWheelTest.java

Print this page
rev 51542 : 8210039: move OSInfo to top level testlibrary
Reviewed-by: duke

*** 22,41 **** */ import java.awt.Button; import java.awt.Frame; import java.awt.Rectangle; import java.awt.Robot; ! import jdk.testlibrary.OSInfo; /* * @test 1.2 98/08/05 * @key headful * @bug 4373478 8079255 * @summary Test mouse wheel functionality of Robot * @author bchristi: area=Robot ! * @library ../../../../lib/testlibrary ! * @build jdk.testlibrary.OSInfo * @run main RobotWheelTest */ public class RobotWheelTest { private static final int NUMTESTS = 20; --- 22,42 ---- */ import java.awt.Button; import java.awt.Frame; import java.awt.Rectangle; import java.awt.Robot; ! ! import jdk.test.lib.Platform; /* * @test 1.2 98/08/05 * @key headful * @bug 4373478 8079255 * @summary Test mouse wheel functionality of Robot * @author bchristi: area=Robot ! * @library /test/lib ! * @build jdk.test.lib.Platform * @run main RobotWheelTest */ public class RobotWheelTest { private static final int NUMTESTS = 20;
*** 43,53 **** public static void main(String[] args) throws Exception { Frame frame = null; try { ! int wheelSign = OSInfo.getOSType().equals(OSInfo.OSType.MACOSX) ? -1 : 1; frame = new Frame(); frame.setSize(200, 200); Button button = new Button("WheelButton"); button.addMouseWheelListener(e -> wheelRotation = e.getWheelRotation()); --- 44,54 ---- public static void main(String[] args) throws Exception { Frame frame = null; try { ! int wheelSign = Platform.isOSX() ? -1 : 1; frame = new Frame(); frame.setSize(200, 200); Button button = new Button("WheelButton"); button.addMouseWheelListener(e -> wheelRotation = e.getWheelRotation());
< prev index next >