1 /*
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
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 */
29 import java.awt.Rectangle;
30 import java.awt.Robot;
31 import java.awt.event.InputEvent;
32 import java.awt.event.MouseAdapter;
33 import java.awt.event.MouseEvent;
34 import javax.swing.JButton;
35 import javax.swing.SwingUtilities;
36 import test.java.awt.regtesthelpers.Util;
37
38 /**
39 * AWT/Swing overlapping test for opaque Swing components.
40 * <p>This test verify if AWT components are drawn correctly under opaque components.
41 * <p>See <a href="https://bugs.openjdk.java.net/browse/JDK-6776743">JDK-6776743</a> for details
42 * <p>See base class for test info.
43 */
44 /*
45 @test
46 @bug 6776743
47 @summary Opaque overlapping test for each AWT component
48 @library ../../regtesthelpers
49 @build Util
50 @run main OpaqueOverlapping
51 */
52 public class OpaqueOverlapping extends OverlappingTestBase {
53
54 {
55 useClickValidation = false;
56 failMessage = "Opacity test mismatchs";
57
58 // CR 6994264 (Choice autohides dropdown on Solaris 10)
59 skipClassNames = new String[] { "Choice" };
60 }
61 private String testSeq;
62 private final static String checkSeq = "010000101";
63 private Point heavyLoc;
64 private JButton light;
65 private Frame frame = null;
66
67 protected void prepareControls() {
68 testSeq = "";
|
1 /*
2 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
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 */
29 import java.awt.Rectangle;
30 import java.awt.Robot;
31 import java.awt.event.InputEvent;
32 import java.awt.event.MouseAdapter;
33 import java.awt.event.MouseEvent;
34 import javax.swing.JButton;
35 import javax.swing.SwingUtilities;
36 import test.java.awt.regtesthelpers.Util;
37
38 /**
39 * AWT/Swing overlapping test for opaque Swing components.
40 * <p>This test verify if AWT components are drawn correctly under opaque components.
41 * <p>See <a href="https://bugs.openjdk.java.net/browse/JDK-6776743">JDK-6776743</a> for details
42 * <p>See base class for test info.
43 */
44 /*
45 @test
46 @bug 6776743
47 @summary Opaque overlapping test for each AWT component
48 @library ../../regtesthelpers
49 @modules java.desktop/com.sun.awt
50 java.desktop/sun.awt
51 @build Util
52 @run main OpaqueOverlapping
53 */
54 public class OpaqueOverlapping extends OverlappingTestBase {
55
56 {
57 useClickValidation = false;
58 failMessage = "Opacity test mismatchs";
59
60 // CR 6994264 (Choice autohides dropdown on Solaris 10)
61 skipClassNames = new String[] { "Choice" };
62 }
63 private String testSeq;
64 private final static String checkSeq = "010000101";
65 private Point heavyLoc;
66 private JButton light;
67 private Frame frame = null;
68
69 protected void prepareControls() {
70 testSeq = "";
|