HierarchicalListView.st
changeset 2094 71c676b5f061
parent 2069 7891c7d3af69
child 2099 64402b3555eb
equal deleted inserted replaced
2093:0dff6d4c173a 2094:71c676b5f061
   304             ]
   304             ]
   305         ]
   305         ]
   306     ].
   306     ].
   307 !
   307 !
   308 
   308 
       
   309 iconAt:aKey ifAbsentPut:aBlock
       
   310     "return the icon stored under a key; if not present,the
       
   311      result of the block if not nil is stored under the key
       
   312      and returned.
       
   313     "
       
   314     |icon|
       
   315 
       
   316     icon := icons at:aKey ifAbsent:nil.
       
   317     icon ifNotNil:[^ icon].
       
   318 
       
   319     icon := aBlock value.
       
   320     icon ifNil:[^ nil].
       
   321 
       
   322     realized ifTrue:[
       
   323         icon := self imageOnDevice:icon
       
   324     ].
       
   325     icons at:aKey put:icon.
       
   326   ^ icon
       
   327 !
       
   328 
   309 registerKeysAndIcons:aDictionary
   329 registerKeysAndIcons:aDictionary
   310     "register icons by key and value derived from a directory
   330     "register icons by key and value derived from a directory
   311     "
   331     "
   312     |image|
   332     |image|
   313 
   333 
  1171 ! !
  1191 ! !
  1172 
  1192 
  1173 !HierarchicalListView class methodsFor:'documentation'!
  1193 !HierarchicalListView class methodsFor:'documentation'!
  1174 
  1194 
  1175 version
  1195 version
  1176     ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.39 2001-12-14 10:53:19 cg Exp $'
  1196     ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.40 2002-04-18 09:54:31 ca Exp $'
  1177 ! !
  1197 ! !