Java Tutorial/SWT/SWT Thread — различия между версиями
Admin (обсуждение | вклад)  м (1 версия)  | 
			
(нет различий) 
 | 
Текущая версия на 15:20, 31 мая 2010
17. SWT Time-Consuming Operation UI Pattern
SWT does not allow non-UI threads to access user interface components directly.
   
   
Thread operationThread = new Thread() {
        public void run() {
            // time-consuming operations
            display.asyncExec/syncExec(new Runnable() {
                public void run() {
                // UI Updating procedures go here ...
                }
            });
        }
    };
    operationThread.start();
   
   
Professional Java Interfaces with SWT/JFace by Jackwind Li Guojie John Wiley & Sons 2005