< prev index next >

modules/javafx.graphics/src/main/java/javafx/stage/Stage.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


 296      * @defaultValue false
 297      */
 298     final void initSecurityDialog(boolean securityDialog) {
 299         if (hasBeenVisible) {
 300             throw new IllegalStateException("Cannot set securityDialog once stage has been set visible");
 301         }
 302 
 303         this.securityDialog = securityDialog;
 304     }
 305 
 306     /**
 307      * Returns the state of the securityDialog flag.
 308      *
 309      * @return a flag indicating whether or not this is a security dialog
 310      */
 311     final boolean isSecurityDialog() {
 312         return securityDialog;
 313     }
 314 
 315     /*
 316      * sets this stage to be the primary stage.
 317      * When run as an applet, this stage will appear in the broswer
 318      */
 319     void setPrimary(boolean primary) {
 320         this.primary = primary;
 321     }
 322 
 323     /*
 324      * Returns whether this stage is the primary stage.
 325      * When run as an applet, the primary stage will appear in the broswer
 326      *
 327      * @return true if this stage is the primary stage for the application.
 328      */
 329     boolean isPrimary() {
 330         return primary;
 331     }
 332 
 333     private boolean important = true;
 334 
 335     /*
 336      * Sets a flag indicating whether this stage is an "important" window for
 337      * the purpose of determining whether the application is idle and should
 338      * exit. The application is considered finished when the last important
 339      * window is closed.
 340      */
 341     void setImportant(boolean important) {
 342         this.important = important;
 343     }
 344 
 345     private boolean isImportant() {


   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


 296      * @defaultValue false
 297      */
 298     final void initSecurityDialog(boolean securityDialog) {
 299         if (hasBeenVisible) {
 300             throw new IllegalStateException("Cannot set securityDialog once stage has been set visible");
 301         }
 302 
 303         this.securityDialog = securityDialog;
 304     }
 305 
 306     /**
 307      * Returns the state of the securityDialog flag.
 308      *
 309      * @return a flag indicating whether or not this is a security dialog
 310      */
 311     final boolean isSecurityDialog() {
 312         return securityDialog;
 313     }
 314 
 315     /*
 316      * Sets this stage to be the primary stage.

 317      */
 318     void setPrimary(boolean primary) {
 319         this.primary = primary;
 320     }
 321 
 322     /*
 323      * Returns whether this stage is the primary stage.

 324      *
 325      * @return true if this stage is the primary stage for the application.
 326      */
 327     boolean isPrimary() {
 328         return primary;
 329     }
 330 
 331     private boolean important = true;
 332 
 333     /*
 334      * Sets a flag indicating whether this stage is an "important" window for
 335      * the purpose of determining whether the application is idle and should
 336      * exit. The application is considered finished when the last important
 337      * window is closed.
 338      */
 339     void setImportant(boolean important) {
 340         this.important = important;
 341     }
 342 
 343     private boolean isImportant() {


< prev index next >