*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Thu, 09 Jan 2003 17:58:22 +0100
changeset 1683 669504c9453c
parent 1682 b8da003d700a
child 1684 61bf68526263
*** empty log message ***
PluggableView.st
--- a/PluggableView.st	Thu Jan 09 17:55:11 2003 +0100
+++ b/PluggableView.st	Thu Jan 09 17:58:22 2003 +0100
@@ -35,12 +35,15 @@
                                                                 [exBegin]
     |v|
 
-    v := PluggableView new openAndWait.
+    v := PluggableView new.
+    v viewBackground:Color black.
     v redrawAction:[
         |offsX offsY scaleX scaleY|
 
-        scaleX := scaleY := 40.
-        offsX := offsY := 50.
+        scaleX := v width - 10 // 2.
+        scaleY := v height - 10 // 2.
+        offsX := v width // 2.
+        offsY := v height // 2.
 
         0 to:360 do:[:degrees |
             |radians x y|
@@ -54,7 +57,7 @@
             v atX:x y:y put:Color red.
         ].
     ].
-    v redraw
+    v open.
                                                                 [exEnd]
 "
 ! !
@@ -98,10 +101,16 @@
     redrawAction notNil ifTrue:[
         redrawAction value
     ]
+!
+
+sizeChanged:how
+    super sizeChanged:how.
+    self clear.
+    self redraw.
 ! !
 
 !PluggableView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/PluggableView.st,v 1.1 2003-01-09 16:55:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/PluggableView.st,v 1.2 2003-01-09 16:58:22 cg Exp $'
 ! !