equal
deleted
inserted
replaced
7 inclusion of the above copyright notice. This software may not |
7 inclusion of the above copyright notice. This software may not |
8 be provided or otherwise made available to, or used by, any |
8 be provided or otherwise made available to, or used by, any |
9 other person. No title to or ownership of the software is |
9 other person. No title to or ownership of the software is |
10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
12 |
|
13 "{ Package: 'stx:libwidg2' }" |
12 "{ Package: 'stx:libwidg2' }" |
14 |
13 |
15 View subclass:#ProgressIndicator |
14 View subclass:#ProgressIndicator |
16 instanceVariableNames:'percentage showPercentage fgColor bgColor connectedTop |
15 instanceVariableNames:'percentage showPercentage fgColor bgColor connectedTop |
17 connectedLabel collector finishAction closeTopWhenDone showBusy |
16 connectedLabel collector finishAction closeTopWhenDone showBusy |
517 top := Dialog new. |
516 top := Dialog new. |
518 top label:aLabel. |
517 top label:aLabel. |
519 top cursor:(Cursor wait). |
518 top cursor:(Cursor wait). |
520 y2 := 0. |
519 y2 := 0. |
521 anIcon notNil ifTrue:[ |
520 anIcon notNil ifTrue:[ |
522 y := top yPosition. |
521 y := top yPosition. |
523 l := top addTextLabel:anIcon. |
522 l := top addTextLabel:anIcon. |
524 l borderWidth:0. |
523 l borderWidth:0. |
525 l adjust:#left. |
524 l adjust:#left. |
526 l cursor:(Cursor wait). |
525 l cursor:(Cursor wait). |
527 y2 := top yPosition. |
526 y2 := top yPosition. |
528 top yPosition:y. |
527 top yPosition:y. |
529 ]. |
528 ]. |
530 |
529 |
531 l := top addTextLabel:text. |
530 l := top addTextLabel:text. |
532 l borderWidth:0. |
531 l borderWidth:0. |
533 l adjust:#left. |
532 l adjust:#left. |
537 top yPosition:(top yPosition max:y2). |
536 top yPosition:(top yPosition max:y2). |
538 |
537 |
539 top addVerticalSpace. |
538 top addVerticalSpace. |
540 |
539 |
541 p := ProgressIndicator new. |
540 p := ProgressIndicator new. |
542 p extent:(1.0 @ p preferredExtent y). |
541 p extent:(1.0 @ p preferredHeight). |
543 p level:-1. |
542 p level:-1. |
544 p leftInset:5; |
543 p leftInset:5; |
545 rightInset:5. |
544 rightInset:5. |
546 p cursor:(Cursor wait). |
545 p cursor:(Cursor wait). |
547 p closeTopWhenDone:closeWhenDoneBoolean. |
546 p closeTopWhenDone:closeWhenDoneBoolean. |
548 p connectToTop:top label:l. |
547 p connectToTop:top label:l. |
549 |
548 |
550 top addComponent:p. |
549 top addComponent:p. |
551 |
550 |
552 additionalView notNil ifTrue:[ |
551 additionalView notNil ifTrue:[ |
553 top addComponent:additionalView. |
552 top addComponent:additionalView. |
554 additionalView extent:(1.0 @ additionalView preferredExtent y). |
553 additionalView extent:(1.0 @ additionalView preferredHeight). |
555 ]. |
554 ]. |
556 |
555 |
557 abortable ifTrue:[ |
556 abortable ifTrue:[ |
558 top addVerticalSpace. |
557 top addVerticalSpace. |
559 top addAbortButton |
558 top addAbortButton |
560 ]. |
559 ]. |
561 |
560 |
562 ^ p |
561 ^ p |
563 |
562 |
564 "Created: 17.7.1996 / 15:14:33 / cg" |
563 "Created: 17.7.1996 / 15:14:33 / cg" |
1131 ! ! |
1130 ! ! |
1132 |
1131 |
1133 !ProgressIndicator class methodsFor:'documentation'! |
1132 !ProgressIndicator class methodsFor:'documentation'! |
1134 |
1133 |
1135 version |
1134 version |
1136 ^ '$Header: /cvs/stx/stx/libwidg2/ProgressIndicator.st,v 1.52 2006-03-06 08:55:21 cg Exp $' |
1135 ^ '$Header: /cvs/stx/stx/libwidg2/ProgressIndicator.st,v 1.53 2008-05-30 12:25:44 cg Exp $' |
1137 ! ! |
1136 ! ! |