1 /*
2 * Copyright (c) 2010, 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 */
23
24 import javax.swing.*;
25 import java.awt.*;
26 import java.awt.event.MouseAdapter;
27 import java.awt.event.MouseEvent;
28
29 /*
30 * @test
31 * @bug 8024627
32 * @summary Check if a JComboBox present in a window set with opacity less than
33 * 1.0 shows a translucent drop down
34 * Test Description: Check if TRANSLUCENT translucency type is supported on the
35 * current platform. Proceed if supported. Show a window which contains an
36 * JComboBox and set with opacity less than 1.0. Another Window having a canvas
37 * component drawn with an image can be used as the background for the test
38 * window. Click on the ComboBox to show the drop down. Check if the drop down
39 * appears translucent. Repeat this for JWindow, JDialog and JFrame
40 * Expected Result: If TRANSLUCENT Translucency type is supported, the drop down
41 * should appear translucent.
42 * @author mrkam
43 * @library ../../../../lib/testlibrary
44 * @build Common ExtendedRobot
45 * @run main TranslucentJComboBox
46 */
47
48 public class TranslucentJComboBox extends Common {
49
50 JComponent south;
|
1 /*
2 * Copyright (c) 2010, 2016, 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 */
23
24 import javax.swing.*;
25 import java.awt.*;
26 import java.awt.event.MouseAdapter;
27 import java.awt.event.MouseEvent;
28
29 /*
30 * @test
31 * @key headful
32 * @bug 8024627
33 * @summary Check if a JComboBox present in a window set with opacity less than
34 * 1.0 shows a translucent drop down
35 * Test Description: Check if TRANSLUCENT translucency type is supported on the
36 * current platform. Proceed if supported. Show a window which contains an
37 * JComboBox and set with opacity less than 1.0. Another Window having a canvas
38 * component drawn with an image can be used as the background for the test
39 * window. Click on the ComboBox to show the drop down. Check if the drop down
40 * appears translucent. Repeat this for JWindow, JDialog and JFrame
41 * Expected Result: If TRANSLUCENT Translucency type is supported, the drop down
42 * should appear translucent.
43 * @author mrkam
44 * @library ../../../../lib/testlibrary
45 * @build Common ExtendedRobot
46 * @run main TranslucentJComboBox
47 */
48
49 public class TranslucentJComboBox extends Common {
50
51 JComponent south;
|