|
|
Class: DigitalClockView
Object
|
+--GraphicsContext
|
+--DeviceGraphicsContext
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--DigitalClockView
- Package:
- stx:libwidg3
- Category:
- demos-Applications-Clock
- Version:
- rev:
1.13
date: 2009/08/05 09:53:51
- user: stefan
- file: DigitalClockView.st directory: libwidg3
- module: stx stc-classLibrary: libwidg3
- Author:
- Claus Gittinger
another clock replacement ...
This is a regular view - it can also be placed into another one.
Clock
RoundClock
ClockView
Time
ProcessorScheduler
DigitalLedDisplay
startup
-
isVisualStartable
-
yes, I can be started via double click in the browser
-
open
-
open a topView containing a digitalClock
accessing
-
showSeconds: something
-
set the value of the instance variable 'showSeconds' (automatically generated)
drawing
-
redraw
-
update my view
-
showTime
-
executed every second (by timedBlock)
events
-
destroy
-
the view was destroyed - remove time-scheduled updateBlock
-
mapped
-
view was mapped - launch a time-scheduled updateBlock
-
sizeChanged: how
-
initialization
-
fetchDeviceResources
-
fetch device colors, to avoid reallocation at redraw time
-
initialize
-
-
startClock
-
launch a time-scheduled updateBlock
queries
-
preferredExtent
-
DigitalClockView new open
in a topView:
|top clk prefSize|
top := StandardSystemView new.
top label:'ST/X clock'.
clk := DigitalClockView in:top.
prefSize := clk preferredExtent.
top extent:prefSize.
top minExtent:prefSize.
top maxExtent:prefSize.
top open
|
as a component:
|top frame clk fileList sz|
top := StandardSystemView new.
top extent:200@200.
clk := DigitalClockView new.
clk showSeconds:false.
sz := clk preferredExtent.
frame := View origin:1.0@0.0 corner:1.0@(sz y) in:top.
frame leftInset:(sz x negated - 4); rightInset:4; topInset:2; bottomInset:-2.
frame level:-1.
clk := DigitalClockView in:frame.
fileList := ScrollableView for:FileSelectionList in:top.
fileList origin:0@50 corner:1.0@1.0.
top open
|
|