HierarchicalItem.st
changeset 5553 d8caa65e2d54
parent 5291 31dd692da914
child 5843 074062961757
equal deleted inserted replaced
5552:2fe0fa28ecf5 5553:d8caa65e2d54
   199     icon     := self class iconForLevel:(lvl + 1).
   199     icon     := self class iconForLevel:(lvl + 1).
   200     children := OrderedCollection new.
   200     children := OrderedCollection new.
   201 
   201 
   202     lvl < 4 ifTrue:[
   202     lvl < 4 ifTrue:[
   203         txt := (lvl + 1) printString, ' ['.
   203         txt := (lvl + 1) printString, ' ['.
   204         img := Icon saveIcon.
   204         img := ToolbarIconLibrary save22x22Icon.
   205 
   205 
   206         1 to:5 do:[:i|
   206         1 to:5 do:[:i|
   207             (i == 2 or:[i == 3]) ifTrue:[
   207             (i == 2 or:[i == 3]) ifTrue:[
   208                 lbl := img
   208                 lbl := img
   209             ] ifFalse:[
   209             ] ifFalse:[
   217             children add:(self class labeled:lbl icon:icon)
   217             children add:(self class labeled:lbl icon:icon)
   218         ].
   218         ].
   219     ] ifFalse:[
   219     ] ifFalse:[
   220         image := ResourceSelectionBrowser iconPrivateClass.
   220         image := ResourceSelectionBrowser iconPrivateClass.
   221         txt   := LabelAndIcon icon:image string:'Text'.
   221         txt   := LabelAndIcon icon:image string:'Text'.
   222         img   := Icon copyIcon.
   222         img   := ToolbarIconLibrary copy22x22Icon.
   223 
   223 
   224         1 to:5 do:[:i|
   224         1 to:5 do:[:i|
   225             lbl := i odd ifTrue:[txt] ifFalse:[img].
   225             lbl := i odd ifTrue:[txt] ifFalse:[img].
   226             lbl := Array with:lbl with:'test' with:img.
   226             lbl := Array with:lbl with:'test' with:img.
   227             children add:(self class labeled:lbl icon:icon).
   227             children add:(self class labeled:lbl icon:icon).
   229         children add:(self class labeled:'Edit Text').
   229         children add:(self class labeled:'Edit Text').
   230     ].
   230     ].
   231 
   231 
   232     children do:[:aChild| aChild parent:self ].
   232     children do:[:aChild| aChild parent:self ].
   233   ^ children
   233   ^ children
       
   234 
       
   235     "Modified: / 14-07-2017 / 10:21:00 / cg"
   234 !
   236 !
   235 
   237 
   236 icon
   238 icon
   237     "returns the icon
   239     "returns the icon
   238     "
   240     "