author | Claus Gittinger <cg@exept.de> |
Fri, 30 May 2008 14:25:44 +0200 | |
changeset 3425 | 20459e327062 |
parent 2931 | 74fc63bea835 |
child 3430 | 9fee581fff1d |
permissions | -rw-r--r-- |
62 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
2563 | 12 |
"{ Package: 'stx:libwidg2' }" |
1789 | 13 |
|
50 | 14 |
View subclass:#ProgressIndicator |
826 | 15 |
instanceVariableNames:'percentage showPercentage fgColor bgColor connectedTop |
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
16 |
connectedLabel collector finishAction closeTopWhenDone showBusy |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
17 |
busyPosition busyDelta busyIndicationProcess' |
183 | 18 |
classVariableNames:'' |
19 |
poolDictionaries:'' |
|
20 |
category:'Views-Misc' |
|
50 | 21 |
! |
22 |
||
334 | 23 |
!ProgressIndicator class methodsFor:'documentation'! |
50 | 24 |
|
62 | 25 |
copyright |
26 |
" |
|
27 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
28 |
All Rights Reserved |
|
29 |
||
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
50 | 39 |
documentation |
40 |
" |
|
41 |
a view showing a rectangle filled according the percentage value. |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
42 |
Can be used as a progress indicator a la MSwindows; |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
43 |
it can also be configured as a non-percentage busy indication |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
44 |
via the showBusyIndication flag (a la netscape). |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
45 |
|
574 | 46 |
Can be used as a widget within an application, or |
47 |
via the convenient #inBox: instance creation messages, |
|
48 |
which shows a progressDisplay in a modalBox, while some |
|
49 |
action is performed. |
|
50 |
See examples. |
|
183 | 51 |
|
52 |
[author:] |
|
2563 | 53 |
Claus Gittinger |
183 | 54 |
|
55 |
[see also:] |
|
2563 | 56 |
ActionWaitBox AnimatedLabel |
50 | 57 |
" |
58 |
! |
|
59 |
||
60 |
examples |
|
61 |
" |
|
62 | 62 |
basic (internal) interface |
63 |
(if progress indicator is to be used in a complex box ...): |
|
50 | 64 |
|
183 | 65 |
Before you get frustrated - see the convenient-interface examples |
66 |
at the end ;-) |
|
67 |
||
2563 | 68 |
[exBegin] |
50 | 69 |
|top p h| |
70 |
||
62 | 71 |
top := ModalBox new. |
50 | 72 |
top extent:300@100. |
73 |
top label:'Progress'. |
|
74 |
p := ProgressIndicator in:top. |
|
75 |
p origin:(0.0@0.5) corner:(1.0@0.5). |
|
76 |
p level:-1. |
|
62 | 77 |
h := p preferredExtent y. |
50 | 78 |
p topInset:(h // 2) negated; |
2563 | 79 |
bottomInset:(h // 2) negated; |
80 |
leftInset:5; |
|
81 |
rightInset:5. |
|
50 | 82 |
|
83 |
[ |
|
2563 | 84 |
1 to:100 do:[:val | |
85 |
(Delay forSeconds:0.05) wait. |
|
86 |
p percentage:val |
|
87 |
]. |
|
88 |
top hide. |
|
62 | 89 |
] fork. |
90 |
top open. |
|
2563 | 91 |
[exEnd] |
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
92 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
93 |
as a busy indicator |
2563 | 94 |
[exBegin] |
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
95 |
|top p h| |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
96 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
97 |
top := ModalBox new. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
98 |
top extent:300@100. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
99 |
top label:'Busy'. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
100 |
p := ProgressIndicator in:top. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
101 |
p origin:(0.0@0.5) corner:(1.0@0.5). |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
102 |
p level:-1. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
103 |
h := p preferredExtent y. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
104 |
p topInset:(h // 2) negated; |
2563 | 105 |
bottomInset:(h // 2) negated; |
106 |
leftInset:5; |
|
107 |
rightInset:5. |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
108 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
109 |
p showBusyIndication:true. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
110 |
[ |
2563 | 111 |
'do something here ....'. |
112 |
(Delay forSeconds:5) wait. |
|
113 |
top hide. |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
114 |
] fork. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
115 |
top open. |
2563 | 116 |
[exEnd] |
50 | 117 |
|
118 |
changing colors, turning percentage display off: |
|
2563 | 119 |
[exBegin] |
50 | 120 |
|top p h| |
121 |
||
122 |
top := StandardSystemView new. |
|
123 |
top extent:300@100. |
|
124 |
top label:'Progress'. |
|
125 |
p := ProgressIndicator in:top. |
|
126 |
p origin:(0.0@0.5) corner:(1.0@0.5). |
|
127 |
p level:-1. |
|
128 |
p showPercentage:false. |
|
129 |
p foregroundColor:(Color red). |
|
130 |
h := 10. |
|
131 |
p topInset:(h // 2) negated; |
|
2563 | 132 |
bottomInset:(h // 2) negated; |
133 |
leftInset:5; |
|
134 |
rightInset:5. |
|
50 | 135 |
top open. |
136 |
[ |
|
2563 | 137 |
1 to:100 do:[:val | |
138 |
(Delay forSeconds:0.05) wait. |
|
139 |
p percentage:val |
|
140 |
] |
|
50 | 141 |
] fork |
2563 | 142 |
[exEnd] |
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
143 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
144 |
as a busy indicator and percentage display (as in netscape) |
2563 | 145 |
[exBegin] |
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
146 |
|top p h| |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
147 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
148 |
top := ModalBox new. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
149 |
top extent:300@60. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
150 |
top label:'Busy'. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
151 |
p := ProgressIndicator in:top. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
152 |
p origin:(0.0@0.5) corner:(1.0@0.5). |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
153 |
p level:-1. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
154 |
p showPercentage:false. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
155 |
p backgroundColor:(Color cyan). |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
156 |
h := p preferredExtent y. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
157 |
p topInset:(h // 3) negated; |
2563 | 158 |
bottomInset:(h // 3) negated; |
159 |
leftInset:5; |
|
160 |
rightInset:5. |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
161 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
162 |
p showBusyIndication:true. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
163 |
[ |
2563 | 164 |
top label:'Busy'. |
165 |
1 to:100 do:[:i | |
|
166 |
(Delay forSeconds:0.05) wait. |
|
167 |
]. |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
168 |
|
2563 | 169 |
top label:'Percentage'. |
170 |
p showBusyIndication:false. |
|
171 |
1 to:100 do:[:i | |
|
172 |
(Delay forSeconds:0.05) wait. |
|
173 |
p percentage:i. |
|
174 |
]. |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
175 |
|
2563 | 176 |
top hide. |
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
177 |
] fork. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
178 |
top open. |
2563 | 179 |
[exEnd] |
50 | 180 |
|
181 |
with border (2D look): |
|
2563 | 182 |
[exBegin] |
50 | 183 |
|top p h| |
184 |
||
185 |
top := StandardSystemView new. |
|
186 |
top extent:300@100. |
|
187 |
top label:'Progress'. |
|
188 |
p := ProgressIndicator in:top. |
|
189 |
p origin:(0.0@0.5) corner:(1.0@0.5). |
|
190 |
p borderWidth:1. |
|
62 | 191 |
h := p preferredExtent y. |
50 | 192 |
p topInset:(h // 2) negated; |
2563 | 193 |
bottomInset:(h // 2) negated; |
194 |
leftInset:5; |
|
195 |
rightInset:5. |
|
50 | 196 |
top open. |
197 |
[ |
|
2563 | 198 |
1 to:100 do:[:val | |
199 |
(Delay forSeconds:0.05) wait. |
|
200 |
p percentage:val |
|
201 |
] |
|
50 | 202 |
] fork |
2563 | 203 |
[exEnd] |
50 | 204 |
|
205 |
||
206 |
getting progress from a model: |
|
2563 | 207 |
[exBegin] |
50 | 208 |
|model top p h| |
209 |
||
210 |
model := 0 asValue. |
|
211 |
||
212 |
top := StandardSystemView new. |
|
213 |
top extent:300@100. |
|
214 |
top label:'Progress'. |
|
215 |
p := ProgressIndicator in:top. |
|
216 |
p model:model. |
|
217 |
p origin:(0.0@0.5) corner:(1.0@0.5). |
|
218 |
p level:-1. |
|
62 | 219 |
h := p preferredExtent y. |
50 | 220 |
p topInset:(h // 2) negated; |
2563 | 221 |
bottomInset:(h // 2) negated; |
222 |
leftInset:5; |
|
223 |
rightInset:5. |
|
50 | 224 |
top open. |
225 |
||
226 |
[ |
|
2563 | 227 |
1 to:100 do:[:val | |
228 |
(Delay forSeconds:0.05) wait. |
|
229 |
model value:val |
|
230 |
] |
|
50 | 231 |
] fork |
2563 | 232 |
[exEnd] |
50 | 233 |
|
62 | 234 |
|
50 | 235 |
concrete example: |
236 |
search all files in the source directory for a string |
|
237 |
using grep. Show progress while doing so. |
|
2563 | 238 |
[exBegin] |
50 | 239 |
|top p h names done| |
240 |
||
241 |
top := StandardSystemView new. |
|
242 |
top extent:300@100. |
|
243 |
top label:'Searching ...'. |
|
244 |
p := ProgressIndicator in:top. |
|
245 |
p origin:(0.0@0.5) corner:(1.0@0.5). |
|
246 |
p level:-1. |
|
62 | 247 |
h := p preferredExtent y. |
50 | 248 |
p topInset:(h // 2) negated; |
2563 | 249 |
bottomInset:(h // 2) negated; |
250 |
leftInset:5; |
|
251 |
rightInset:5. |
|
50 | 252 |
top openWithPriority:(Processor activePriority + 1). |
253 |
||
254 |
names := 'source' asFilename directoryContents. |
|
255 |
done := 0. |
|
256 |
names do:[:aName | |
|
2563 | 257 |
|fn stream line| |
50 | 258 |
|
2563 | 259 |
p percentage:(done / names size * 100). |
260 |
fn := ('source/' , aName) asFilename. |
|
261 |
fn isDirectory ifFalse:[ |
|
262 |
stream := fn readStream. |
|
263 |
[stream atEnd] whileFalse:[ |
|
264 |
line := stream nextLine. |
|
265 |
(line findString:'subclass:') ~~ 0 ifTrue:[ |
|
266 |
Transcript showCR:line |
|
267 |
]. |
|
268 |
]. |
|
269 |
stream close. |
|
270 |
]. |
|
271 |
done := done + 1 |
|
50 | 272 |
]. |
273 |
||
274 |
top destroy |
|
2563 | 275 |
[exEnd] |
62 | 276 |
|
277 |
||
278 |
using the convenient inBox-interface |
|
279 |
||
280 |
(this creates a box and an activity label and evaluates a block |
|
281 |
to indicate ...) |
|
282 |
||
283 |
basic interface demonstration: |
|
2563 | 284 |
[exBegin] |
62 | 285 |
|p| |
286 |
||
287 |
p := ProgressIndicator |
|
2563 | 288 |
inBoxWithLabel:'doing something ...' |
289 |
abortable:true. |
|
62 | 290 |
p showProgressOf: |
2563 | 291 |
[:progressValue :currentAction | |
62 | 292 |
|
2563 | 293 |
1 to:100 do:[:val | |
294 |
(Delay forSeconds:0.05) wait. |
|
295 |
val == 25 ifTrue:[ |
|
296 |
currentAction value:'still going ...' |
|
297 |
]. |
|
298 |
val == 50 ifTrue:[ |
|
299 |
currentAction value:'halfway through ...' |
|
300 |
]. |
|
301 |
val == 75 ifTrue:[ |
|
302 |
currentAction value:'almost finished ...' |
|
303 |
]. |
|
304 |
progressValue value:val |
|
305 |
] |
|
306 |
] |
|
307 |
[exEnd] |
|
62 | 308 |
|
309 |
||
310 |
above search example using this convenient interface: |
|
2563 | 311 |
[exBegin] |
62 | 312 |
|p| |
313 |
||
183 | 314 |
p := ProgressIndicator |
2563 | 315 |
inBoxWithLabel:'searching files ...' |
316 |
abortable:false. |
|
62 | 317 |
p showProgressOf: |
2563 | 318 |
[:progressValue :currentAction | |
319 |
|names nDone| |
|
62 | 320 |
|
2563 | 321 |
names := 'source' asFilename directoryContents. |
322 |
nDone := 0. |
|
323 |
names do:[:aName | |
|
324 |
|fn stream line| |
|
183 | 325 |
|
2563 | 326 |
progressValue value:(nDone / names size * 100). |
327 |
currentAction value:'searching ' , 'source/' , aName , ' ...'. |
|
62 | 328 |
|
2563 | 329 |
fn := ('source/' , aName) asFilename. |
330 |
fn isDirectory ifFalse:[ |
|
331 |
stream := fn readStream. |
|
332 |
[stream atEnd] whileFalse:[ |
|
333 |
line := stream nextLine. |
|
334 |
(line findString:'subclass:') ~~ 0 ifTrue:[ |
|
335 |
Transcript showCR:line |
|
336 |
]. |
|
337 |
]. |
|
338 |
stream close. |
|
339 |
]. |
|
340 |
nDone := nDone + 1 |
|
341 |
]. |
|
342 |
]. |
|
343 |
[exEnd] |
|
62 | 344 |
|
345 |
||
346 |
a nice example: copying files a la windows ... |
|
183 | 347 |
the following copies all files to /dev/null. |
2563 | 348 |
[exBegin] |
62 | 349 |
|p| |
350 |
||
351 |
(ProgressIndicator |
|
2563 | 352 |
inBoxWithLabel:'copy files to /dev/null ...' |
353 |
abortable:true) |
|
354 |
showProgressOf: |
|
355 |
[:progressValue :currentAction | |
|
356 |
|files nFiles nDone| |
|
62 | 357 |
|
2563 | 358 |
files := '.' asFilename directoryContents. |
359 |
nFiles := files size. |
|
360 |
nDone := 0. |
|
361 |
files do:[:aFileName | |
|
362 |
|percent| |
|
50 | 363 |
|
2563 | 364 |
nDone := nDone + 1. |
365 |
percent := nDone / nFiles * 100. |
|
366 |
progressValue value:percent. |
|
367 |
aFileName asFilename isDirectory ifTrue:[ |
|
368 |
Transcript showCR:('skipping ' , aFileName , ' ...'). |
|
369 |
currentAction value:('skipping ' , aFileName , ' ...'). |
|
370 |
] ifFalse:[ |
|
371 |
Transcript showCR:('copying ' , aFileName , ' ...'). |
|
372 |
currentAction value:('copying ' , aFileName , ' ...'). |
|
373 |
Object errorSignal handle:[:ex | |
|
374 |
self warn:'an error occurred while copying ' , aFileName. |
|
375 |
ex return |
|
376 |
] do:[ |
|
377 |
aFileName asFilename copyTo:'/dev/null'. |
|
378 |
] |
|
379 |
]. |
|
380 |
]. |
|
381 |
]. |
|
382 |
[exEnd] |
|
183 | 383 |
" |
50 | 384 |
! ! |
385 |
||
334 | 386 |
!ProgressIndicator class methodsFor:'instance creation'! |
62 | 387 |
|
2850 | 388 |
displayBusyIndicator:aLabel at:aPoint during:aBlock |
389 |
"easy interface - show progress while evaluating aBlock. |
|
390 |
The block is passed a valueHolder, which is to be set to values from |
|
391 |
startValue to endValue during the blocks evaluation. |
|
392 |
This is scaled to 0..100% completion. |
|
393 |
Set the valueHolder to nil, to get a busy-indicator" |
|
394 |
||
395 |
|p| |
|
396 |
||
397 |
p := self |
|
398 |
inBoxWithLabel:aLabel |
|
399 |
icon:nil |
|
400 |
text:aLabel |
|
401 |
abortable:false |
|
402 |
view:nil |
|
403 |
closeWhenDone:true. |
|
404 |
||
405 |
p showBusyIndication:true. |
|
406 |
p showBusyIndicatorDuring:[ |
|
2931 | 407 |
CannotReturnError catch:[ |
2850 | 408 |
aBlock value. |
409 |
] |
|
410 |
] |
|
411 |
||
412 |
" |
|
413 |
ProgressIndicator |
|
414 |
displayBusyIndicator:'doobidoobidoo...' |
|
415 |
at:(Screen default center) |
|
416 |
during:[ |
|
417 |
200 to:400 by:5 do:[:i | |
|
418 |
Delay waitForSeconds:0.1. |
|
419 |
] |
|
420 |
]. |
|
421 |
" |
|
422 |
! |
|
423 |
||
1462 | 424 |
displayProgress:aLabel at:aPoint from:startValue to:endValue during:aBlock |
425 |
"easy interface - show progress while evaluating aBlock. |
|
426 |
The block is passed a valueHolder, which is to be set to values from |
|
427 |
startValue to endValue during the blocks evaluation. |
|
2435 | 428 |
This is scaled to 0..100% completion. |
429 |
Set the valueHolder to nil, to get a busy-indicator" |
|
1462 | 430 |
|
431 |
|p| |
|
432 |
||
433 |
p := self |
|
2931 | 434 |
inBoxWithLabel:aLabel |
435 |
icon:nil |
|
436 |
text:aLabel |
|
437 |
abortable:false |
|
438 |
view:nil |
|
439 |
closeWhenDone:true. |
|
1462 | 440 |
|
441 |
p showProgressOf:[:progressValue :currentAction | |
|
2931 | 442 |
|scaler| |
1463 | 443 |
|
2931 | 444 |
scaler := [:scaledValue | |
445 |
|newPercentage oldPercentage oldLabel| |
|
2435 | 446 |
|
2931 | 447 |
scaledValue isNil ifTrue:[ |
448 |
p showBusyIndication:true |
|
449 |
] ifFalse:[ |
|
450 |
p showBusyIndication:false. |
|
451 |
oldPercentage := progressValue value. |
|
452 |
newPercentage := (scaledValue - startValue) / (endValue-startValue) * 100. |
|
453 |
newPercentage ~= oldPercentage ifTrue:[ |
|
454 |
progressValue value:newPercentage. |
|
455 |
]. |
|
456 |
oldLabel := currentAction value. |
|
457 |
oldLabel ~= aLabel ifTrue:[ |
|
458 |
currentAction value:aLabel. |
|
459 |
] |
|
460 |
] |
|
461 |
]. |
|
462 |
CannotReturnError catch:[ |
|
463 |
aBlock value:scaler. |
|
464 |
] |
|
1462 | 465 |
] |
466 |
||
467 |
" |
|
468 |
ProgressIndicator |
|
2931 | 469 |
displayProgress:'doobidoobidoo...' |
470 |
at:(Screen default center) |
|
471 |
from:200 |
|
472 |
to:400 |
|
473 |
during:[:val | |
|
474 |
200 to:400 by:5 do:[:i | |
|
475 |
val value:i. |
|
476 |
Delay waitForSeconds:0.1. |
|
477 |
] |
|
478 |
]. |
|
1462 | 479 |
" |
480 |
! |
|
481 |
||
62 | 482 |
inBox |
574 | 483 |
"create a topView containing an instance of myself, |
484 |
for later use with #showProgressOf:" |
|
485 |
||
486 |
^ self inBoxWithLabel:'executing ...' abortable:false |
|
487 |
||
488 |
"Modified: 22.10.1997 / 21:08:37 / cg" |
|
62 | 489 |
! |
490 |
||
491 |
inBoxWithLabel:aLabel |
|
492 |
"create a topView containing an instance of myself, |
|
493 |
for later use with #showProgressOf:" |
|
494 |
||
495 |
^ self inBoxWithLabel:aLabel abortable:false |
|
496 |
! |
|
497 |
||
498 |
inBoxWithLabel:aLabel abortable:abortable |
|
499 |
"create a topView containing an instance of myself, |
|
500 |
for later use with #showProgressOf:" |
|
501 |
||
219
44246b9b4288
use new windowGroupQuery for background process
Claus Gittinger <cg@exept.de>
parents:
201
diff
changeset
|
502 |
^ self |
634 | 503 |
inBoxWithLabel:aLabel |
504 |
text:'' |
|
505 |
abortable:abortable |
|
219
44246b9b4288
use new windowGroupQuery for background process
Claus Gittinger <cg@exept.de>
parents:
201
diff
changeset
|
506 |
|
44246b9b4288
use new windowGroupQuery for background process
Claus Gittinger <cg@exept.de>
parents:
201
diff
changeset
|
507 |
"Modified: 17.7.1996 / 15:14:58 / cg" |
44246b9b4288
use new windowGroupQuery for background process
Claus Gittinger <cg@exept.de>
parents:
201
diff
changeset
|
508 |
! |
44246b9b4288
use new windowGroupQuery for background process
Claus Gittinger <cg@exept.de>
parents:
201
diff
changeset
|
509 |
|
237 | 510 |
inBoxWithLabel:aLabel icon:anIcon text:text abortable:abortable view:additionalView closeWhenDone:closeWhenDoneBoolean |
219
44246b9b4288
use new windowGroupQuery for background process
Claus Gittinger <cg@exept.de>
parents:
201
diff
changeset
|
511 |
"create a topView containing an instance of myself, |
44246b9b4288
use new windowGroupQuery for background process
Claus Gittinger <cg@exept.de>
parents:
201
diff
changeset
|
512 |
for later use with #showProgressOf:" |
44246b9b4288
use new windowGroupQuery for background process
Claus Gittinger <cg@exept.de>
parents:
201
diff
changeset
|
513 |
|
2436 | 514 |
|top p l y y2| |
62 | 515 |
|
516 |
top := Dialog new. |
|
517 |
top label:aLabel. |
|
518 |
top cursor:(Cursor wait). |
|
826 | 519 |
y2 := 0. |
237 | 520 |
anIcon notNil ifTrue:[ |
3425
20459e327062
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
2931
diff
changeset
|
521 |
y := top yPosition. |
20459e327062
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
2931
diff
changeset
|
522 |
l := top addTextLabel:anIcon. |
20459e327062
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
2931
diff
changeset
|
523 |
l borderWidth:0. |
20459e327062
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
2931
diff
changeset
|
524 |
l adjust:#left. |
20459e327062
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
2931
diff
changeset
|
525 |
l cursor:(Cursor wait). |
20459e327062
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
2931
diff
changeset
|
526 |
y2 := top yPosition. |
20459e327062
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
2931
diff
changeset
|
527 |
top yPosition:y. |
237 | 528 |
]. |
529 |
||
219
44246b9b4288
use new windowGroupQuery for background process
Claus Gittinger <cg@exept.de>
parents:
201
diff
changeset
|
530 |
l := top addTextLabel:text. |
62 | 531 |
l borderWidth:0. |
74 | 532 |
l adjust:#left. |
62 | 533 |
l cursor:(Cursor wait). |
826 | 534 |
anIcon notNil ifTrue: [l leftInset:(anIcon width + 10)]. |
237 | 535 |
|
536 |
top yPosition:(top yPosition max:y2). |
|
62 | 537 |
|
538 |
top addVerticalSpace. |
|
539 |
||
540 |
p := ProgressIndicator new. |
|
3425
20459e327062
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
2931
diff
changeset
|
541 |
p extent:(1.0 @ p preferredHeight). |
62 | 542 |
p level:-1. |
543 |
p leftInset:5; |
|
544 |
rightInset:5. |
|
545 |
p cursor:(Cursor wait). |
|
237 | 546 |
p closeTopWhenDone:closeWhenDoneBoolean. |
62 | 547 |
p connectToTop:top label:l. |
548 |
||
549 |
top addComponent:p. |
|
550 |
||
237 | 551 |
additionalView notNil ifTrue:[ |
3425
20459e327062
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
2931
diff
changeset
|
552 |
top addComponent:additionalView. |
20459e327062
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
2931
diff
changeset
|
553 |
additionalView extent:(1.0 @ additionalView preferredHeight). |
237 | 554 |
]. |
555 |
||
62 | 556 |
abortable ifTrue:[ |
3425
20459e327062
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
2931
diff
changeset
|
557 |
top addVerticalSpace. |
20459e327062
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
2931
diff
changeset
|
558 |
top addAbortButton |
62 | 559 |
]. |
560 |
||
561 |
^ p |
|
219
44246b9b4288
use new windowGroupQuery for background process
Claus Gittinger <cg@exept.de>
parents:
201
diff
changeset
|
562 |
|
44246b9b4288
use new windowGroupQuery for background process
Claus Gittinger <cg@exept.de>
parents:
201
diff
changeset
|
563 |
"Created: 17.7.1996 / 15:14:33 / cg" |
44246b9b4288
use new windowGroupQuery for background process
Claus Gittinger <cg@exept.de>
parents:
201
diff
changeset
|
564 |
"Modified: 17.7.1996 / 15:16:58 / cg" |
237 | 565 |
! |
566 |
||
567 |
inBoxWithLabel:aLabel text:text abortable:abortable |
|
568 |
"create a topView containing an instance of myself, |
|
569 |
for later use with #showProgressOf:" |
|
570 |
||
571 |
^ self |
|
634 | 572 |
inBoxWithLabel:aLabel |
573 |
text:text |
|
574 |
abortable:abortable |
|
575 |
view:nil |
|
237 | 576 |
|
577 |
! |
|
578 |
||
579 |
inBoxWithLabel:aLabel text:text abortable:abortable view:additionalView |
|
580 |
"create a topView containing an instance of myself, |
|
581 |
for later use with #showProgressOf:" |
|
582 |
||
583 |
^ self |
|
634 | 584 |
inBoxWithLabel:aLabel |
585 |
text:text |
|
586 |
abortable:abortable |
|
587 |
view:additionalView |
|
588 |
closeWhenDone:true |
|
237 | 589 |
|
590 |
! |
|
591 |
||
592 |
inBoxWithLabel:aLabel text:text abortable:abortable view:additionalView closeWhenDone:closeWhenDoneBoolean |
|
593 |
"create a topView containing an instance of myself, |
|
594 |
for later use with #showProgressOf:" |
|
595 |
||
596 |
^ self |
|
634 | 597 |
inBoxWithLabel:aLabel |
598 |
icon:nil |
|
599 |
text:text |
|
600 |
abortable:abortable |
|
601 |
view:additionalView |
|
602 |
closeWhenDone:closeWhenDoneBoolean |
|
237 | 603 |
|
1681
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
604 |
! |
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
605 |
|
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
606 |
progressOpenOn:progressModel label:aLabel |
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
607 |
"create and open a progressIndicator dialog window, |
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
608 |
bit do not open it modal; instead, it is opened modeless |
1834
ba170c21ed76
defaultExtent computation fixed
Claus Gittinger <cg@exept.de>
parents:
1789
diff
changeset
|
609 |
and control returns to the caller. |
1681
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
610 |
The models value is assumed to be 0..1 |
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
611 |
(which is for compatibility and different from ST/X's percentage use) |
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
612 |
Added for VW compatibility (RB)." |
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
613 |
|
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
614 |
|p ra| |
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
615 |
|
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
616 |
p := self |
2563 | 617 |
inBoxWithLabel:aLabel |
618 |
icon:nil |
|
619 |
text:aLabel |
|
620 |
abortable:false |
|
621 |
view:nil |
|
622 |
closeWhenDone:false. |
|
1681
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
623 |
|
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
624 |
ra := RangeAdaptor on:progressModel start:0 stop:0.01 grid:nil. |
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
625 |
p model:ra. |
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
626 |
|
2132 | 627 |
p topView openModeless; waitUntilVisible. |
1681
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
628 |
^ p. |
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
629 |
|
9ef9e8ec0f43
progressOpenOn:label: for VW compatibility
Claus Gittinger <cg@exept.de>
parents:
1463
diff
changeset
|
630 |
"Modified: / 4.2.2000 / 01:25:55 / cg" |
62 | 631 |
! ! |
632 |
||
183 | 633 |
!ProgressIndicator methodsFor:'accessing'! |
634 |
||
334 | 635 |
percentage:aNumber |
636 |
"set the percentage" |
|
237 | 637 |
|
183 | 638 |
|newPercentage| |
639 |
||
2040
702df7addef9
busy indicator when percentage is negative
Claus Gittinger <cg@exept.de>
parents:
1935
diff
changeset
|
640 |
aNumber < 0 ifTrue:[ |
2659
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
641 |
newPercentage := -1. |
2040
702df7addef9
busy indicator when percentage is negative
Claus Gittinger <cg@exept.de>
parents:
1935
diff
changeset
|
642 |
] ifFalse:[ |
2659
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
643 |
newPercentage := ((aNumber max:0) min:100) rounded. |
2040
702df7addef9
busy indicator when percentage is negative
Claus Gittinger <cg@exept.de>
parents:
1935
diff
changeset
|
644 |
]. |
910
5c9592e782fd
always repairNow (to make change visible immediately)
Claus Gittinger <cg@exept.de>
parents:
865
diff
changeset
|
645 |
newPercentage ~= percentage ifTrue:[ |
2659
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
646 |
percentage := newPercentage. |
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
647 |
self invalidateRepairNow:true. |
183 | 648 |
] |
334 | 649 |
|
910
5c9592e782fd
always repairNow (to make change visible immediately)
Claus Gittinger <cg@exept.de>
parents:
865
diff
changeset
|
650 |
"Modified: / 6.6.1998 / 19:43:56 / cg" |
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
651 |
! |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
652 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
653 |
showBusyIndication:aBooleanHolder |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
654 |
"switch between percentage mode (if false) and busy indication (if true)" |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
655 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
656 |
aBooleanHolder ~~ showBusy ifTrue:[ |
2563 | 657 |
showBusy notNil ifTrue:[ |
658 |
showBusy removeDependent:self. |
|
659 |
]. |
|
660 |
showBusy := aBooleanHolder. |
|
661 |
showBusy addDependent:self. |
|
662 |
(showBusy value) ifTrue:[ |
|
663 |
self startBusyIndicationProcess. |
|
664 |
] ifFalse:[ |
|
665 |
self stopBusyIndicationProcess |
|
666 |
]. |
|
667 |
shown ifTrue:[self redraw] |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
668 |
]. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
669 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
670 |
"Created: / 21.10.1998 / 17:35:16 / cg" |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
671 |
"Modified: / 21.10.1998 / 18:03:06 / cg" |
334 | 672 |
! ! |
673 |
||
2404 | 674 |
!ProgressIndicator methodsFor:'accessing-behavior'! |
675 |
||
676 |
closeTopWhenDone:aBoolean |
|
677 |
"set/clear the close-topView-when-done flag" |
|
678 |
||
679 |
closeTopWhenDone := aBoolean |
|
680 |
||
681 |
"Created: 3.9.1996 / 14:22:03 / cg" |
|
682 |
"Modified: 29.3.1997 / 16:08:19 / cg" |
|
683 |
! |
|
684 |
||
685 |
finishAction:aBlock |
|
686 |
"define an action to be performed when finished" |
|
687 |
||
688 |
finishAction := aBlock |
|
689 |
||
690 |
"Created: 3.9.1996 / 14:15:15 / cg" |
|
691 |
"Modified: 29.3.1997 / 16:08:35 / cg" |
|
692 |
! ! |
|
693 |
||
694 |
!ProgressIndicator methodsFor:'accessing-look'! |
|
334 | 695 |
|
826 | 696 |
backgroundColor |
697 |
"return the percentage displays background color" |
|
698 |
||
699 |
^ bgColor |
|
700 |
||
701 |
! |
|
702 |
||
703 |
backgroundColor:aColor |
|
704 |
"set the percentage displays background color" |
|
705 |
||
993 | 706 |
aColor ~= bgColor ifTrue:[ |
2659
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
707 |
bgColor := aColor. |
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
708 |
self invalidateRepairNow:true |
826 | 709 |
]. |
710 |
||
993 | 711 |
"Modified: / 20.7.1998 / 23:32:48 / cg" |
826 | 712 |
! |
713 |
||
335
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
714 |
foregroundColor |
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
715 |
"return the percentage displays foreground color" |
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
716 |
|
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
717 |
^ fgColor |
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
718 |
|
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
719 |
"Created: 29.3.1997 / 16:12:28 / cg" |
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
720 |
! |
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
721 |
|
334 | 722 |
foregroundColor:aColor |
723 |
"set the percentage displays foreground color" |
|
724 |
||
993 | 725 |
aColor ~= fgColor ifTrue:[ |
2659
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
726 |
fgColor := aColor. |
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
727 |
self invalidateRepairNow:true |
336 | 728 |
]. |
334 | 729 |
|
993 | 730 |
"Modified: / 20.7.1998 / 23:27:47 / cg" |
183 | 731 |
! |
732 |
||
335
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
733 |
showPercentage |
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
734 |
"return the flag controlling if the percentage is to be shown numerically" |
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
735 |
|
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
736 |
^ showPercentage |
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
737 |
|
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
738 |
"Created: 29.3.1997 / 16:12:39 / cg" |
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
739 |
! |
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
740 |
|
183 | 741 |
showPercentage:aBoolean |
334 | 742 |
"set/clear the flag controlling if the percentage is to be shown numerically" |
743 |
||
336 | 744 |
showPercentage := aBoolean. |
2659
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
745 |
self invalidateRepairNow:true |
334 | 746 |
|
910
5c9592e782fd
always repairNow (to make change visible immediately)
Claus Gittinger <cg@exept.de>
parents:
865
diff
changeset
|
747 |
"Modified: / 6.6.1998 / 19:28:44 / cg" |
183 | 748 |
! ! |
749 |
||
750 |
!ProgressIndicator methodsFor:'change & update'! |
|
751 |
||
752 |
update:aspect with:aParameter from:changedObject |
|
574 | 753 |
"react upon value changes of my model" |
754 |
||
183 | 755 |
(aspect == aspectMsg |
756 |
and:[changedObject == model]) ifTrue:[ |
|
2563 | 757 |
self percentage:(model perform:aspectMsg). |
758 |
^ self |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
759 |
]. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
760 |
changedObject == showBusy ifTrue:[ |
2563 | 761 |
self redraw. |
762 |
^ self |
|
183 | 763 |
]. |
764 |
^ super update:aspect with:aParameter from:changedObject |
|
574 | 765 |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
766 |
"Modified: / 21.10.1998 / 18:01:52 / cg" |
183 | 767 |
! ! |
768 |
||
769 |
!ProgressIndicator methodsFor:'drawing'! |
|
770 |
||
771 |
redraw |
|
574 | 772 |
"redraw the percentage bar and optional percentage string" |
773 |
||
2040
702df7addef9
busy indicator when percentage is negative
Claus Gittinger <cg@exept.de>
parents:
1935
diff
changeset
|
774 |
|s lx rx sx sy sw m2 m w h doBusy| |
183 | 775 |
|
776 |
m := margin + 1. |
|
863 | 777 |
m2 := m*2. |
778 |
||
779 |
w := width - m2. |
|
780 |
h := height - m2. |
|
183 | 781 |
|
910
5c9592e782fd
always repairNow (to make change visible immediately)
Claus Gittinger <cg@exept.de>
parents:
865
diff
changeset
|
782 |
"/ self clear. |
863 | 783 |
|
2040
702df7addef9
busy indicator when percentage is negative
Claus Gittinger <cg@exept.de>
parents:
1935
diff
changeset
|
784 |
doBusy := showBusy value. |
702df7addef9
busy indicator when percentage is negative
Claus Gittinger <cg@exept.de>
parents:
1935
diff
changeset
|
785 |
doBusy ifFalse:[ |
2563 | 786 |
percentage value < 0 ifTrue:[ |
787 |
self startBusyIndicationProcess. |
|
788 |
doBusy := true. |
|
789 |
]. |
|
2040
702df7addef9
busy indicator when percentage is negative
Claus Gittinger <cg@exept.de>
parents:
1935
diff
changeset
|
790 |
]. |
702df7addef9
busy indicator when percentage is negative
Claus Gittinger <cg@exept.de>
parents:
1935
diff
changeset
|
791 |
|
702df7addef9
busy indicator when percentage is negative
Claus Gittinger <cg@exept.de>
parents:
1935
diff
changeset
|
792 |
doBusy ifTrue:[ |
2563 | 793 |
self paint:bgColor. |
794 |
self fillRectangleX:m y:m width:w height:h. |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
795 |
|
2563 | 796 |
lx := (w * busyPosition / 100) rounded. |
797 |
rx := (w * (busyPosition + 20) / 100) rounded. |
|
798 |
rx := rx min:w. |
|
799 |
lx := lx max:m. |
|
800 |
self paint:fgColor. |
|
801 |
self fillRectangleX:lx y:m width:(rx - lx) height:h. |
|
802 |
^ self |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
803 |
]. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
804 |
|
2040
702df7addef9
busy indicator when percentage is negative
Claus Gittinger <cg@exept.de>
parents:
1935
diff
changeset
|
805 |
self stopBusyIndicationProcess. |
702df7addef9
busy indicator when percentage is negative
Claus Gittinger <cg@exept.de>
parents:
1935
diff
changeset
|
806 |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
807 |
rx := (w * percentage / 100) rounded. |
826 | 808 |
self paint:bgColor. |
843 | 809 |
self fillRectangleX:m+rx y:m width:w-rx height:h. |
183 | 810 |
|
811 |
showPercentage ifTrue:[ |
|
2563 | 812 |
s := percentage printString , ' %'. |
813 |
font := font onDevice:device. |
|
814 |
sw := font widthOf:s . |
|
815 |
sx := (width - sw) // 2. |
|
816 |
sy := height // 2 + font descent + 2. |
|
347 | 817 |
|
2563 | 818 |
rx <= (sx+sw) ifTrue:[ |
819 |
self paint:Color black. |
|
820 |
self displayString:s x:sx y:sy. |
|
821 |
] |
|
183 | 822 |
]. |
823 |
||
824 |
self paint:fgColor. |
|
825 |
self fillRectangleX:m y:m width:rx height:h. |
|
826 |
||
827 |
showPercentage ifTrue:[ |
|
2563 | 828 |
rx >= sx ifTrue:[ |
829 |
self clippingRectangle:(m@m corner:rx+1 @ h). |
|
830 |
self paint:Color white. |
|
831 |
self displayString:s x:sx y:sy. |
|
832 |
self clippingRectangle:nil |
|
833 |
] |
|
183 | 834 |
] |
347 | 835 |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
836 |
"Modified: / 21.10.1998 / 18:01:58 / cg" |
863 | 837 |
! |
838 |
||
839 |
sizeChanged:how |
|
840 |
super sizeChanged:how. |
|
2659
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
841 |
self invalidate |
863 | 842 |
|
843 |
"Created: / 18.4.1998 / 02:34:37 / cg" |
|
865 | 844 |
"Modified: / 18.4.1998 / 14:09:40 / cg" |
183 | 845 |
! ! |
846 |
||
2501 | 847 |
!ProgressIndicator methodsFor:'initialization & release'! |
183 | 848 |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
849 |
destroy |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
850 |
busyIndicationProcess notNil ifTrue:[ |
2563 | 851 |
self stopBusyIndicationProcess |
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
852 |
]. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
853 |
super destroy. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
854 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
855 |
"Created: / 21.10.1998 / 17:29:58 / cg" |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
856 |
"Modified: / 21.10.1998 / 17:30:36 / cg" |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
857 |
! |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
858 |
|
574 | 859 |
initStyle |
860 |
"initialize styleSheet values" |
|
335
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
861 |
|
575 | 862 |
<resource: #style (#'progressIndicator.viewBackground' |
2921 | 863 |
#'progressIndicator.foregroundColor')> |
574 | 864 |
|
865 |
super initStyle. |
|
335
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
866 |
|
347 | 867 |
self is3D ifTrue:[ |
2921 | 868 |
self level:-1 |
347 | 869 |
]. |
870 |
||
826 | 871 |
bgColor := styleSheet colorAt:'progressIndicator.viewBackground' default:Color white. |
574 | 872 |
fgColor := styleSheet colorAt:'progressIndicator.foregroundColor' default:Color blue. |
335
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
873 |
fgColor := fgColor onDevice:device. |
6f007bdeae94
resource-tag & access methods.
Claus Gittinger <cg@exept.de>
parents:
334
diff
changeset
|
874 |
|
183 | 875 |
showPercentage := true. |
574 | 876 |
! |
877 |
||
878 |
initialize |
|
826 | 879 |
|
574 | 880 |
super initialize. |
826 | 881 |
|
574 | 882 |
percentage := 0. |
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
883 |
showBusy := false. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
884 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
885 |
"Modified: / 21.10.1998 / 17:33:02 / cg" |
1935
a2338e64cf2f
terminate/recreate busyIndicator-animation process if unmapped/mapped
frank
parents:
1852
diff
changeset
|
886 |
! |
a2338e64cf2f
terminate/recreate busyIndicator-animation process if unmapped/mapped
frank
parents:
1852
diff
changeset
|
887 |
|
a2338e64cf2f
terminate/recreate busyIndicator-animation process if unmapped/mapped
frank
parents:
1852
diff
changeset
|
888 |
mapped |
a2338e64cf2f
terminate/recreate busyIndicator-animation process if unmapped/mapped
frank
parents:
1852
diff
changeset
|
889 |
super mapped. |
a2338e64cf2f
terminate/recreate busyIndicator-animation process if unmapped/mapped
frank
parents:
1852
diff
changeset
|
890 |
(showBusy value) ifTrue:[ |
2563 | 891 |
self startBusyIndicationProcess. |
1935
a2338e64cf2f
terminate/recreate busyIndicator-animation process if unmapped/mapped
frank
parents:
1852
diff
changeset
|
892 |
]. |
a2338e64cf2f
terminate/recreate busyIndicator-animation process if unmapped/mapped
frank
parents:
1852
diff
changeset
|
893 |
! |
a2338e64cf2f
terminate/recreate busyIndicator-animation process if unmapped/mapped
frank
parents:
1852
diff
changeset
|
894 |
|
a2338e64cf2f
terminate/recreate busyIndicator-animation process if unmapped/mapped
frank
parents:
1852
diff
changeset
|
895 |
unmapped |
a2338e64cf2f
terminate/recreate busyIndicator-animation process if unmapped/mapped
frank
parents:
1852
diff
changeset
|
896 |
super unmapped. |
a2338e64cf2f
terminate/recreate busyIndicator-animation process if unmapped/mapped
frank
parents:
1852
diff
changeset
|
897 |
(showBusy value) ifTrue:[ |
2563 | 898 |
self stopBusyIndicationProcess. |
1935
a2338e64cf2f
terminate/recreate busyIndicator-animation process if unmapped/mapped
frank
parents:
1852
diff
changeset
|
899 |
]. |
574 | 900 |
! ! |
901 |
||
902 |
!ProgressIndicator methodsFor:'private'! |
|
903 |
||
904 |
connectToTop:top label:label |
|
905 |
connectedTop := top. |
|
906 |
connectedLabel := label |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
907 |
! |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
908 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
909 |
startBusyIndicationProcess |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
910 |
busyIndicationProcess isNil ifTrue:[ |
2563 | 911 |
busyPosition := 0. |
912 |
busyDelta := 5. |
|
913 |
busyIndicationProcess := [ |
|
914 |
[self realized] whileTrue:[ |
|
915 |
Delay waitForSeconds:0.2. |
|
916 |
self shown ifTrue:[ |
|
917 |
self updateBusyIndicatorPosition. |
|
918 |
] |
|
919 |
]. |
|
920 |
busyIndicationProcess := nil. |
|
921 |
] fork. |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
922 |
]. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
923 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
924 |
"Created: / 21.10.1998 / 18:02:35 / cg" |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
925 |
"Modified: / 21.10.1998 / 18:03:49 / cg" |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
926 |
! |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
927 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
928 |
stopBusyIndicationProcess |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
929 |
busyIndicationProcess notNil ifTrue:[ |
2563 | 930 |
busyIndicationProcess terminate. |
931 |
busyIndicationProcess := nil |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
932 |
]. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
933 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
934 |
"Created: / 21.10.1998 / 17:30:19 / cg" |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
935 |
! |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
936 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
937 |
updateBusyIndicatorPosition |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
938 |
busyPosition := busyPosition + busyDelta. |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
939 |
busyPosition >= 80 ifTrue:[ |
2659
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
940 |
busyDelta > 0 ifTrue:[ |
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
941 |
busyDelta := busyDelta negated. |
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
942 |
] |
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
943 |
] ifFalse:[ |
2659
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
944 |
busyPosition <= 0 ifTrue:[ |
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
945 |
busyDelta < 0 ifTrue:[ |
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
946 |
busyDelta := busyDelta negated. |
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
947 |
] |
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
948 |
] |
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
949 |
]. |
2659
3af857eb52fb
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2563
diff
changeset
|
950 |
self invalidate |
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
951 |
|
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
952 |
"Created: / 21.10.1998 / 17:33:28 / cg" |
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
953 |
"Modified: / 21.10.1998 / 17:58:58 / cg" |
183 | 954 |
! ! |
955 |
||
956 |
!ProgressIndicator methodsFor:'queries'! |
|
957 |
||
958 |
preferredExtent |
|
574 | 959 |
"return my preferred extent" |
960 |
||
334 | 961 |
preferredExtent notNil ifTrue:[ |
634 | 962 |
^ preferredExtent |
334 | 963 |
]. |
183 | 964 |
^ 100 @ (font height + font descent + ((margin + 1) * 2)) |
334 | 965 |
|
574 | 966 |
"Modified: 22.10.1997 / 21:07:17 / cg" |
183 | 967 |
! ! |
968 |
||
62 | 969 |
!ProgressIndicator methodsFor:'showing progress'! |
970 |
||
2850 | 971 |
showBusyIndicatorDuring:aBlock |
972 |
"show progress, while evaluating aBlock. |
|
973 |
If the receiver has been created with inBox, show the |
|
974 |
box centered on the screen. If not, the view is assumed to |
|
975 |
be contained in another view, and no special startup actions |
|
976 |
are performed. |
|
977 |
||
978 |
Caveat: cannot (currently) suppress close of the box ..." |
|
979 |
||
980 |
|labelValue p| |
|
981 |
||
982 |
connectedLabel notNil ifTrue:[ |
|
983 |
labelValue := (connectedLabel label ? '') asValue. |
|
984 |
connectedLabel |
|
985 |
model:labelValue; |
|
986 |
aspect:#value; |
|
987 |
labelMessage:#value. |
|
988 |
] ifFalse:[ |
|
989 |
labelValue := '' asValue. |
|
990 |
]. |
|
991 |
||
992 |
||
993 |
"/ the worker process |
|
994 |
||
995 |
p := [ |
|
996 |
[ |
|
997 |
WindowGroup windowGroupQuerySignal handle:[:ex | |
|
998 |
ex proceedWith:self topView windowGroup |
|
999 |
] do:[ |
|
1000 |
aBlock value |
|
1001 |
] |
|
1002 |
] ensure:[ |
|
1003 |
p := nil. |
|
1004 |
closeTopWhenDone ifTrue:[ |
|
1005 |
connectedTop hide |
|
1006 |
]. |
|
1007 |
finishAction value |
|
1008 |
] |
|
1009 |
] newProcess. |
|
1010 |
||
1011 |
Processor activeProcess |
|
2878 | 1012 |
withHigherPriorityDo: |
1013 |
[ |
|
1014 |
p resume. |
|
1015 |
self topView show. |
|
1016 |
]. |
|
2850 | 1017 |
p notNil ifTrue:[p terminate]. |
1018 |
||
1019 |
" |
|
1020 |
|p| |
|
1021 |
||
1022 |
p := ProgressIndicator inBox. |
|
1023 |
p showBusyIndication:true. |
|
1024 |
p showProgressOf: |
|
1025 |
[:progressValue :currentAction | |
|
1026 |
1 to:200 do:[:percent | |
|
1027 |
(Delay forSeconds:0.05) wait. |
|
1028 |
progressValue value:percent |
|
1029 |
]. |
|
1030 |
]. |
|
1031 |
||
1032 |
'it can be reused ...'. |
|
1033 |
p showBusyIndication:false. |
|
1034 |
p showProgressOf: |
|
1035 |
[:progressValue :currentAction | |
|
1036 |
1 to:100 by:5 do:[:percent | |
|
1037 |
(Delay forSeconds:0.05) wait. |
|
1038 |
progressValue value:percent |
|
1039 |
]. |
|
1040 |
]. |
|
1041 |
||
1042 |
" |
|
1043 |
||
1044 |
"Modified: / 21.10.1998 / 17:37:00 / cg" |
|
1045 |
! |
|
1046 |
||
62 | 1047 |
showProgressOf:aBlock |
1048 |
"show progress, while evaluating aBlock. |
|
1049 |
If the receiver has been created with inBox, show the |
|
1050 |
box centered on the screen. If not, the view is assumed to |
|
1051 |
be contained in another view, and no special startup actions |
|
1052 |
are performed. |
|
1053 |
||
1054 |
The block is passed two arguments, the progressValue, |
|
1055 |
which should be set to the percentage from time-to-time |
|
1056 |
within the block and an action value, which should be set to |
|
1057 |
the currently performed action (a string) from time to time. |
|
1058 |
The second valueHolder can be left unchanged. |
|
1059 |
||
1060 |
Caveat: cannot (currently) suppress close of the box ..." |
|
1061 |
||
221 | 1062 |
|progressValue labelValue p| |
62 | 1063 |
|
1064 |
progressValue := 0 asValue. |
|
1065 |
||
1066 |
connectedLabel notNil ifTrue:[ |
|
2837 | 1067 |
labelValue := (connectedLabel label ? '') asValue. |
1068 |
connectedLabel |
|
1069 |
model:labelValue; |
|
1070 |
aspect:#value; |
|
1071 |
labelMessage:#value. |
|
1834
ba170c21ed76
defaultExtent computation fixed
Claus Gittinger <cg@exept.de>
parents:
1789
diff
changeset
|
1072 |
] ifFalse:[ |
2837 | 1073 |
labelValue := '' asValue. |
62 | 1074 |
]. |
1075 |
||
1834
ba170c21ed76
defaultExtent computation fixed
Claus Gittinger <cg@exept.de>
parents:
1789
diff
changeset
|
1076 |
|
62 | 1077 |
self model:progressValue. |
1078 |
||
221 | 1079 |
"/ the worker process |
1080 |
||
62 | 1081 |
p := [ |
2837 | 1082 |
[ |
1083 |
WindowGroup windowGroupQuerySignal handle:[:ex | |
|
1084 |
ex proceedWith:self topView windowGroup |
|
1085 |
] do:[ |
|
1086 |
aBlock value:progressValue value:labelValue |
|
1087 |
] |
|
1088 |
] ensure:[ |
|
1089 |
p := nil. |
|
1090 |
closeTopWhenDone ifTrue:[ |
|
1091 |
connectedTop hide |
|
1092 |
]. |
|
1093 |
finishAction value |
|
1094 |
] |
|
1850 | 1095 |
] newProcess. |
62 | 1096 |
|
237 | 1097 |
Processor activeProcess |
2878 | 1098 |
withHigherPriorityDo:[ |
2837 | 1099 |
p resume. |
1100 |
self topView show. |
|
1101 |
]. |
|
237 | 1102 |
p notNil ifTrue:[p terminate]. |
62 | 1103 |
|
1104 |
" |
|
1105 |
|p| |
|
1106 |
||
1107 |
p := ProgressIndicator inBox. |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
1108 |
p showBusyIndication:true. |
62 | 1109 |
p showProgressOf: |
2837 | 1110 |
[:progressValue :currentAction | |
1111 |
1 to:200 do:[:percent | |
|
1112 |
(Delay forSeconds:0.05) wait. |
|
1113 |
progressValue value:percent |
|
1114 |
]. |
|
1115 |
]. |
|
62 | 1116 |
|
1117 |
'it can be reused ...'. |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
1118 |
p showBusyIndication:false. |
62 | 1119 |
p showProgressOf: |
2837 | 1120 |
[:progressValue :currentAction | |
1121 |
1 to:100 by:5 do:[:percent | |
|
1122 |
(Delay forSeconds:0.05) wait. |
|
1123 |
progressValue value:percent |
|
1124 |
]. |
|
1125 |
]. |
|
62 | 1126 |
|
1127 |
" |
|
219
44246b9b4288
use new windowGroupQuery for background process
Claus Gittinger <cg@exept.de>
parents:
201
diff
changeset
|
1128 |
|
1168
35e46761842f
added showBusyIndication mode
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
1129 |
"Modified: / 21.10.1998 / 17:37:00 / cg" |
62 | 1130 |
! ! |
1131 |
||
334 | 1132 |
!ProgressIndicator class methodsFor:'documentation'! |
50 | 1133 |
|
183 | 1134 |
version |
3425
20459e327062
added preferredWidth & preferredHeight
Claus Gittinger <cg@exept.de>
parents:
2931
diff
changeset
|
1135 |
^ '$Header: /cvs/stx/stx/libwidg2/ProgressIndicator.st,v 1.53 2008-05-30 12:25:44 cg Exp $' |
50 | 1136 |
! ! |