src/java.desktop/macosx/classes/com/apple/eawt/Application.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2011, 2012, 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. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2011, 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. Oracle designates this
*** 23,40 **** * questions. */ package com.apple.eawt; ! import java.awt.*; ! import java.awt.peer.*; import java.beans.Beans; import javax.swing.JMenuBar; ! import sun.lwawt.*; ! import sun.lwawt.macosx.*; /** * The <code>Application</code> class allows you to integrate your Java application with the native Mac OS X environment. * You can provide your Mac OS X users a greatly enhanced experience by implementing a few basic handlers for standard system events. * --- 23,44 ---- * questions. */ package com.apple.eawt; ! import java.awt.Image; ! import java.awt.Point; ! import java.awt.PopupMenu; ! import java.awt.Toolkit; ! import java.awt.Window; import java.beans.Beans; import javax.swing.JMenuBar; ! import sun.awt.AWTAccessor; ! import sun.lwawt.LWWindowPeer; ! import sun.lwawt.macosx.CPlatformWindow; /** * The <code>Application</code> class allows you to integrate your Java application with the native Mac OS X environment. * You can provide your Mac OS X users a greatly enhanced experience by implementing a few basic handlers for standard system events. *
*** 383,396 **** * * @param window to animate into or out of full screen mode * * @since Java for Mac OS X 10.7 Update 1 */ - @SuppressWarnings("deprecation") public void requestToggleFullScreen(final Window window) { ! final ComponentPeer peer = window.getPeer(); ! if (!(peer instanceof LWWindowPeer)) return; Object platformWindow = ((LWWindowPeer) peer).getPlatformWindow(); if (!(platformWindow instanceof CPlatformWindow)) return; ((CPlatformWindow)platformWindow).toggleFullScreen(); } --- 387,398 ---- * * @param window to animate into or out of full screen mode * * @since Java for Mac OS X 10.7 Update 1 */ public void requestToggleFullScreen(final Window window) { ! final Object peer = AWTAccessor.getComponentAccessor().getPeer(window); if (!(peer instanceof LWWindowPeer)) return; Object platformWindow = ((LWWindowPeer) peer).getPlatformWindow(); if (!(platformWindow instanceof CPlatformWindow)) return; ((CPlatformWindow)platformWindow).toggleFullScreen(); }