|
Class: ColorBulletIndicator
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--ImageView
|
+--ColorBulletIndicator
- Package:
- stx:libwidg3
- Category:
- Views-Misc
- Version:
- rev:
1.14
date: 2022/02/17 10:26:29
- user: cg
- file: ColorBulletIndicator.st directory: libwidg3
- module: stx stc-classLibrary: libwidg3
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:]
copyrightCOPYRIGHT (c) 1998 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
class initialization
-
initializeSharedImages
-
self initializeSharedImages
accessing
-
imagesAt: aSymbol put: anImage
-
define the image to be shown as per symbol
-
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
-
update: something with: aParameter from: changedObject
-
initialization
-
fetchDeviceResources
-
fetch device colors, to avoid reallocation at redraw time
-
initialize
-
menu
-
middleButtonMenu
-
private
-
getStateFromModel
-
queries
-
computePreferredExtent
-
(comment from inherited method)
return my computed preferred extent - this is the minimum size I would like to have.
If there are any components, a rectangle enclosing them
is returned. Otherwise, the actual extent is returned.
|top aV model|
model := #red asValue.
top := StandardSystemView new.
top extent:100@100.
aV := ColorBulletIndicator origin:0@0 in:top.
aV model:model.
top openAndWaitUntilVisible.
[top isOpen] whileTrue:[
Delay waitForSeconds:1.
model value:#yellow.
Delay waitForSeconds:1.
model value:#green.
Delay waitForSeconds:1.
model value:#red.
].
|
|