eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'AnimatedLabel':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: AnimatedLabel


Inheritance:

   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

Description:


this implements labels which show a little animation sequence
(sequence of images) instead of a fixed logo.


Related information:

    ActionWaitBox
    ProgressIndicator
    Label
    Image

Instance protocol:

accessing
o  frameDelay: seconds

o  imageSequence: aCollectionOfImages

initialization
o  initialize

realization
o  destroy

o  mapped

o  release

o  startAnimationProcess

o  stopAnimationProcess

o  unmap


Examples:


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]
          ].


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 26 Apr 2024 07:33:19 GMT