< prev index next >

modules/javafx.graphics/src/main/java/javafx/stage/Window.java

Print this page
rev 10897 : 8199357: Remove references to applets and Java Web Start from FX
Reviewed-by:
   1 /*
   2  * Copyright (c) 2010, 2017, 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


  57 import com.sun.javafx.util.Utils;
  58 import com.sun.javafx.css.StyleManager;
  59 import com.sun.javafx.stage.WindowEventDispatcher;
  60 import com.sun.javafx.stage.WindowHelper;
  61 import com.sun.javafx.stage.WindowPeerListener;
  62 import com.sun.javafx.tk.TKPulseListener;
  63 import com.sun.javafx.tk.TKScene;
  64 import com.sun.javafx.tk.TKStage;
  65 import com.sun.javafx.tk.Toolkit;
  66 import javafx.beans.property.BooleanProperty;
  67 import javafx.beans.property.SimpleBooleanProperty;
  68 
  69 import static com.sun.javafx.FXPermissions.ACCESS_WINDOW_LIST_PERMISSION;
  70 import com.sun.javafx.scene.NodeHelper;
  71 import com.sun.javafx.scene.SceneHelper;
  72 
  73 
  74 /**
  75  * A top level window within which a scene is hosted, and with which the user
  76  * interacts. A Window might be a {@link Stage}, {@link PopupWindow}, or other
  77  * such top level. A Window is used also for browser plug-in based deployments.
  78  * <p>
  79  * Window objects must be constructed and modified on the
  80  * JavaFX Application Thread.
  81  * </p>
  82  * <p>
  83  * The JavaFX Application Thread is created as part of the startup process for
  84  * the JavaFX runtime. See the {@link javafx.application.Application} class and
  85  * the {@link Platform#startup(Runnable)} method for more information.
  86  * </p>
  87  *
  88  * @since JavaFX 2.0
  89  */
  90 public class Window implements EventTarget {
  91 
  92     /**
  93      * A list of all the currently _showing_ windows. This is publicly accessible via the unmodifiableWindows wrapper.
  94      */
  95     private static ObservableList<Window> windows = FXCollections.observableArrayList();
  96     private static ObservableList<Window> unmodifiableWindows = FXCollections.unmodifiableObservableList(windows);
  97 


   1 /*
   2  * Copyright (c) 2010, 2018, 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


  57 import com.sun.javafx.util.Utils;
  58 import com.sun.javafx.css.StyleManager;
  59 import com.sun.javafx.stage.WindowEventDispatcher;
  60 import com.sun.javafx.stage.WindowHelper;
  61 import com.sun.javafx.stage.WindowPeerListener;
  62 import com.sun.javafx.tk.TKPulseListener;
  63 import com.sun.javafx.tk.TKScene;
  64 import com.sun.javafx.tk.TKStage;
  65 import com.sun.javafx.tk.Toolkit;
  66 import javafx.beans.property.BooleanProperty;
  67 import javafx.beans.property.SimpleBooleanProperty;
  68 
  69 import static com.sun.javafx.FXPermissions.ACCESS_WINDOW_LIST_PERMISSION;
  70 import com.sun.javafx.scene.NodeHelper;
  71 import com.sun.javafx.scene.SceneHelper;
  72 
  73 
  74 /**
  75  * A top level window within which a scene is hosted, and with which the user
  76  * interacts. A Window might be a {@link Stage}, {@link PopupWindow}, or other
  77  * such top level window.
  78  * <p>
  79  * Window objects must be constructed and modified on the
  80  * JavaFX Application Thread.
  81  * </p>
  82  * <p>
  83  * The JavaFX Application Thread is created as part of the startup process for
  84  * the JavaFX runtime. See the {@link javafx.application.Application} class and
  85  * the {@link Platform#startup(Runnable)} method for more information.
  86  * </p>
  87  *
  88  * @since JavaFX 2.0
  89  */
  90 public class Window implements EventTarget {
  91 
  92     /**
  93      * A list of all the currently _showing_ windows. This is publicly accessible via the unmodifiableWindows wrapper.
  94      */
  95     private static ObservableList<Window> windows = FXCollections.observableArrayList();
  96     private static ObservableList<Window> unmodifiableWindows = FXCollections.unmodifiableObservableList(windows);
  97 


< prev index next >