< prev index next >

test/java/awt/SplashScreen/FullscreenAfterSplash/FullScreenAfterSplash.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 19,52 **** * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! import jdk.testlibrary.OSInfo; ! import java.awt.*; ! import java.awt.Robot; ! import java.awt.event.InputEvent; ! import java.lang.InterruptedException; ! import java.lang.System; ! import java.lang.Thread; ! import java.lang.reflect.Method; ! import java.lang.reflect.Proxy; ! import javax.swing.*; /* * @test ! * @bug 8024185 * @summary Native Mac OS X full screen does not work after showing the splash * @requires (os.family == "mac") * @library ../ * @library ../../../../lib/testlibrary * @modules java.desktop/sun.awt * java.desktop/com.apple.eawt * @build jdk.testlibrary.OSInfo * @build GenerateTestImage * @run main GenerateTestImage * @author Petr Pchelko area=awt.event * @run main/othervm -splash:test.png FullScreenAfterSplash */ public class FullScreenAfterSplash { private static JFrame frame; --- 19,56 ---- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ ! import jdk.testlibrary.OSInfo; ! import java.awt.Point; ! import java.awt.Robot; ! import java.awt.Window; ! import java.awt.event.InputEvent; ! import java.lang.InterruptedException; ! import java.lang.System; ! import java.lang.Thread; ! import java.lang.reflect.Method; ! import java.lang.reflect.Proxy; ! import javax.swing.JFrame; ! import javax.swing.SwingUtilities; ! import javax.swing.WindowConstants; /* * @test ! * @bug 8024185 8140329 * @summary Native Mac OS X full screen does not work after showing the splash * @requires (os.family == "mac") * @library ../ * @library ../../../../lib/testlibrary * @modules java.desktop/sun.awt * java.desktop/com.apple.eawt * @build jdk.testlibrary.OSInfo * @build GenerateTestImage * @run main GenerateTestImage * @author Petr Pchelko area=awt.event + * @compile FullScreenAfterSplash.java * @run main/othervm -splash:test.png FullScreenAfterSplash */ public class FullScreenAfterSplash { private static JFrame frame;
*** 69,79 **** SwingUtilities.invokeAndWait(FullScreenAfterSplash::createAndShowGUI); sleep(); Point fullScreenButtonPos = frame.getLocation(); ! fullScreenButtonPos.translate(frame.getWidth() - 10, 10); r.mouseMove(fullScreenButtonPos.x, fullScreenButtonPos.y); //Cant use waitForIdle for full screen transition. int waitCount = 0; while (!windowEnteringFullScreen) { --- 73,86 ---- SwingUtilities.invokeAndWait(FullScreenAfterSplash::createAndShowGUI); sleep(); Point fullScreenButtonPos = frame.getLocation(); ! if(System.getProperty("os.version").equals("10.9")) ! fullScreenButtonPos.translate(frame.getWidth() - 10, frame.getHeight()/2); ! else ! fullScreenButtonPos.translate(55,frame.getHeight()/2); r.mouseMove(fullScreenButtonPos.x, fullScreenButtonPos.y); //Cant use waitForIdle for full screen transition. int waitCount = 0; while (!windowEnteringFullScreen) {
< prev index next >