< prev index next >

src/java.desktop/share/classes/sun/awt/SunToolkit.java

Print this page

 259     }
 260 
 261     public static final void awtLockNotify() {
 262         AWT_LOCK_COND.signal();
 263     }
 264 
 265     public static final void awtLockNotifyAll() {
 266         AWT_LOCK_COND.signalAll();
 267     }
 268 
 269     public static final boolean isAWTLockHeldByCurrentThread() {
 270         return AWT_LOCK.isHeldByCurrentThread();
 271     }
 272 
 273     /*
 274      * Create a new AppContext, along with its EventQueue, for a
 275      * new ThreadGroup.  Browser code, for example, would use this
 276      * method to create an AppContext & EventQueue for an Applet.
 277      */
 278     public static AppContext createNewAppContext() {

 279         ThreadGroup threadGroup = Thread.currentThread().getThreadGroup();
 280         return createNewAppContext(threadGroup);
 281     }
 282 
 283     static final AppContext createNewAppContext(ThreadGroup threadGroup) {
 284         // Create appContext before initialization of EventQueue, so all
 285         // the calls to AppContext.getAppContext() from EventQueue ctor
 286         // return correct values
 287         AppContext appContext = new AppContext(threadGroup);
 288         initEQ(appContext);
 289 
 290         return appContext;
 291     }
 292 
 293     static void wakeupEventQueue(EventQueue q, boolean isShutdown){
 294         AWTAccessor.getEventQueueAccessor().wakeup(q, isShutdown);
 295     }
 296 
 297     /*
 298      * Fetch the peer associated with the given target (as specified

 259     }
 260 
 261     public static final void awtLockNotify() {
 262         AWT_LOCK_COND.signal();
 263     }
 264 
 265     public static final void awtLockNotifyAll() {
 266         AWT_LOCK_COND.signalAll();
 267     }
 268 
 269     public static final boolean isAWTLockHeldByCurrentThread() {
 270         return AWT_LOCK.isHeldByCurrentThread();
 271     }
 272 
 273     /*
 274      * Create a new AppContext, along with its EventQueue, for a
 275      * new ThreadGroup.  Browser code, for example, would use this
 276      * method to create an AppContext & EventQueue for an Applet.
 277      */
 278     public static AppContext createNewAppContext() {
 279         @SuppressWarnings("deprecation")
 280         ThreadGroup threadGroup = Thread.currentThread().getThreadGroup();
 281         return createNewAppContext(threadGroup);
 282     }
 283 
 284     static final AppContext createNewAppContext(ThreadGroup threadGroup) {
 285         // Create appContext before initialization of EventQueue, so all
 286         // the calls to AppContext.getAppContext() from EventQueue ctor
 287         // return correct values
 288         AppContext appContext = new AppContext(threadGroup);
 289         initEQ(appContext);
 290 
 291         return appContext;
 292     }
 293 
 294     static void wakeupEventQueue(EventQueue q, boolean isShutdown){
 295         AWTAccessor.getEventQueueAccessor().wakeup(q, isShutdown);
 296     }
 297 
 298     /*
 299      * Fetch the peer associated with the given target (as specified
< prev index next >