src/macosx/classes/com/apple/eawt/FullScreenHandler.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2011, 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, 2013, 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
*** 31,51 **** import javax.swing.RootPaneContainer; import com.apple.eawt.AppEvent.FullScreenEvent; ! import javax.tools.annotation.GenerateNativeHeader; - /* No native methods here, but the constants are needed in the supporting JNI code */ - @GenerateNativeHeader final class FullScreenHandler { private static final String CLIENT_PROPERTY = "com.apple.eawt.event.internalFullScreenHandler"; ! static final int FULLSCREEN_WILL_ENTER = 1; ! static final int FULLSCREEN_DID_ENTER = 2; ! static final int FULLSCREEN_WILL_EXIT = 3; ! static final int FULLSCREEN_DID_EXIT = 4; // installs a private instance of the handler, if necessary static void addFullScreenListenerTo(final RootPaneContainer window, final FullScreenListener listener) { final Object value = window.getRootPane().getClientProperty(CLIENT_PROPERTY); if (value instanceof FullScreenHandler) { --- 31,49 ---- import javax.swing.RootPaneContainer; import com.apple.eawt.AppEvent.FullScreenEvent; ! import java.lang.annotation.Native; final class FullScreenHandler { private static final String CLIENT_PROPERTY = "com.apple.eawt.event.internalFullScreenHandler"; ! @Native static final int FULLSCREEN_WILL_ENTER = 1; ! @Native static final int FULLSCREEN_DID_ENTER = 2; ! @Native static final int FULLSCREEN_WILL_EXIT = 3; ! @Native static final int FULLSCREEN_DID_EXIT = 4; // installs a private instance of the handler, if necessary static void addFullScreenListenerTo(final RootPaneContainer window, final FullScreenListener listener) { final Object value = window.getRootPane().getClientProperty(CLIENT_PROPERTY); if (value instanceof FullScreenHandler) {