1 /* 2 * Copyright (c) 2009, 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. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package com.sun.javafx.tk; 27 28 /** 29 * TKStageListener - Listener for the Stage Peer TKStage to pass updates and events back to the stage 30 * 31 */ 32 public interface TKStageListener { 33 34 /** 35 * The stages peer's location have changed so we need to update the scene 36 * 37 * @param x the new X 38 * @param y The new Y 39 */ 40 public void changedLocation(float x, float y); 41 42 /** 43 * The stages peer's size have changed so we need to update the scene 44 * 45 * @param width The new Width 46 * @param height The new Height 47 */ 48 public void changedSize(float width, float height); 49 50 /** 51 * The stages peer focused state has changed. 52 * 53 * @param focused True if the stage's peer now contains the focus 54 * @param cause The cause of (de)activation 55 */ 56 public void changedFocused(boolean focused, FocusCause cause); 57 58 /** 59 * The stages peer has become iconified or uniconified 60 * 61 * @param iconified True if the stage's peer is now iconified 62 */ 63 public void changedIconified(boolean iconified); 64 65 /** 66 * The stages peer has become maximized or unmaximized 67 * 68 * @param maximized True if the stage's peer is now maximized 69 */ 70 public void changedMaximized(boolean maximized); 71 72 /** 73 * The stages peer has changed it's "always on top" flag. 74 * @param alwaysOnTop 75 */ 76 public void changedAlwaysOnTop(boolean alwaysOnTop); 77 78 /** 79 * The stages peer has become resizable or nonresizable 80 * 81 * @param resizable True if the stage's peer is now resizable 82 */ 83 public void changedResizable(boolean resizable); 84 85 /** 86 * The stages peer has changed its full screen status 87 * 88 * @param fs True if the stage's peer is now full screen, false otherwise 89 */ 90 public void changedFullscreen(boolean fs); 91 92 /** 93 * Called if the window is closing do to something that has happened on the peer. For 94 * example the user clicking the close button or choosing quit from the application menu 95 * on a mac or right click close on the task bar on windows. 96 */ 97 public void closing(); 98 99 /** 100 * Called if the stages peer has closed. For example the platform closes the 101 * window after user has clicked the close button on its parent window. 102 */ 103 public void closed(); 104 105 /** 106 * Focus grab has been reset for the stage peer. 107 * 108 * Called after a previous call to {@link TKStage#grabFocus} when the grab 109 * is reset either by user action (e.g. clicking the titlebar of the 110 * stage), or via a call to {@link TKStage#ungrabFocus}. 111 */ 112 public void focusUngrab(); 113 114 /** 115 * Initialize accessibility 116 */ 117 public void initAccessibleTKStageListener(); 118 }