eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ColorBulletIndicator':

Home

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

Class: ColorBulletIndicator


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--View
               |
               +--ImageView
                  |
                  +--ColorBulletIndicator

Package:
stx:libwidg3
Category:
Views-Misc
Version:
rev: 1.9 date: 2018/05/01 08:38:20
user: cg
file: ColorBulletIndicator.st directory: libwidg3
module: stx stc-classLibrary: libwidg3
Author:
Claus Gittinger (ps@joshua)

Description:


Shows a colored bullet (like a led lamp).
Xlates symbolic image names like #red/#green/#blue into a corresponding
bullet image.



[instance variables:]

[class variables:]


Related information:



Class protocol:

class initialization
o  initializeSharedImages
self initializeSharedImages


Instance protocol:

accessing
o  imagesAt: aSymbol put: anImage
define the image to be shown as per symbol

o  model: aModel
set the model, which is supposed to provide the boxes value.
If a listMessage was defined, it is also responsible for providing
the list

change & update
o  update: something with: aParameter from: changedObject

initialization
o  fetchDeviceResources
fetch device colors, to avoid reallocation at redraw time

o  initialize

menu
o  middleButtonMenu

private
o  getStateFromModel

queries
o  preferredExtent


Examples:


    |top aV model|

    model := #red asValue.

    top := StandardSystemView new.
    top extent:100@100.
    aV := ColorBulletIndicator origin:0@0 in:top.
    aV model:model.

    top open.
    5 timesRepeat:[
        Delay waitForSeconds:1.
        model value:#yellow.
        Delay waitForSeconds:1.
        model value:#green.
        Delay waitForSeconds:1.
        model value:#red.
    ].    


ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Sat, 22 Sep 2018 07:44:36 GMT