--- a/ListModelView.st Thu Jul 16 08:17:16 2009 +0200
+++ b/ListModelView.st Mon Jul 20 15:25:27 2009 +0200
@@ -2639,6 +2639,30 @@
^ xSplitbars last - xStart
!
+widthOfColumn:aColumn
+ "answer the width of a column or nil"
+
+ |index x0 x1|
+
+ index := columnDescriptors identityIndexOf:aColumn.
+
+ index > 0 ifTrue:[
+ ( (x0 := xSplitbars at:index ifAbsent:nil) notNil
+ and:[(x1 := xSplitbars at:(index + 1) ifAbsent:nil) notNil])
+ ifTrue:[
+ ^ (x1 - x0 - (2 * (self splitbarInset))) max:0
+ ].
+ ].
+ ^ nil
+!
+
+widthOfItemColumn
+ "answer the current width of the column which holds the hierarchical
+ item label."
+
+ ^ xSplitbars at:1.
+!
+
widthOfWidestLineBetween:firstLine and:lastLine
"returns the width of the longest line in pixels in a range
"
@@ -2721,6 +2745,19 @@
^ alignment ? #left
!
+dataSetColumnSpec
+ ^ dataSetColumnSpec
+!
+
+dataSetColumnSpec:aDataSetColumnSpec
+
+ aDataSetColumnSpec isSequenceable ifTrue:[
+ dataSetColumnSpec := DataSetColumnSpec decodeFromLiteralArray:aDataSetColumnSpec.
+ ] ifFalse:[
+ dataSetColumnSpec := aDataSetColumnSpec.
+ ].
+!
+
defaultColumnWidth
|width|
@@ -2833,15 +2870,6 @@
columnNumber:aNumber
columnNumber := aNumber.
-!
-
-dataSetColumnSpec:aDataSetColumnSpec
-
- aDataSetColumnSpec isSequenceable ifTrue:[
- dataSetColumnSpec := DataSetColumnSpec decodeFromLiteralArray:aDataSetColumnSpec.
- ] ifFalse:[
- dataSetColumnSpec := aDataSetColumnSpec.
- ].
! !
!ListModelView::TableRenderer::ColumnDescriptor methodsFor:'private displaying'!
@@ -3004,7 +3032,7 @@
!ListModelView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/ListModelView.st,v 1.116 2009-07-16 06:17:16 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/ListModelView.st,v 1.117 2009-07-20 13:25:27 ca Exp $'
! !
ListModelView initialize!