< prev index next >

modules/javafx.graphics/src/main/java/com/sun/glass/ui/Application.java

Print this page




 519      *
 520      * After calling this method and returning from the current event handler,
 521      * the execusion returns to the point where the {@link #enterNestedEventLoop}
 522      * was called previously. You may specify a return value for the
 523      * enterNestedEventLoop() method by passing the argument {@code retValue} to
 524      * the leaveNestedEventLoop().
 525      *
 526      * Note that this method may only be invoked on the main (event handling)
 527      * thread.
 528      *
 529      * @throws RuntimeException if the current thread is not the main thread
 530      * @throws IllegalStateException if the application hasn't started a nested
 531      *                               event loop
 532      */
 533     static void leaveNestedEventLoop(Object retValue) {
 534         checkEventThread();
 535 
 536         if (nestedEventLoopCounter == 0) {
 537             throw new IllegalStateException("Not in a nested event loop");
 538         }
 539 
 540         GetApplication()._leaveNestedEventLoop(retValue);
 541     }

 542 
 543     public static boolean isNestedLoopRunning() {
 544         checkEventThread();
 545         return nestedEventLoopCounter > 0;
 546     }
 547 
 548     //TODO: move to the EventHandler
 549     public void menuAboutAction() {
 550         System.err.println("about");
 551     }
 552 
 553 
 554     // FACTORY METHODS
 555 
 556     /**
 557      * Create a window.
 558      *
 559      * The styleMask argument is a bitmask of window styles as defined in the
 560      * Window class.  Note, however, that visual kinds (UNTITLED, TITLED,
 561      * or TRANSPARENT) can't be combined together.  Also, functional types




 519      *
 520      * After calling this method and returning from the current event handler,
 521      * the execusion returns to the point where the {@link #enterNestedEventLoop}
 522      * was called previously. You may specify a return value for the
 523      * enterNestedEventLoop() method by passing the argument {@code retValue} to
 524      * the leaveNestedEventLoop().
 525      *
 526      * Note that this method may only be invoked on the main (event handling)
 527      * thread.
 528      *
 529      * @throws RuntimeException if the current thread is not the main thread
 530      * @throws IllegalStateException if the application hasn't started a nested
 531      *                               event loop
 532      */
 533     static void leaveNestedEventLoop(Object retValue) {
 534         checkEventThread();
 535 
 536         if (nestedEventLoopCounter == 0) {
 537             throw new IllegalStateException("Not in a nested event loop");
 538         }
 539         if(GetApplication()!=null) {
 540             GetApplication()._leaveNestedEventLoop(retValue);
 541         }
 542     }
 543 
 544     public static boolean isNestedLoopRunning() {
 545         checkEventThread();
 546         return nestedEventLoopCounter > 0;
 547     }
 548 
 549     //TODO: move to the EventHandler
 550     public void menuAboutAction() {
 551         System.err.println("about");
 552     }
 553 
 554 
 555     // FACTORY METHODS
 556 
 557     /**
 558      * Create a window.
 559      *
 560      * The styleMask argument is a bitmask of window styles as defined in the
 561      * Window class.  Note, however, that visual kinds (UNTITLED, TITLED,
 562      * or TRANSPARENT) can't be combined together.  Also, functional types


< prev index next >