src/macosx/classes/sun/lwawt/macosx/CToolkitThreadBlockedHandler.java

Print this page




  24  */
  25 
  26 package sun.lwawt.macosx;
  27 
  28 import sun.awt.datatransfer.ToolkitThreadBlockedHandler;
  29 
  30 final class CToolkitThreadBlockedHandler implements ToolkitThreadBlockedHandler {
  31     private final LWCToolkit toolkit = (LWCToolkit)java.awt.Toolkit.getDefaultToolkit();
  32 
  33     public void lock() {
  34     }
  35 
  36     public void unlock() {
  37     }
  38 
  39     protected boolean isOwned() {
  40        return false;
  41     }
  42 
  43     public void enter() {


  44         toolkit.startNativeNestedEventLoop();
  45     }
  46 
  47     public void exit() {
  48         toolkit.stopNativeNestedEventLoop();
  49     }
  50 }


  24  */
  25 
  26 package sun.lwawt.macosx;
  27 
  28 import sun.awt.datatransfer.ToolkitThreadBlockedHandler;
  29 
  30 final class CToolkitThreadBlockedHandler implements ToolkitThreadBlockedHandler {
  31     private final LWCToolkit toolkit = (LWCToolkit)java.awt.Toolkit.getDefaultToolkit();
  32 
  33     public void lock() {
  34     }
  35 
  36     public void unlock() {
  37     }
  38 
  39     protected boolean isOwned() {
  40        return false;
  41     }
  42 
  43     public void enter() {
  44         // Despite the naming this method on MacOS only making one event from
  45         // the native loop to be executed so this call is not blocking
  46         toolkit.startNativeNestedEventLoop();
  47     }
  48 
  49     public void exit() {

  50     }
  51 }