29 * @summary Check if dynamically shaped window is dragged and resized
30 * by mouse correctly
31 *
32 * Test Description: Check if specified translucency types PERPIXEL_TRANSPARENT
33 * is supported on the current platform. Proceed if it is supported.
34 * Create a window apply shape in componentResized listener. The shape
35 * should match the window size. Drag and resize the window using AWT Robot
36 * and verify that shape is correctly applied both with pixels checking and
37 * clicks. Make the window appear on top of a known background. Repeat this
38 * for Window, Dialog, Frame,
39 * Expected Result: If PERPIXEL_TRANSPARENT translucency type is supported,
40 * the window should appear with the expected shape. Clicks should come
41 * to visible parts of shaped window only and to background for clipped
42 * parts.
43 *
44 * @author mrkam
45 * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
46 * @library ../../../../lib/testlibrary
47 * @build Common ExtendedRobot
48 * @run main Shaped
49 */
50 public class Shaped extends Common{
51
52 public static void main(String[] args) throws Exception {
53 if (checkTranslucencyMode(GraphicsDevice.WindowTranslucency.PERPIXEL_TRANSPARENT))
54 for (Class<Window> windowClass: WINDOWS_TO_TEST){
55 new Shaped(windowClass).doTest();
56 }
57 }
58
59 public Shaped(Class windowClass) throws Exception{
60 super(windowClass);
61 }
62
63 @Override
64 public void applyShape(){ applyDynamicShape(); }
65
66 @Override
67 public void doTest() throws Exception{
68 super.doTest();
|
29 * @summary Check if dynamically shaped window is dragged and resized
30 * by mouse correctly
31 *
32 * Test Description: Check if specified translucency types PERPIXEL_TRANSPARENT
33 * is supported on the current platform. Proceed if it is supported.
34 * Create a window apply shape in componentResized listener. The shape
35 * should match the window size. Drag and resize the window using AWT Robot
36 * and verify that shape is correctly applied both with pixels checking and
37 * clicks. Make the window appear on top of a known background. Repeat this
38 * for Window, Dialog, Frame,
39 * Expected Result: If PERPIXEL_TRANSPARENT translucency type is supported,
40 * the window should appear with the expected shape. Clicks should come
41 * to visible parts of shaped window only and to background for clipped
42 * parts.
43 *
44 * @author mrkam
45 * @author Dmitriy Ermashov (dmitriy.ermashov@oracle.com)
46 * @library ../../../../lib/testlibrary
47 * @build Common ExtendedRobot
48 * @run main Shaped
49 * @key randomness
50 */
51 public class Shaped extends Common{
52
53 public static void main(String[] args) throws Exception {
54 if (checkTranslucencyMode(GraphicsDevice.WindowTranslucency.PERPIXEL_TRANSPARENT))
55 for (Class<Window> windowClass: WINDOWS_TO_TEST){
56 new Shaped(windowClass).doTest();
57 }
58 }
59
60 public Shaped(Class windowClass) throws Exception{
61 super(windowClass);
62 }
63
64 @Override
65 public void applyShape(){ applyDynamicShape(); }
66
67 @Override
68 public void doTest() throws Exception{
69 super.doTest();
|