equal
deleted
inserted
replaced
79 treeViewChildren |
79 treeViewChildren |
80 |
80 |
81 ^[:aTreeItem| |
81 ^[:aTreeItem| |
82 |classes| |
82 |classes| |
83 classes := OrderedCollection new. |
83 classes := OrderedCollection new. |
84 classes |
84 classes addAll: ((aTreeItem contents subclasses reject: [:cls| cls isPrivate]) asSortedCollection: [:i1 :i2| i1 name < i2 name]). |
85 addAll: (aTreeItem contents subclasses asSortedCollection: [:i1 :i2| i1 name < i2 name]); |
85 classes addAll: (aTreeItem contents privateClasses asSortedCollection: [:i1 :i2| i1 name < i2 name]). |
86 yourself] |
86 classes |
87 |
87 ] |
88 ! |
88 ! |
89 |
89 |
90 treeViewContents |
90 treeViewContents |
91 |
91 |
92 ^Smalltalk at: #Object |
92 ^Smalltalk at: #Object |
96 |
96 |
97 ! |
97 ! |
98 |
98 |
99 treeViewIcon |
99 treeViewIcon |
100 |
100 |
101 ^[self iconClass] |
101 ^[:aTreeItem| |
|
102 |icon| |
|
103 icon := self iconClass. |
|
104 aTreeItem contents isPrivate |
|
105 ifTrue: |
|
106 [ |
|
107 icon := self iconPrivateClass |
|
108 ]. |
|
109 icon] |
102 |
110 |
103 ! |
111 ! |
104 |
112 |
105 treeViewLabel |
113 treeViewLabel |
106 |
114 |
107 ^[:aTreeItem|aTreeItem contents name] |
115 ^[:aTreeItem| |
|
116 |label superCls| |
|
117 label := aTreeItem contents name. |
|
118 (aTreeItem contents isPrivate and: [aTreeItem parent contents ~~ (superCls := aTreeItem contents superclass)]) |
|
119 ifTrue: [label := label, ' (', superCls name, ')']. |
|
120 label |
|
121 ] |
|
122 |
|
123 |
108 ! ! |
124 ! ! |
109 |
125 |
110 !ResourceSelectionBrowser class methodsFor:'interface specs'! |
126 !ResourceSelectionBrowser class methodsFor:'interface specs'! |
111 |
127 |
112 windowSpec |
128 windowSpec |
318 |
334 |
319 <resource: #image> |
335 <resource: #image> |
320 |
336 |
321 ^Icon |
337 ^Icon |
322 constantNamed:#'ResourceSelectionBrowser iconPrivateClass' |
338 constantNamed:#'ResourceSelectionBrowser iconPrivateClass' |
323 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] |
339 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]! ! |
324 ! |
|
325 |
|
326 iconRealPrivateClass |
|
327 "Generated by the Image Editor" |
|
328 " |
|
329 ImageEditor openOnClass:self andSelector:#iconRealPrivateClass |
|
330 " |
|
331 |
|
332 <resource: #image> |
|
333 |
|
334 ^Icon |
|
335 constantNamed:#'ResourceSelectionBrowser iconRealPrivateClass' |
|
336 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] |
|
337 ! ! |
|
338 |
340 |
339 !ResourceSelectionBrowser methodsFor:'accessing - views'! |
341 !ResourceSelectionBrowser methodsFor:'accessing - views'! |
340 |
342 |
341 classNameInputField |
343 classNameInputField |
342 |
344 |
418 ^ holder |
420 ^ holder |
419 ! ! |
421 ! ! |
420 |
422 |
421 !ResourceSelectionBrowser methodsFor:'callbacks - tree view'! |
423 !ResourceSelectionBrowser methodsFor:'callbacks - tree view'! |
422 |
424 |
423 treeViewChildren |
|
424 |
|
425 ^[:aTreeItem| |
|
426 |classes| |
|
427 classes := self class treeViewChildren value: aTreeItem. |
|
428 classes addAll: (aTreeItem contents privateClasses asSortedCollection: [:i1 :i2| i1 name < i2 name]); |
|
429 yourself] |
|
430 ! |
|
431 |
|
432 treeViewContents |
425 treeViewContents |
433 |
426 |
434 ^(Smalltalk at: resourceSuperclass) ? self class treeViewContents |
427 ^(Smalltalk at: resourceSuperclass) ? self class treeViewContents |
435 |
428 |
436 |
429 |
437 ! |
|
438 |
|
439 treeViewIcon |
|
440 |
|
441 ^[:aTreeItem| |
|
442 |icon| |
|
443 icon := self class treeViewIcon value. |
|
444 aTreeItem contents isPrivate |
|
445 ifTrue: |
|
446 [ |
|
447 aTreeItem parent contents ~~ aTreeItem contents superclass |
|
448 ifTrue: [icon := self class iconRealPrivateClass] |
|
449 ifFalse: [icon := self class iconPrivateClass] |
|
450 ]. |
|
451 icon] |
|
452 ! |
|
453 |
|
454 treeViewLabel |
|
455 |
|
456 ^[:aTreeItem| |
|
457 |label superCls| |
|
458 label := self class treeViewLabel value: aTreeItem. |
|
459 (aTreeItem contents isPrivate and: [aTreeItem parent contents ~~ (superCls := aTreeItem contents superclass)]) |
|
460 ifTrue: [label := label, ' (', superCls name, ')']. |
|
461 label] |
|
462 ! ! |
430 ! ! |
463 |
431 |
464 !ResourceSelectionBrowser methodsFor:'callbacks - user'! |
432 !ResourceSelectionBrowser methodsFor:'callbacks - user'! |
465 |
433 |
466 classSelected: anIndex |
434 classSelected: anIndex |