< prev index next >
test/jdk/javax/swing/JScrollPane/HorizontalMouseWheelOnShiftPressed/HorizontalMouseWheelOnShiftPressed.java
Print this page
rev 51542 : 8210039: move OSInfo to top level testlibrary
Reviewed-by: duke
*** 29,48 ****
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SwingUtilities;
! import jdk.testlibrary.OSInfo;
/**
* @test
* @key headful
* @bug 8033000 8147994
* @author Alexander Scherbatiy
* @summary No Horizontal Mouse Wheel Support In BasicScrollPaneUI
! * @library ../../../../lib/testlibrary
! * @build jdk.testlibrary.OSInfo
* @run main HorizontalMouseWheelOnShiftPressed
*/
public class HorizontalMouseWheelOnShiftPressed {
private static JScrollPane scrollPane;
--- 29,48 ----
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SwingUtilities;
! import jdk.test.lib.Platform;
/**
* @test
* @key headful
* @bug 8033000 8147994
* @author Alexander Scherbatiy
* @summary No Horizontal Mouse Wheel Support In BasicScrollPaneUI
! * @library /test/lib
! * @build jdk.test.lib.Platform
* @run main HorizontalMouseWheelOnShiftPressed
*/
public class HorizontalMouseWheelOnShiftPressed {
private static JScrollPane scrollPane;
*** 50,60 ****
private static Point point;
private static final int delta;
private static JFrame frame;
static {
! delta = OSInfo.getOSType().equals(OSInfo.OSType.MACOSX) ? -30 : 30;
}
public static void main(String[] args) throws Exception {
Robot robot = new Robot();
--- 50,60 ----
private static Point point;
private static final int delta;
private static JFrame frame;
static {
! delta = Platform.isOSX() ? -30 : 30;
}
public static void main(String[] args) throws Exception {
Robot robot = new Robot();
< prev index next >