jdk/src/java.desktop/share/classes/sun/awt/AppContext.java
changeset 32865 f9cb6e427f9e
parent 31653 d88ff422c7fb
child 32874 b563863620ec
equal deleted inserted replaced
32864:2a338536e642 32865:f9cb6e427f9e
   146     public static final Object EVENT_QUEUE_KEY = new StringBuffer("EventQueue");
   146     public static final Object EVENT_QUEUE_KEY = new StringBuffer("EventQueue");
   147 
   147 
   148     /*
   148     /*
   149      * The keys to store EventQueue push/pop lock and condition.
   149      * The keys to store EventQueue push/pop lock and condition.
   150      */
   150      */
   151     public final static Object EVENT_QUEUE_LOCK_KEY = new StringBuilder("EventQueue.Lock");
   151     public static final Object EVENT_QUEUE_LOCK_KEY = new StringBuilder("EventQueue.Lock");
   152     public final static Object EVENT_QUEUE_COND_KEY = new StringBuilder("EventQueue.Condition");
   152     public static final Object EVENT_QUEUE_COND_KEY = new StringBuilder("EventQueue.Condition");
   153 
   153 
   154     /* A map of AppContexts, referenced by ThreadGroup.
   154     /* A map of AppContexts, referenced by ThreadGroup.
   155      */
   155      */
   156     private static final Map<ThreadGroup, AppContext> threadGroup2appContext =
   156     private static final Map<ThreadGroup, AppContext> threadGroup2appContext =
   157             Collections.synchronizedMap(new IdentityHashMap<ThreadGroup, AppContext>());
   157             Collections.synchronizedMap(new IdentityHashMap<ThreadGroup, AppContext>());
   170        standalone apps only (i.e. not applets)
   170        standalone apps only (i.e. not applets)
   171      */
   171      */
   172     private static volatile AppContext mainAppContext = null;
   172     private static volatile AppContext mainAppContext = null;
   173 
   173 
   174     private static class GetAppContextLock {};
   174     private static class GetAppContextLock {};
   175     private final static Object getAppContextLock = new GetAppContextLock();
   175     private static final Object getAppContextLock = new GetAppContextLock();
   176 
   176 
   177     /*
   177     /*
   178      * The hash map associated with this AppContext.  A private delegate
   178      * The hash map associated with this AppContext.  A private delegate
   179      * is used instead of subclassing HashMap so as to avoid all of
   179      * is used instead of subclassing HashMap so as to avoid all of
   180      * HashMap's potentially risky methods, such as clear(), elements(),
   180      * HashMap's potentially risky methods, such as clear(), elements(),