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 java.awt.*;
25 import java.awt.event.ComponentAdapter;
26 import java.awt.event.ComponentEvent;
27 import java.awt.geom.*;
28
29 /*
30 * @test
31 * @summary Check if a window set with shape appears in the expected shape
32 *
33 * Test Description: Check if PERPIXEL_TRANSPARENT Translucency type is supported
34 * by the current platform. Proceed if it is supported. Apply different
35 * types of shapes on a Window. Make it appear with a known background. Use
36 * get pixel color to check whether it appears as expected. Repeat this for
37 * Window, Dialog and Frame.
38 * Expected Result: If PERPIXEL_TRANSPARENT Translucency type is supported, the
39 * window should appear with the expected shape.
40 *
41 * @author mrkam
42 * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
43 * @library ../../../../lib/testlibrary
44 * @build Common ExtendedRobot
45 * @run main SetShape
46 */
47
48 public class SetShape extends Common {
49
50 static int[][] pointsToCheck;
|
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 java.awt.*;
25 import java.awt.event.ComponentAdapter;
26 import java.awt.event.ComponentEvent;
27 import java.awt.geom.*;
28
29 /*
30 * @test
31 * @key headful
32 * @summary Check if a window set with shape appears in the expected shape
33 *
34 * Test Description: Check if PERPIXEL_TRANSPARENT Translucency type is supported
35 * by the current platform. Proceed if it is supported. Apply different
36 * types of shapes on a Window. Make it appear with a known background. Use
37 * get pixel color to check whether it appears as expected. Repeat this for
38 * Window, Dialog and Frame.
39 * Expected Result: If PERPIXEL_TRANSPARENT Translucency type is supported, the
40 * window should appear with the expected shape.
41 *
42 * @author mrkam
43 * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
44 * @library ../../../../lib/testlibrary
45 * @build Common ExtendedRobot
46 * @run main SetShape
47 */
48
49 public class SetShape extends Common {
50
51 static int[][] pointsToCheck;
|