--- a/WorkspaceApplication.st Mon May 05 14:25:44 2008 +0200
+++ b/WorkspaceApplication.st Wed May 07 09:53:48 2008 +0200
@@ -446,6 +446,11 @@
itemValue: addTeaTimer
translateLabel: true
)
+ (MenuItem
+ label: 'Stop Watch'
+ itemValue: addStopWatch
+ translateLabel: true
+ )
)
nil
nil
@@ -1404,6 +1409,31 @@
"Created: / 29-05-2007 / 19:10:50 / cg"
!
+addStopWatch
+ |v clock|
+
+ v := View new.
+ v viewBackground:Color white.
+ clock := ClockView in:v.
+ clock beStopWatch.
+
+ clock
+ origin:[
+ |ext|
+
+ ext := (v height) min:(v width).
+ (v extent - ext) // 2
+ ]
+ extent:[
+ |ext|
+
+ ext := (v height) min:(v width).
+ ext @ ext
+ ].
+
+ self addWindow:v named:'StopWatch%1'.
+!
+
addTeaTimer
|l dt tEnd answer|
@@ -2202,5 +2232,5 @@
!WorkspaceApplication class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.147 2008-03-31 13:33:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.148 2008-05-07 07:53:48 cg Exp $'
! !