SelectionInListModelView.st
changeset 5792 3a3d58d1a9da
parent 5791 b6b33c848c7b
child 5794 1de9ace50ec4
equal deleted inserted replaced
5791:b6b33c848c7b 5792:3a3d58d1a9da
  2007     lineNr isNil ifTrue:[ ^ nil ].
  2007     lineNr isNil ifTrue:[ ^ nil ].
  2008 
  2008 
  2009     item := self at:lineNr ifAbsent:nil.
  2009     item := self at:lineNr ifAbsent:nil.
  2010     item notNil ifTrue:[
  2010     item notNil ifTrue:[
  2011         line := item perform:#label ifNotUnderstood:[item displayString].
  2011         line := item perform:#label ifNotUnderstood:[item displayString].
  2012         line := line string.
  2012         line isString ifTrue:[
  2013         line := line withoutSeparators.
  2013             line := line string.
       
  2014             line := line withoutSeparators.
       
  2015         ].
  2014     ].
  2016     ].
  2015     line notNil ifTrue:[
  2017     line notNil ifTrue:[
  2016         len := self widthOfWidestLineBetween:lineNr and:lineNr.
  2018         len := self widthOfWidestLineBetween:lineNr and:lineNr.
  2017         len > width ifTrue:[
  2019         len > width ifTrue:[
  2018             text := line collect:[:ch | ch isSeparator ifTrue:[Character space] ifFalse:[ch]].
  2020             text := line collect:[:ch | ch isSeparator ifTrue:[Character space] ifFalse:[ch]].
  2032     ].
  2034     ].
  2033     
  2035     
  2034     ^ text
  2036     ^ text
  2035 
  2037 
  2036     "Modified: / 20-02-2017 / 10:11:58 / cg"
  2038     "Modified: / 20-02-2017 / 10:11:58 / cg"
  2037     "Modified: / 08-06-2018 / 10:42:27 / Claus Gittinger"
  2039     "Modified: / 08-06-2018 / 15:21:58 / Claus Gittinger"
  2038 ! !
  2040 ! !
  2039 
  2041 
  2040 !SelectionInListModelView methodsFor:'initialization & release'!
  2042 !SelectionInListModelView methodsFor:'initialization & release'!
  2041 
  2043 
  2042 fetchResources
  2044 fetchResources