extracted allSubViewsBackground: from allViewBackground:
authorClaus Gittinger <cg@exept.de>
Tue, 31 Oct 2000 13:40:39 +0100
changeset 3356 d3f6fd88e766
parent 3355 2ec13d9b93ca
child 3357 9234d6f55d5a
extracted allSubViewsBackground: from allViewBackground: for easier reuse by subclasses
SimpleView.st
--- a/SimpleView.st	Tue Oct 31 13:39:19 2000 +0100
+++ b/SimpleView.st	Tue Oct 31 13:40:39 2000 +0100
@@ -42,15 +42,15 @@
 	privateIn:SimpleView
 !
 
-SimpleView::ViewShape subclass:#ArbitraryViewShape
-	instanceVariableNames:'viewShapeForm borderShapeForm'
+SimpleView::ViewShape subclass:#RoundViewShape
+	instanceVariableNames:''
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:SimpleView
 !
 
-SimpleView::ViewShape subclass:#RoundViewShape
-	instanceVariableNames:''
+SimpleView::ViewShape subclass:#ArbitraryViewShape
+	instanceVariableNames:'viewShapeForm borderShapeForm'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:SimpleView
@@ -1471,25 +1471,34 @@
 
 !SimpleView methodsFor:'accessing-bg & border'!
 
+allSubViewsBackground:something
+    "set the viewBackground to something, a color, image or form,
+     recursively in all of my subviews"
+
+    subViews notNil ifTrue:[
+        subViews do:[:v|
+            v allViewBackground:something
+        ]
+    ]
+
+    "Modified: / 18.7.1996 / 13:34:26 / cg"
+    "Created: / 31.10.2000 / 13:06:02 / bg"
+!
+
 allViewBackground:something
     "set the viewBackground to something, a color, image or form,
      in myself and recursively in all of my subviews"
 
     viewBackground ~~ something ifTrue:[
-	self viewBackground:something.
-	shown ifTrue:[
-	    self invalidate
-	].
-    ].
-
-    subViews notNil ifTrue:[
-	subViews do:[:v|
-	    v allViewBackground:something
-	]
-    ]
-
-    "Created: 17.7.1996 / 14:59:08 / cg"
-    "Modified: 18.7.1996 / 13:34:26 / cg"
+        self viewBackground:something.
+        shown ifTrue:[
+            self invalidate
+        ].
+    ].
+
+    self allSubViewsBackground:something
+
+    "Modified: / 31.10.2000 / 13:06:17 / bg"
 !
 
 backgroundColor
@@ -8742,6 +8751,14 @@
     ^ false
 ! !
 
+!SimpleView::RoundViewShape methodsFor:'queries'!
+
+isRoundShape
+    ^ true
+
+
+! !
+
 !SimpleView::ArbitraryViewShape methodsFor:'accessing'!
 
 borderShapeForm
@@ -8776,17 +8793,9 @@
     "Created: 18.9.1997 / 11:04:29 / cg"
 ! !
 
-!SimpleView::RoundViewShape methodsFor:'queries'!
-
-isRoundShape
-    ^ true
-
-
-! !
-
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.386 2000-10-27 13:17:10 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.387 2000-10-31 12:40:39 cg Exp $'
 ! !
 SimpleView initialize!