DataSetColumn.st
changeset 3240 2afa6e06b634
parent 3218 87e27351e23c
child 3264 642d79a1b0d6
--- a/DataSetColumn.st	Sun Jul 22 20:50:46 2007 +0200
+++ b/DataSetColumn.st	Fri Jul 27 11:23:11 2007 +0200
@@ -599,8 +599,7 @@
 drawSeparatorsAtX:xLeft y:yTop h:h from:start to:stop
     "redraw separators for cells between start and stop
     "
-    |is3D
-     xL    "{ Class:SmallInteger }"
+    |is3D xL    "{ Class:SmallInteger }"
      xR    "{ Class:SmallInteger }"
      yB    "{ Class:SmallInteger }"
      yT    "{ Class:SmallInteger }"
@@ -630,12 +629,12 @@
             ]
         ] ifFalse:[
             start to:stop do:[:idx|
-                ((dataSet at:idx) perform:rowSeparatorSelector) ~~ false ifTrue:[
+                (self hasRowSeparatorAt:idx) ifTrue:[
                     dataSet displayLineFromX:xL y:yB toX:xR y:yB
                 ].
                 yB := yB + h.
-            ]
-        ]
+            ].
+        ].
     ].
 
     showColSeparator ifTrue:[
@@ -685,9 +684,7 @@
          "/ CHECK WHETHER PREVIOUS ROW HAS A SEPARATOR AT BOTTOM
          "/ ====================================================
             start to:stop do:[:idx|
-                (    idx == 1
-                  or:[((dataSet at:(idx - 1)) perform:rowSeparatorSelector) ~~ false]
-                ) ifTrue:[
+                (idx == 1 or:[self hasRowSeparatorAt:(idx - 1)]) ifTrue:[
                     dataSet displayLineFromX:xL y:yT toX:xR y:yT.
                 ].
                 yT := yT + h.
@@ -1052,6 +1049,21 @@
     ^ descWidth isLimitedPrecisionReal 
 !
 
+hasRowSeparatorAt:rowNumber
+    |row bool|
+
+    rowSeparatorSelector isNil ifTrue:[^ true ].
+    row := dataSet at:rowNumber.
+
+    columnAdaptor isNil ifTrue:[
+        bool := row perform:rowSeparatorSelector.
+    ] ifFalse:[
+        bool := columnAdaptor perform:rowSeparatorSelector
+                    withOptionalArgument:row and:columnNumber and:rowNumber and:dataSet.
+    ].
+    ^ bool ~~ false
+!
+
 heightOfHighestRow
     "returns the height of the highest row in pixels.
      Warning: 
@@ -1200,5 +1212,5 @@
 !DataSetColumn class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/DataSetColumn.st,v 1.108 2007-03-26 15:50:40 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DataSetColumn.st,v 1.109 2007-07-27 09:23:11 ca Exp $'
 ! !