80 |
* swing paint thread, which revalidates all invalid components and |
* swing paint thread, which revalidates all invalid components and |
81 |
* repaints any damage in the swing scene.</p> |
* repaints any damage in the swing scene.</p> |
82 |
*/ |
*/ |
|
|
|
83 |
protected class RepaintWorker |
protected class RepaintWorker |
84 |
implements Runnable |
implements Runnable |
85 |
{ |
{ |
86 |
|
|
87 |
boolean live; |
boolean live; |
88 |
|
|
89 |
public RepaintWorker() |
public RepaintWorker() |
90 |
{ |
{ |
91 |
live = false; |
live = false; |
92 |
} |
} |
93 |
|
|
94 |
public synchronized void setLive(boolean b) |
public synchronized void setLive(boolean b) |
95 |
{ |
{ |
96 |
live = b; |
live = b; |
97 |
} |
} |
98 |
|
|
99 |
public synchronized boolean isLive() |
public synchronized boolean isLive() |
100 |
{ |
{ |
101 |
return live; |
return live; |
102 |
} |
} |
103 |
|
|
104 |
public void run() |
public void run() |
105 |
{ |
{ |
106 |
RepaintManager rm = RepaintManager.globalManager; |
RepaintManager rm = RepaintManager.globalManager; |
108 |
rm.validateInvalidComponents(); |
rm.validateInvalidComponents(); |
109 |
rm.paintDirtyRegions(); |
rm.paintDirtyRegions(); |
110 |
} |
} |
111 |
|
|
112 |
} |
} |
113 |
|
|
|
|
|
114 |
/** |
/** |
115 |
* A table storing the dirty regions of components. The keys of this |
* A table storing the dirty regions of components. The keys of this |
116 |
* table are components, the values are rectangles. Each component maps |
* table are components, the values are rectangles. Each component maps |