|
Class: AnimatedLabel
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--Label
|
+--AnimatedLabel
- Package:
- stx:libwidg3
- Category:
- Views-Misc
- Version:
- rev:
1.6
date: 2018/09/30 15:14:56
- user: cg
- file: AnimatedLabel.st directory: libwidg3
- module: stx stc-classLibrary: libwidg3
- Author:
- Claus Gittinger
this implements labels which show a little animation sequence
(sequence of images) instead of a fixed logo.
ActionWaitBox
ProgressIndicator
Label
Image
accessing
-
frameDelay: seconds
-
-
imageSequence: aCollectionOfImages
-
initialization
-
initialize
-
realization
-
destroy
-
-
mapped
-
-
release
-
-
startAnimationProcess
-
-
stopAnimationProcess
-
-
unmap
-
plain animated label:
|label images|
label := AnimatedLabel new.
images := Array new:8.
1 to:8 do:[:i |
images at:i put:(Image fromFile:'../../clients/Animation/bitmaps/man' , i printString , '.xbm')
].
label imageSequence:images; frameDelay:0.1.
label open
|
animated label in a DialogBox:
|dialog label images|
dialog := Dialog new.
dialog label:'writing'.
dialog addTextLabel:'saving your data - please wait ...'.
label := AnimatedLabel new.
images := Array new:12.
1 to:12 do:[:i |
images at:i put:(Image fromFile:'../../libwidg3/bitmaps/write.' , i printString , '.xbm')
].
label imageSequence:images; frameDelay:0.1.
dialog addComponent:label.
(dialog addAbortButton) label:'abort'.
dialog open.
|
same, using the more convenient ActionWaitBox:
|box label images|
box := ActionWaitBox new.
box label:'writing'.
box addTextLabel:'saving your data - please wait ...'.
label := AnimatedLabel new.
images := Array new:12.
1 to:12 do:[:i |
images at:i put:(Image fromFile:'../../libwidg3/bitmaps/write.' , i printString , '.xbm')
].
label imageSequence:images; frameDelay:0.1.
box addComponent:label.
(box addAbortButton) label:'abort'.
box openDoing:
[
10 timesRepeat:[(Delay forSeconds:1) wait]
].
|
|