DataSetColumn.st
changeset 3675 e0e63070a210
parent 3674 384982192479
child 3724 f4726b172c16
equal deleted inserted replaced
3674:384982192479 3675:e0e63070a210
   475     ].
   475     ].
   476 
   476 
   477     columnAlignment == #left ifTrue:[
   477     columnAlignment == #left ifTrue:[
   478         x  := xLeft + space.
   478         x  := xLeft + space.
   479     ] ifFalse:[
   479     ] ifFalse:[
   480         columnAlignment == #decimal ifTrue:[
   480         (columnAlignment == #decimal
       
   481         or:[ columnAlignment == #decimalRight ]) ifTrue:[
   481             drawnLabel := drawnLabel asString.
   482             drawnLabel := drawnLabel asString.
   482             (drawnLabel includes:$.) ifTrue:[
   483             (drawnLabel includes:$.) ifTrue:[
   483                 leftPart := drawnLabel upTo:$..
   484                 leftPart := drawnLabel upTo:$..
   484             ] ifFalse:[
   485             ] ifFalse:[
   485                 leftPart := drawnLabel.
   486                 leftPart := drawnLabel.
   491                         leftPart := drawnLabel copyTo:indexOfFirstNonDigit-1.
   492                         leftPart := drawnLabel copyTo:indexOfFirstNonDigit-1.
   492                     ].
   493                     ].
   493                 ].
   494                 ].
   494             ].
   495             ].
   495             leftShift := leftPart widthOn:dataSet.
   496             leftShift := leftPart widthOn:dataSet.
   496             x := (cashedWidth // 2) - leftShift.
   497             columnAlignment == #decimalRight ifTrue:[
       
   498                 "/ decimal at the right
       
   499                 x := (cashedWidth) - ('9999' widthOn:dataSet) - leftShift.
       
   500             ] ifFalse:[
       
   501                 "/ decimal at the middle
       
   502                 x := (cashedWidth // 2) - leftShift.
       
   503             ].
   497         ] ifFalse:[
   504         ] ifFalse:[
   498             x := cashedWidth - labelWidth.
   505             x := cashedWidth - labelWidth.
   499 
   506 
   500             columnAlignment == #right ifTrue:[x := x - space]
   507             columnAlignment == #right ifTrue:[x := x - space]
   501                                      ifFalse:[x := x // 2].
   508                                      ifFalse:[x := x // 2].
  1288 ! !
  1295 ! !
  1289 
  1296 
  1290 !DataSetColumn class methodsFor:'documentation'!
  1297 !DataSetColumn class methodsFor:'documentation'!
  1291 
  1298 
  1292 version
  1299 version
  1293     ^ '$Header: /cvs/stx/stx/libwidg2/DataSetColumn.st,v 1.123 2009-03-26 11:55:16 stefan Exp $'
  1300     ^ '$Header: /cvs/stx/stx/libwidg2/DataSetColumn.st,v 1.124 2009-03-26 14:36:50 cg Exp $'
  1294 ! !
  1301 ! !