diff -r fb90f37268be -r c2e814032029 ResourceSelectionBrowser.st --- a/ResourceSelectionBrowser.st Tue Mar 10 13:42:53 1998 +0100 +++ b/ResourceSelectionBrowser.st Tue Mar 10 15:50:17 1998 +0100 @@ -81,10 +81,10 @@ ^[:aTreeItem| |classes| classes := OrderedCollection new. - classes - addAll: (aTreeItem contents subclasses asSortedCollection: [:i1 :i2| i1 name < i2 name]); - yourself] - + classes addAll: ((aTreeItem contents subclasses reject: [:cls| cls isPrivate]) asSortedCollection: [:i1 :i2| i1 name < i2 name]). + classes addAll: (aTreeItem contents privateClasses asSortedCollection: [:i1 :i2| i1 name < i2 name]). + classes + ] ! treeViewContents @@ -98,13 +98,29 @@ treeViewIcon - ^[self iconClass] + ^[:aTreeItem| + |icon| + icon := self iconClass. + aTreeItem contents isPrivate + ifTrue: + [ + icon := self iconPrivateClass + ]. + icon] ! treeViewLabel - ^[:aTreeItem|aTreeItem contents name] + ^[:aTreeItem| + |label superCls| + label := aTreeItem contents name. + (aTreeItem contents isPrivate and: [aTreeItem parent contents ~~ (superCls := aTreeItem contents superclass)]) + ifTrue: [label := label, ' (', superCls name, ')']. + label + ] + + ! ! !ResourceSelectionBrowser class methodsFor:'interface specs'! @@ -320,21 +336,7 @@ ^Icon constantNamed:#'ResourceSelectionBrowser iconPrivateClass' - ifAbsentPut:[(Depth2Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@PUUUUU@A****(@F*??* @Z/??*@A+???(MF/??> @Z5UU:@A+UUW(DF/??> @Z???:@A*??>(@F*??* @Z****C@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 0 0]; mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@???@???@???@???@???@???@???@???@???@???@???@???@???@???@_?>@') ; yourself); yourself] -! - -iconRealPrivateClass - "Generated by the Image Editor" - " - ImageEditor openOnClass:self andSelector:#iconRealPrivateClass - " - - - - ^Icon - constantNamed:#'ResourceSelectionBrowser iconRealPrivateClass' - ifAbsentPut:[(Depth2Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@PUUUUU@A****(@F*??* @Z/??*@A+???(OF/??> @Z5UU:@A+UUW(DF/??> @Z???:@A*??>(@F*??* @Z****C0@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0]; mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@???@???@???@???@???@???@???@???@???@???@???@???@???@???@_?>@') ; yourself); yourself] -! ! + ifAbsentPut:[(Depth2Image new) width: 18; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@PUUUUU@A****(@F*??* @Z+??*@A*/*>(OF*>+: @Z+??*@A*/?:(DF*>** @Z+:**@A*/**(@F*>** @Z****C0@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 255 0 0]; mask:((Depth1Image new) width: 18; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'_?>@???@???@???@???@???@???@???@???@???@???@???@???@???@???@_?>@') ; yourself); yourself]! ! !ResourceSelectionBrowser methodsFor:'accessing - views'! @@ -420,45 +422,11 @@ !ResourceSelectionBrowser methodsFor:'callbacks - tree view'! -treeViewChildren - - ^[:aTreeItem| - |classes| - classes := self class treeViewChildren value: aTreeItem. - classes addAll: (aTreeItem contents privateClasses asSortedCollection: [:i1 :i2| i1 name < i2 name]); - yourself] -! - treeViewContents ^(Smalltalk at: resourceSuperclass) ? self class treeViewContents -! - -treeViewIcon - - ^[:aTreeItem| - |icon| - icon := self class treeViewIcon value. - aTreeItem contents isPrivate - ifTrue: - [ - aTreeItem parent contents ~~ aTreeItem contents superclass - ifTrue: [icon := self class iconRealPrivateClass] - ifFalse: [icon := self class iconPrivateClass] - ]. - icon] -! - -treeViewLabel - - ^[:aTreeItem| - |label superCls| - label := self class treeViewLabel value: aTreeItem. - (aTreeItem contents isPrivate and: [aTreeItem parent contents ~~ (superCls := aTreeItem contents superclass)]) - ifTrue: [label := label, ' (', superCls name, ')']. - label] ! ! !ResourceSelectionBrowser methodsFor:'callbacks - user'!