18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.BorderLayout;
25 import java.awt.Point;
26 import java.awt.Robot;
27 import java.awt.event.KeyEvent;
28 import javax.swing.JFrame;
29 import javax.swing.JPanel;
30 import javax.swing.JScrollPane;
31 import javax.swing.JTextArea;
32 import javax.swing.SwingUtilities;
33
34 import sun.awt.OSInfo;
35
36 /**
37 * @test
38 * @bug 8033000 8147994
39 * @author Alexander Scherbatiy
40 * @summary No Horizontal Mouse Wheel Support In BasicScrollPaneUI
41 * @run main HorizontalMouseWheelOnShiftPressed
42 */
43 public class HorizontalMouseWheelOnShiftPressed {
44
45 private static JScrollPane scrollPane;
46 private static JTextArea textArea;
47 private static Point point;
48 private static final int delta;
49 private static JFrame frame;
50
51 static {
52 delta = OSInfo.getOSType().equals(OSInfo.OSType.MACOSX) ? -30 : 30;
53 }
54
55 public static void main(String[] args) throws Exception {
56
57 Robot robot = new Robot();
|
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.awt.BorderLayout;
25 import java.awt.Point;
26 import java.awt.Robot;
27 import java.awt.event.KeyEvent;
28 import javax.swing.JFrame;
29 import javax.swing.JPanel;
30 import javax.swing.JScrollPane;
31 import javax.swing.JTextArea;
32 import javax.swing.SwingUtilities;
33
34 import sun.awt.OSInfo;
35
36 /**
37 * @test
38 * @key headful
39 * @bug 8033000 8147994
40 * @author Alexander Scherbatiy
41 * @summary No Horizontal Mouse Wheel Support In BasicScrollPaneUI
42 * @run main HorizontalMouseWheelOnShiftPressed
43 */
44 public class HorizontalMouseWheelOnShiftPressed {
45
46 private static JScrollPane scrollPane;
47 private static JTextArea textArea;
48 private static Point point;
49 private static final int delta;
50 private static JFrame frame;
51
52 static {
53 delta = OSInfo.getOSType().equals(OSInfo.OSType.MACOSX) ? -30 : 30;
54 }
55
56 public static void main(String[] args) throws Exception {
57
58 Robot robot = new Robot();
|