Tools__ViewTreeApplication.st
changeset 3017 d971763e5d03
parent 3014 05208490cea6
child 3034 862cd32dc02f
equal deleted inserted replaced
3016:6aff65697c4f 3017:d971763e5d03
  2195 ! !
  2195 ! !
  2196 
  2196 
  2197 !ViewTreeInspectorApplication::ViewTreeItem methodsFor:'displaying'!
  2197 !ViewTreeInspectorApplication::ViewTreeItem methodsFor:'displaying'!
  2198 
  2198 
  2199 additionalLabelForItem:anItem
  2199 additionalLabelForItem:anItem
  2200     "answer an additional item for an Item or nil"
  2200     "answer an additional label for an Item"
  2201 
  2201 
  2202     parent notNil ifTrue:[
  2202     parent notNil ifTrue:[
  2203         ^ parent additionalLabelForItem:anItem
  2203         ^ parent additionalLabelForItem:anItem
  2204     ].
  2204     ].
  2205     ^ nil
  2205     ^ nil
  4015 !ViewTreeInspectorApplication::ViewTreeModel::ItemList methodsFor:'accessing look'!
  4015 !ViewTreeInspectorApplication::ViewTreeModel::ItemList methodsFor:'accessing look'!
  4016 
  4016 
  4017 additionalLabelForItem:anItem
  4017 additionalLabelForItem:anItem
  4018     "answer the additional lable for an item or nil"
  4018     "answer the additional lable for an item or nil"
  4019 
  4019 
  4020     |l applClass applClassName|
  4020     |widget l applClass applClassName key|
       
  4021 
       
  4022     widget := anItem widget.
  4021 
  4023 
  4022     l := nil.
  4024     l := nil.
  4023     showWidgetNames == true ifTrue:[
  4025     showWidgetNames == true ifTrue:[
  4024         l := '"', anItem widget name, '"'
  4026         l := '"', widget name, '"'
  4025     ].
  4027     ].
  4026 
  4028 
  4027     anItem isApplicationClass ifTrue:[
  4029     anItem isApplicationClass ifTrue:[
  4028         applClass := anItem applicationClass.
  4030         applClass := anItem applicationClass.
  4029         applClass notNil ifTrue:[   
  4031         applClass notNil ifTrue:[   
  4030             applClassName := '[', applClass name allBold, ']'.
  4032             applClassName := '[', applClass name allBold, ']'.
  4031             l := (l isNil ifTrue:[''] ifFalse:[l , ' ']) , applClassName
  4033             l := (l isNil ifTrue:[''] ifFalse:[l , ' ']) , applClassName
  4032         ].
  4034         ].
  4033     ].
  4035     ].
       
  4036 
       
  4037     application notNil ifTrue:[
       
  4038         key := application builder namedComponents keyAtValue:widget ifAbsent:nil.
       
  4039         key notNil ifTrue:[
       
  4040             l := l , ' #',key
       
  4041         ].
       
  4042     ].
       
  4043 
  4034     ^ l
  4044     ^ l
  4035 !
  4045 !
  4036 
  4046 
  4037 showWidgetNames
  4047 showWidgetNames
  4038     "answer true if the additional text is the widget name
  4048     "answer true if the additional text is the widget name