VariablePanel.st
changeset 299 d2f955840ad5
parent 295 aa5887bff1b2
child 300 0823ef38e629
--- a/VariablePanel.st	Wed Jan 24 13:37:49 1996 +0100
+++ b/VariablePanel.st	Wed Jan 24 14:25:52 1996 +0100
@@ -996,8 +996,52 @@
     ]
 ! !
 
+!VariablePanel methodsFor:'private tableView protocol'!
+
+setupSubviewOrigins
+    "setup subviews origins (SV 16.1.95)"
+
+    |x y e eX eY n "{ Class: SmallInteger }"|
+
+    x := y := 0.0.
+
+    n := subViews size.
+    1 to:n do:[:index |
+	|view|
+
+	view := subViews at:index.
+	e := view relativeExtent.
+	e notNil ifTrue:[
+	    view relativeExtent:nil.
+	    eX := e x.
+	    eY := e y.
+	    index == n ifTrue:[
+		view origin:(x @ y) corner:(1.0 @ 1.0)
+	    ] ifFalse:[
+		orientation == #vertical ifTrue:[
+		    view origin:(x @ y) corner:(1.0 @ (y+eY))
+		] ifFalse:[
+		    view origin:(x @ y) corner:((x+eX) @ 1.0)
+		].
+	    ].
+	    orientation == #vertical ifTrue:[
+		y := y + eY.
+	    ] ifFalse:[    
+		x := x + eX.
+	    ]
+	] ifFalse: [
+	    view origin:(x @ y).
+	    orientation == #vertical ifTrue:[
+		y := view relativeCorner y.
+	    ] ifFalse:[
+		x := view relativeCorner x.
+	    ]
+	].
+    ]   
+! !
+
 !VariablePanel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.1 1996-01-18 00:11:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.2 1996-01-24 13:25:52 ah Exp $'
 ! !