#OTHER by cg
authorClaus Gittinger <cg@exept.de>
Sat, 10 Nov 2018 00:17:31 +0100
changeset 5946 454fc5b536b1
parent 5945 fdf3c398a30f
child 5947 eb55c8df142a
#OTHER by cg class: HorizontalPanelView added: #computePreferredExtent removed: #preferredExtent changed: #setChildPositions
GridBagLayoutView.st
--- a/GridBagLayoutView.st	Sat Nov 10 00:05:35 2018 +0100
+++ b/GridBagLayoutView.st	Sat Nov 10 00:17:31 2018 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1998 by Andreas Vogel / eXept Software AG
               All Rights Reserved
@@ -835,28 +837,18 @@
 
 !GridBagLayoutView methodsFor:'queries'!
 
-preferredExtent
-    "Return a good extent, one that makes subviews fit. Return the the preferred extent as a point
-    where x and y represents the width and height of the extent."
+computePreferredExtent
+    "Return a good extent, one that makes subviews fit. 
+     Return the the preferred extent as a point
+     where x and y represents the width and height of the extent."
 
-    "/ If I have an explicit preferredExtent..
-    explicitExtent notNil ifTrue:[
-        ^ explicitExtent
-    ].
-
-    "/ If I have a cached preferredExtent value..
-    preferredExtent notNil ifTrue:[
-        ^ preferredExtent
-    ].
-
-    self subViews isNil ifTrue:[ 
-        ^ super preferredExtent. 
+    self subViews isEmptyOrNil ifTrue:[ 
+        ^ super computePreferredExtent. 
     ].
 
     ^ self preferredLayoutSize extent.
 
-    "Created: / 17.1.1998 / 00:11:46 / av"
-    "Modified: / 1.2.1998 / 13:01:46 / av"
+    "Created: / 09-11-2018 / 19:54:36 / Claus Gittinger"
 ! !
 
 !GridBagLayoutView class methodsFor:'documentation'!