Print this page
*** NO COMMENTS ***


 826      * by [JNFRunLoop performOnMainThreadWaiting] are processed.
 827      * @param mediator a native pointer to the mediator object created by createAWTRunLoopMediator
 828      * @param processEvents if true - dispatches event while in the nested loop. Used in DnD.
 829      *                      Additional attention is needed when using this feature as we short-circuit normal event
 830      *                      processing which could break Appkit.
 831      *                      (One known example is when the window is resized with the mouse)
 832      *
 833      *                      if false - all events come after exit form the nested loop
 834      */
 835     static void doAWTRunLoop(long mediator, boolean processEvents) {
 836         doAWTRunLoopImpl(mediator, processEvents, inAWT);
 837     }
 838     private static native void doAWTRunLoopImpl(long mediator, boolean processEvents, boolean inAWT);
 839     static native void stopAWTRunLoop(long mediator);
 840 
 841     private native boolean nativeSyncQueue(long timeout);
 842 
 843     /**
 844      * Just spin a single empty block synchronously.
 845      */
 846     private static native void flushNativeSelectors();
 847 
 848     @Override
 849     public Clipboard createPlatformClipboard() {
 850         return new CClipboard("System");
 851     }
 852 
 853     @Override
 854     public boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType exclusionType) {
 855         return (exclusionType == null) ||
 856             (exclusionType == Dialog.ModalExclusionType.NO_EXCLUDE) ||
 857             (exclusionType == Dialog.ModalExclusionType.APPLICATION_EXCLUDE) ||
 858             (exclusionType == Dialog.ModalExclusionType.TOOLKIT_EXCLUDE);
 859     }
 860 
 861     @Override
 862     public boolean isModalityTypeSupported(Dialog.ModalityType modalityType) {
 863         //TODO: FileDialog blocks excluded windows...
 864         //TODO: Test: 2 file dialogs, separate AppContexts: a) Dialog 1 blocked, shouldn't be. Frame 4 blocked (shouldn't be).
 865         return (modalityType == null) ||
 866             (modalityType == Dialog.ModalityType.MODELESS) ||




 826      * by [JNFRunLoop performOnMainThreadWaiting] are processed.
 827      * @param mediator a native pointer to the mediator object created by createAWTRunLoopMediator
 828      * @param processEvents if true - dispatches event while in the nested loop. Used in DnD.
 829      *                      Additional attention is needed when using this feature as we short-circuit normal event
 830      *                      processing which could break Appkit.
 831      *                      (One known example is when the window is resized with the mouse)
 832      *
 833      *                      if false - all events come after exit form the nested loop
 834      */
 835     static void doAWTRunLoop(long mediator, boolean processEvents) {
 836         doAWTRunLoopImpl(mediator, processEvents, inAWT);
 837     }
 838     private static native void doAWTRunLoopImpl(long mediator, boolean processEvents, boolean inAWT);
 839     static native void stopAWTRunLoop(long mediator);
 840 
 841     private native boolean nativeSyncQueue(long timeout);
 842 
 843     /**
 844      * Just spin a single empty block synchronously.
 845      */
 846     static native void flushNativeSelectors();
 847 
 848     @Override
 849     public Clipboard createPlatformClipboard() {
 850         return new CClipboard("System");
 851     }
 852 
 853     @Override
 854     public boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType exclusionType) {
 855         return (exclusionType == null) ||
 856             (exclusionType == Dialog.ModalExclusionType.NO_EXCLUDE) ||
 857             (exclusionType == Dialog.ModalExclusionType.APPLICATION_EXCLUDE) ||
 858             (exclusionType == Dialog.ModalExclusionType.TOOLKIT_EXCLUDE);
 859     }
 860 
 861     @Override
 862     public boolean isModalityTypeSupported(Dialog.ModalityType modalityType) {
 863         //TODO: FileDialog blocks excluded windows...
 864         //TODO: Test: 2 file dialogs, separate AppContexts: a) Dialog 1 blocked, shouldn't be. Frame 4 blocked (shouldn't be).
 865         return (modalityType == null) ||
 866             (modalityType == Dialog.ModalityType.MODELESS) ||