...按钮点击,不管是单个的还是并发的,都会被放入事件队列(Event Queue)里面进行排队,然后事件分发线程(Event Dispatch Thread)会将它们一个一个取出,分派到相应的事件处理方法。
基于12个网页-相关网页
一旦线程被阻塞,所有事件都不能被分发,包括屏幕绘图事件。
When the thread is blocked, no events can be dispatched, including drawing events.
主线程非常重要,因为它负责把事件分发给相应的用户界面widget——包括屏幕绘图事件。
This thread is very important because it is in charge of dispatching events to the appropriate user interface widgets, including drawing events.
在多线程分发模型中,从队列中获取事件的线程启动另一个被称作任务线程的线程,并把事件交给它处理。
In multiple-threaded dispatching model, the thread fetching the events from the queue launches another thread called task thread, and hand the event over to it for processing.
应用推荐