197 Object source, 198 boolean removeAllEvents) 199 { 200 eventQueue.removeSourceEvents(source, removeAllEvents); 201 } 202 public boolean noEvents(EventQueue eventQueue) { 203 return eventQueue.noEvents(); 204 } 205 public void wakeup(EventQueue eventQueue, boolean isShutdown) { 206 eventQueue.wakeup(isShutdown); 207 } 208 public void invokeAndWait(Object source, Runnable r) 209 throws InterruptedException, InvocationTargetException 210 { 211 EventQueue.invokeAndWait(source, r); 212 } 213 public void setFwDispatcher(EventQueue eventQueue, 214 FwDispatcher dispatcher) { 215 eventQueue.setFwDispatcher(dispatcher); 216 } 217 }); 218 } 219 220 public EventQueue() { 221 for (int i = 0; i < NUM_PRIORITIES; i++) { 222 queues[i] = new Queue(); 223 } 224 /* 225 * NOTE: if you ever have to start the associated event dispatch 226 * thread at this point, be aware of the following problem: 227 * If this EventQueue instance is created in 228 * SunToolkit.createNewAppContext() the started dispatch thread 229 * may call AppContext.getAppContext() before createNewAppContext() 230 * completes thus causing mess in thread group to appcontext mapping. 231 */ 232 233 appContext = AppContext.getAppContext(); 234 pushPopLock = (Lock)appContext.get(AppContext.EVENT_QUEUE_LOCK_KEY); 235 pushPopCond = (Condition)appContext.get(AppContext.EVENT_QUEUE_COND_KEY); 236 } | 197 Object source, 198 boolean removeAllEvents) 199 { 200 eventQueue.removeSourceEvents(source, removeAllEvents); 201 } 202 public boolean noEvents(EventQueue eventQueue) { 203 return eventQueue.noEvents(); 204 } 205 public void wakeup(EventQueue eventQueue, boolean isShutdown) { 206 eventQueue.wakeup(isShutdown); 207 } 208 public void invokeAndWait(Object source, Runnable r) 209 throws InterruptedException, InvocationTargetException 210 { 211 EventQueue.invokeAndWait(source, r); 212 } 213 public void setFwDispatcher(EventQueue eventQueue, 214 FwDispatcher dispatcher) { 215 eventQueue.setFwDispatcher(dispatcher); 216 } 217 218 @Override 219 public long getMostRecentEventTime(EventQueue eventQueue) { 220 return eventQueue.getMostRecentEventTimeImpl(); 221 } 222 }); 223 } 224 225 public EventQueue() { 226 for (int i = 0; i < NUM_PRIORITIES; i++) { 227 queues[i] = new Queue(); 228 } 229 /* 230 * NOTE: if you ever have to start the associated event dispatch 231 * thread at this point, be aware of the following problem: 232 * If this EventQueue instance is created in 233 * SunToolkit.createNewAppContext() the started dispatch thread 234 * may call AppContext.getAppContext() before createNewAppContext() 235 * completes thus causing mess in thread group to appcontext mapping. 236 */ 237 238 appContext = AppContext.getAppContext(); 239 pushPopLock = (Lock)appContext.get(AppContext.EVENT_QUEUE_LOCK_KEY); 240 pushPopCond = (Condition)appContext.get(AppContext.EVENT_QUEUE_COND_KEY); 241 } |