Mercurial > projects > dwt2
comparison org.eclipse.ui.forms/src/org/eclipse/ui/internal/forms/widgets/BusyIndicator.d @ 19:52184e4b815c
no more direct tango.core.Thread. Rename JThread to java.lang.Thread.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 18 Mar 2009 10:55:25 +0100 |
parents | bc29606a740c |
children |
comparison
equal
deleted
inserted
replaced
18:735224fcc45f | 19:52184e4b815c |
---|---|
33 | 33 |
34 import java.lang.all; | 34 import java.lang.all; |
35 import java.util.Set; | 35 import java.util.Set; |
36 | 36 |
37 import tango.util.Convert; | 37 import tango.util.Convert; |
38 import java.lang.JThread; | 38 import java.lang.Thread; |
39 | 39 |
40 public final class BusyIndicator : Canvas { | 40 public final class BusyIndicator : Canvas { |
41 | 41 |
42 alias Canvas.computeSize computeSize; | 42 alias Canvas.computeSize computeSize; |
43 | 43 |
44 class BusyThread : JThread { | 44 class BusyThread : Thread { |
45 Rectangle bounds; | 45 Rectangle bounds; |
46 Display display; | 46 Display display; |
47 GC offScreenImageGC; | 47 GC offScreenImageGC; |
48 Image offScreenImage; | 48 Image offScreenImage; |
49 Image timage; | 49 Image timage; |
123 })); | 123 })); |
124 /* | 124 /* |
125 * Sleep for the specified delay time | 125 * Sleep for the specified delay time |
126 */ | 126 */ |
127 try { | 127 try { |
128 JThread.sleep(MILLISECONDS_OF_DELAY); | 128 Thread.sleep(MILLISECONDS_OF_DELAY); |
129 } catch (InterruptedException e) { | 129 } catch (InterruptedException e) { |
130 ExceptionPrintStackTrace(e); | 130 ExceptionPrintStackTrace(e); |
131 } | 131 } |
132 | 132 |
133 | 133 |
219 Rectangle bounds = getImage(0).getBounds(); | 219 Rectangle bounds = getImage(0).getBounds(); |
220 Display display = getDisplay(); | 220 Display display = getDisplay(); |
221 Image offScreenImage = new Image(display, bounds.width, bounds.height); | 221 Image offScreenImage = new Image(display, bounds.width, bounds.height); |
222 GC offScreenImageGC = new GC(offScreenImage); | 222 GC offScreenImageGC = new GC(offScreenImage); |
223 busyThread = new BusyThread(bounds, display, offScreenImageGC, offScreenImage); | 223 busyThread = new BusyThread(bounds, display, offScreenImageGC, offScreenImage); |
224 busyThread.setPriority(JThread.NORM_PRIORITY + 2); | 224 busyThread.setPriority(Thread.NORM_PRIORITY + 2); |
225 busyThread.setDaemon(true); | 225 busyThread.setDaemon(true); |
226 busyThread.start(); | 226 busyThread.start(); |
227 } | 227 } |
228 | 228 |
229 public void dispose() { | 229 public void dispose() { |