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 * @summary Check if swing components present in a window set with opacity less
32 * than 1.0 appears translucent
33 * Test Description: Check if TRANSLUCENT Translucency type is supported for the
34 * current platform. Proceed if supported. Show a window containing some swing
35 * components and set it with opacity less than 1.0. Check if the swing components
36 * appear translucent and check if events trigger correctly for the components
37 * Expected Result: If TRANSLUCENT Translucency type is supported, the components
38 * should appear translucent showing the background. They should trigger events
39 * correctly
40 * @author mrkam
41 * @library ../../../../lib/testlibrary
42 * @build Common ExtendedRobot
43 * @run main TranslucentWindowClickSwing
44 */
45
46 public class TranslucentWindowClickSwing extends Common {
47
48 private Component south;
49 private Component center;
50 private Component north;
|
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 * @summary Check if swing components present in a window set with opacity less
33 * than 1.0 appears translucent
34 * Test Description: Check if TRANSLUCENT Translucency type is supported for the
35 * current platform. Proceed if supported. Show a window containing some swing
36 * components and set it with opacity less than 1.0. Check if the swing components
37 * appear translucent and check if events trigger correctly for the components
38 * Expected Result: If TRANSLUCENT Translucency type is supported, the components
39 * should appear translucent showing the background. They should trigger events
40 * correctly
41 * @author mrkam
42 * @library ../../../../lib/testlibrary
43 * @build Common ExtendedRobot
44 * @run main TranslucentWindowClickSwing
45 */
46
47 public class TranslucentWindowClickSwing extends Common {
48
49 private Component south;
50 private Component center;
51 private Component north;
|