author | Stefan Vogel <sv@exept.de> |
Mon, 30 Jan 2017 15:12:22 +0100 | |
changeset 17301 | 6a1aa6e554dd |
parent 14864 | e79e13de977e |
child 15566 | 184cea584be5 |
child 18082 | b4acbd7d6ecb |
permissions | -rw-r--r-- |
9990 | 1 |
" |
10062 | 2 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague |
3 |
All Rights Reserved |
|
9990 | 4 |
|
10062 | 5 |
Permission is hereby granted, free of charge, to any person |
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
9990 | 25 |
" |
26 |
"{ Package: 'stx:libtool' }" |
|
27 |
||
28 |
"{ NameSpace: Tools }" |
|
29 |
||
30 |
HierarchicalProjectList subclass:#HierarchicalPackageFilterList |
|
31 |
instanceVariableNames:'' |
|
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
category:'Interface-Browsers-New-Profiler' |
|
35 |
! |
|
36 |
||
37 |
HierarchicalItemWithLabel subclass:#PackageItem |
|
38 |
instanceVariableNames:'packageID selected' |
|
39 |
classVariableNames:'' |
|
40 |
poolDictionaries:'' |
|
41 |
privateIn:HierarchicalPackageFilterList |
|
42 |
! |
|
43 |
||
44 |
!HierarchicalPackageFilterList class methodsFor:'documentation'! |
|
45 |
||
46 |
copyright |
|
47 |
" |
|
10062 | 48 |
COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague |
49 |
All Rights Reserved |
|
50 |
||
51 |
Permission is hereby granted, free of charge, to any person |
|
52 |
obtaining a copy of this software and associated documentation |
|
53 |
files (the 'Software'), to deal in the Software without |
|
54 |
restriction, including without limitation the rights to use, |
|
55 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
56 |
copies of the Software, and to permit persons to whom the |
|
57 |
Software is furnished to do so, subject to the following |
|
58 |
conditions: |
|
9990 | 59 |
|
10062 | 60 |
The above copyright notice and this permission notice shall be |
61 |
included in all copies or substantial portions of the Software. |
|
62 |
||
63 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
64 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
65 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
66 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
67 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
68 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
69 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
70 |
OTHER DEALINGS IN THE SOFTWARE. |
|
9990 | 71 |
" |
72 |
! ! |
|
73 |
||
74 |
!HierarchicalPackageFilterList class methodsFor:'interface specs'! |
|
75 |
||
76 |
windowSpec |
|
77 |
"This resource specification was automatically generated |
|
78 |
by the UIPainter of ST/X." |
|
79 |
||
80 |
"Do not manually edit this!! If it is corrupted, |
|
81 |
the UIPainter may not be able to read the specification." |
|
82 |
||
83 |
" |
|
84 |
UIPainter new openOnClass:Tools::HierarchicalPackageFilterList andSelector:#windowSpec |
|
85 |
Tools::HierarchicalPackageFilterList new openInterface:#windowSpec |
|
86 |
Tools::HierarchicalPackageFilterList open |
|
87 |
" |
|
88 |
||
89 |
<resource: #canvas> |
|
90 |
||
91 |
^ |
|
92 |
#(FullSpec |
|
93 |
name: windowSpec |
|
94 |
window: |
|
95 |
(WindowSpec |
|
96 |
label: 'ProjectList' |
|
97 |
name: 'ProjectList' |
|
98 |
min: (Point 0 0) |
|
99 |
max: (Point 1024 721) |
|
100 |
bounds: (Rectangle 0 0 346 324) |
|
101 |
) |
|
102 |
component: |
|
103 |
(SpecCollection |
|
104 |
collection: ( |
|
105 |
(HierarchicalListViewSpec |
|
106 |
name: 'HierarchicalListView1' |
|
107 |
layout: (LayoutFrame 0 0 0 0 0 1 -30 1) |
|
108 |
tabable: true |
|
109 |
model: hierarchicalProjectSelection |
|
110 |
menu: menuHolder |
|
111 |
hasHorizontalScrollBar: true |
|
112 |
hasVerticalScrollBar: true |
|
113 |
miniScrollerHorizontal: true |
|
114 |
listModel: hierarchicalProjectList |
|
115 |
highlightMode: line |
|
116 |
doubleClickSelector: doubleClicked: |
|
117 |
showLines: false |
|
118 |
indicatorSelector: indicatorPressed: |
|
119 |
properties: |
|
120 |
(PropertyListDictionary |
|
121 |
dragArgument: nil |
|
122 |
dropArgument: nil |
|
123 |
canDropSelector: canDrop: |
|
124 |
dropSelector: doDrop: |
|
125 |
) |
|
126 |
) |
|
127 |
(LabelSpec |
|
128 |
label: 'Hint: double-click on item to (de)select' |
|
129 |
name: 'Hint' |
|
130 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) |
|
131 |
translateLabel: true |
|
132 |
adjust: left |
|
133 |
) |
|
134 |
) |
|
135 |
||
136 |
) |
|
137 |
) |
|
138 |
||
139 |
"Modified: / 10-10-2007 / 12:25:16 / janfrog" |
|
140 |
! ! |
|
141 |
||
142 |
!HierarchicalPackageFilterList class methodsFor:'plugIn spec'! |
|
143 |
||
144 |
aspectSelectors |
|
145 |
"This resource specification was automatically generated |
|
146 |
by the UIPainter of ST/X." |
|
147 |
||
148 |
"Do not manually edit this. If it is corrupted, |
|
149 |
the UIPainter may not be able to read the specification." |
|
150 |
||
151 |
"Return a description of exported aspects; |
|
152 |
these can be connected to aspects of an embedding application |
|
153 |
(if this app is embedded in a subCanvas)." |
|
154 |
||
155 |
^ #( |
|
14028
82c471faccde
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
156 |
environmentHolder |
9990 | 157 |
#packageFilter |
158 |
). |
|
159 |
||
160 |
"Modified: / 10-10-2007 / 12:24:58 / janfrog" |
|
14028
82c471faccde
Refactoring of NavigatorModel's environment.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
13498
diff
changeset
|
161 |
"Modified: / 24-02-2014 / 10:38:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
9990 | 162 |
! ! |
163 |
||
164 |
!HierarchicalPackageFilterList methodsFor:'aspects'! |
|
165 |
||
166 |
generateHierarchicalProjectTree |
|
167 |
|anchor| |
|
168 |
||
169 |
self projectList value isNil ifTrue:[ |
|
170 |
self updateList. |
|
171 |
self projectList value isNil ifTrue:[ |
|
172 |
^ nil. |
|
173 |
] |
|
174 |
]. |
|
175 |
||
176 |
anchor := Tools::HierarchicalPackageFilterList::PackageItem new. |
|
177 |
anchor package:''. |
|
178 |
anchor label:nil. |
|
179 |
||
180 |
packageToItemDictionary := IdentityDictionary new. |
|
181 |
packageToItemDictionary at:'' asSymbol put:anchor. |
|
182 |
||
183 |
self projectList value do:[:eachPackageString | |
|
184 |
|package| |
|
185 |
eachPackageString = '* all *' ifFalse:[ |
|
186 |
package := eachPackageString asSymbol. |
|
187 |
(packageToItemDictionary includesKey:package) ifFalse:[ |
|
188 |
self addPackage:package |
|
189 |
] |
|
190 |
]. |
|
191 |
]. |
|
192 |
||
13498
b8d845e42988
Added `environment` instance variable to Tools__NewSystemBrowser and
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12715
diff
changeset
|
193 |
"/ environment allClassesDo:[:eachClass | |
9990 | 194 |
"/ |package| |
195 |
"/ |
|
196 |
"/ package := eachClass package asSymbol. |
|
197 |
"/ (packageToItemDictionary includesKey:package) ifFalse:[ |
|
198 |
"/ self addPackage:package |
|
199 |
"/ ]. |
|
200 |
"/ ]. |
|
201 |
anchor recursiveSortChildren:[:i1 :i2 | i1 label asLowercase < i2 label asLowercase]. |
|
202 |
anchor expand. |
|
203 |
anchor selected: true. |
|
204 |
||
205 |
^ anchor |
|
206 |
||
207 |
"Created: / 10-10-2007 / 10:16:57 / janfrog" |
|
208 |
"Modified: / 10-10-2007 / 12:40:52 / janfrog" |
|
209 |
! |
|
210 |
||
211 |
hierarchicalProjectList |
|
212 |
|anchor | |
|
213 |
||
214 |
hierarchicalProjectList isNil ifTrue:[ |
|
215 |
hierarchicalProjectList := HierarchicalList new. |
|
216 |
hierarchicalProjectList showRoot:false. |
|
217 |
hierarchicalProjectList application: self. |
|
218 |
||
219 |
("self slaveMode value ~~" true) ifTrue:[ |
|
220 |
anchor := self generateHierarchicalProjectTree. |
|
221 |
hierarchicalProjectList root:anchor. |
|
222 |
anchor parent: hierarchicalProjectList. |
|
14864
e79e13de977e
class: Tools::HierarchicalPackageFilterList
Claus Gittinger <cg@exept.de>
parents:
14586
diff
changeset
|
223 |
self setListValid:true. |
9990 | 224 |
] ifFalse:[ |
14864
e79e13de977e
class: Tools::HierarchicalPackageFilterList
Claus Gittinger <cg@exept.de>
parents:
14586
diff
changeset
|
225 |
self setListValid:false |
9990 | 226 |
] |
227 |
]. |
|
228 |
^ hierarchicalProjectList |
|
229 |
||
230 |
"Created: / 10-10-2007 / 10:36:38 / janfrog" |
|
231 |
! ! |
|
232 |
||
233 |
!HierarchicalPackageFilterList methodsFor:'change & update'! |
|
234 |
||
235 |
updatePackageFilter |
|
236 |
||
237 |
| selectedPackages | |
|
238 |
selectedPackages := self hierarchicalProjectList root selectedPackageIDs. |
|
239 |
self packageFilter value: selectedPackages |
|
240 |
||
241 |
"Created: / 10-10-2007 / 12:41:46 / janfrog" |
|
242 |
! |
|
243 |
||
244 |
updateSelectionFromTree |
|
245 |
||
246 |
"nothing to do" |
|
247 |
||
248 |
"Created: / 10-10-2007 / 12:13:10 / janfrog" |
|
249 |
! ! |
|
250 |
||
251 |
!HierarchicalPackageFilterList methodsFor:'private'! |
|
252 |
||
253 |
addPackage:package |
|
254 |
|i p pp l parentPackage parentItem idx| |
|
255 |
||
256 |
i:= packageToItemDictionary at:package asSymbol ifAbsent:nil. |
|
257 |
i isNil ifTrue:[ |
|
258 |
i := Tools::HierarchicalPackageFilterList::PackageItem new. |
|
259 |
i package:package. |
|
260 |
packageToItemDictionary at:package asSymbol put:i. |
|
261 |
||
262 |
package size > 0 ifTrue:[ |
|
263 |
"/ find the parent ... |
|
264 |
p := package asCollectionOfSubstringsSeparatedByAny:':/.'. |
|
14586
15f0df501dd2
class: Tools::HierarchicalPackageFilterList
Claus Gittinger <cg@exept.de>
parents:
14398
diff
changeset
|
265 |
pp := p copyButLast. |
9990 | 266 |
l := (pp asStringWith:$/) size. |
267 |
parentPackage := package copyTo:l. |
|
268 |
||
269 |
parentItem := self addPackage:parentPackage asSymbol . |
|
270 |
||
271 |
parentPackage size == 0 ifTrue:[ |
|
272 |
idx := 1. |
|
273 |
] ifFalse:[ |
|
274 |
idx := parentPackage size + 2 |
|
275 |
]. |
|
276 |
i label:(package copyFrom:idx). |
|
277 |
||
278 |
parentItem add:i sortBlock:[:i1 :i2 | i1 label asLowercase < i2 label asLowercase]. |
|
279 |
||
280 |
"/ TODO: special items for classes, resources etc. |
|
281 |
||
282 |
] |
|
283 |
]. |
|
284 |
^ i |
|
285 |
||
286 |
"Created: / 10-10-2007 / 10:17:10 / janfrog" |
|
287 |
! ! |
|
288 |
||
289 |
!HierarchicalPackageFilterList methodsFor:'user actions'! |
|
290 |
||
291 |
doubleClicked:anIndex |
|
292 |
||
293 |
| selectedPackageItem | |
|
294 |
selectedPackageItem := self hierarchicalProjectList at: |
|
295 |
self hierarchicalProjectSelection value. |
|
296 |
selectedPackageItem toggleSelection |
|
297 |
||
298 |
"Created: / 10-10-2007 / 10:19:17 / janfrog" |
|
299 |
"Modified: / 10-10-2007 / 12:15:53 / janfrog" |
|
300 |
! ! |
|
301 |
||
302 |
!HierarchicalPackageFilterList::PackageItem class methodsFor:'documentation'! |
|
303 |
||
304 |
version |
|
14864
e79e13de977e
class: Tools::HierarchicalPackageFilterList
Claus Gittinger <cg@exept.de>
parents:
14586
diff
changeset
|
305 |
^'$Header: /cvs/stx/stx/libtool/Tools__HierarchicalPackageFilterList.st,v 1.8 2014-11-19 21:41:47 cg Exp $' |
9990 | 306 |
! ! |
307 |
||
308 |
!HierarchicalPackageFilterList::PackageItem class methodsFor:'image specs'! |
|
309 |
||
310 |
checkedIcon |
|
14398
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
311 |
<resource: #image> |
9990 | 312 |
"This resource specification was automatically generated |
313 |
by the ImageEditor of ST/X." |
|
314 |
"Do not manually edit this!! If it is corrupted, |
|
315 |
the ImageEditor may not be able to read the specification." |
|
316 |
" |
|
317 |
self checkedIcon inspect |
|
318 |
ImageEditor openOnClass:self andSelector:#checkedIcon |
|
14398
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
319 |
Icon flushCachedIcons" |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
320 |
|
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
321 |
^ Icon |
9990 | 322 |
constantNamed:#'Tools::HierarchicalPackageFilterList::PackageItem class checkedIcon' |
14398
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
323 |
ifAbsentPut:[ |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
324 |
(Depth1Image new) |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
325 |
width:16; |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
326 |
height:16; |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
327 |
photometric:(#palette); |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
328 |
bitsPerSample:(#[ 1 ]); |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
329 |
samplesPerPixel:(1); |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
330 |
bits:(ByteArray |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
331 |
fromPackedString:'@@@@@C?<O?0??C?<O?0??C?<O?07?C?<O?0??@@@@@@b'); |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
332 |
colorMapFromArray:#[ 0 0 0 33 161 33 ]; |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
333 |
mask:((ImageMask new) |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
334 |
width:16; |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
335 |
height:16; |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
336 |
bits:(ByteArray |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
337 |
fromPackedString:' |
9990 | 338 |
?????<@C0@O@D<@30GOH8<7C38OG@<HC0@O@@?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
339 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
14398
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
340 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
341 |
yourself); |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
342 |
yourself |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
343 |
] |
9990 | 344 |
|
345 |
"Created: / 10-10-2007 / 10:52:06 / janfrog" |
|
346 |
! |
|
347 |
||
348 |
uncheckedIcon |
|
14398
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
349 |
<resource: #image> |
9990 | 350 |
"This resource specification was automatically generated |
351 |
by the ImageEditor of ST/X." |
|
352 |
"Do not manually edit this!! If it is corrupted, |
|
353 |
the ImageEditor may not be able to read the specification." |
|
354 |
" |
|
355 |
self checkFrameForm inspect |
|
356 |
ImageEditor openOnClass:self andSelector:#checkFrameForm |
|
14398
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
357 |
Icon flushCachedIcons" |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
358 |
|
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
359 |
^ Icon |
9990 | 360 |
constantNamed:#'Tools::HierarchicalPackageFilterList::PackageItem class checkFrameForm' |
14398
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
361 |
ifAbsentPut:[ |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
362 |
(Depth1Image new) |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
363 |
width:16; |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
364 |
height:16; |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
365 |
photometric:(#palette); |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
366 |
bitsPerSample:(#[ 1 ]); |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
367 |
samplesPerPixel:(1); |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
368 |
bits:(ByteArray |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
369 |
fromPackedString:'@@@@@C?<O?0??C?<O?0??C?<O?0??C?<O?0??@@@@@@b'); |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
370 |
colorMapFromArray:#[ 0 0 0 255 255 255 ]; |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
371 |
mask:((ImageMask new) |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
372 |
width:16; |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
373 |
height:16; |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
374 |
bits:(ByteArray |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
375 |
fromPackedString:' |
9990 | 376 |
?????<@C0@O@@<@C0@O@@<@C0@O@@<@C0@O@@?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
377 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
14398
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
378 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a'); |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
379 |
yourself); |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
380 |
yourself |
6c7701a07767
Change images to use ImageMask instances instead of Depth1Image instances as
Stefan Vogel <sv@exept.de>
parents:
14028
diff
changeset
|
381 |
] |
9990 | 382 |
|
383 |
"Created: / 10-10-2007 / 10:49:12 / janfrog" |
|
384 |
! ! |
|
385 |
||
386 |
!HierarchicalPackageFilterList::PackageItem methodsFor:'accessing'! |
|
387 |
||
388 |
children |
|
389 |
children isNil ifTrue:[ |
|
390 |
children := #() |
|
391 |
]. |
|
392 |
^ children |
|
393 |
! |
|
394 |
||
395 |
icon |
|
396 |
||
397 |
^self selected |
|
398 |
ifTrue:[self class checkedIcon] |
|
399 |
ifFalse:[self class uncheckedIcon] |
|
400 |
||
401 |
"Created: / 10-10-2007 / 10:16:04 / janfrog" |
|
402 |
"Modified: / 10-10-2007 / 12:17:50 / janfrog" |
|
403 |
! |
|
404 |
||
405 |
label |
|
406 |
||
407 |
^label |
|
408 |
||
409 |
||
410 |
"Modified: / 20-04-2005 / 19:10:49 / janfrog" |
|
411 |
! |
|
412 |
||
413 |
label:aString |
|
414 |
label ~= aString ifTrue:[ |
|
415 |
label := aString. |
|
416 |
self changed:#label |
|
417 |
]. |
|
418 |
! |
|
419 |
||
420 |
package |
|
421 |
^ packageID |
|
422 |
! |
|
423 |
||
424 |
package:prefixOrPackageID |
|
425 |
packageID := prefixOrPackageID |
|
426 |
! |
|
427 |
||
428 |
packageID |
|
429 |
^ packageID |
|
430 |
||
431 |
"Created: / 10-10-2007 / 12:09:14 / janfrog" |
|
432 |
! |
|
433 |
||
434 |
selected |
|
435 |
^ selected ? false |
|
436 |
||
437 |
"Created: / 10-10-2007 / 12:16:21 / janfrog" |
|
438 |
! |
|
439 |
||
440 |
selected:aBoolean |
|
441 |
||
442 |
self selected: aBoolean doUpdate: true |
|
443 |
||
444 |
"Created: / 10-10-2007 / 12:16:21 / janfrog" |
|
445 |
! |
|
446 |
||
447 |
selected:sel doUpdate: doUpdate |
|
448 |
||
449 |
selected := sel. |
|
450 |
self children do:[:child|child selected: sel doUpdate:false]. |
|
451 |
doUpdate ifTrue:[ |
|
452 |
self model ifNotNil:[ |
|
453 |
self model changed. |
|
454 |
self application updatePackageFilter |
|
455 |
] |
|
456 |
] |
|
457 |
||
458 |
"Created: / 10-10-2007 / 12:19:51 / janfrog" |
|
459 |
! |
|
460 |
||
461 |
selectedPackageIDs |
|
462 |
||
463 |
| stream | |
|
464 |
stream := OrderedCollection new writeStream. |
|
465 |
self selectedPackageIDsOn: stream. |
|
466 |
^stream contents |
|
467 |
||
468 |
"Created: / 10-10-2007 / 13:29:35 / janfrog" |
|
469 |
! |
|
470 |
||
471 |
selectedPackageIDsOn: stream |
|
472 |
||
473 |
self selected ifTrue:[stream nextPut: self packageID]. |
|
474 |
self children do:[:child|child selectedPackageIDsOn: stream]. |
|
475 |
||
476 |
"Created: / 10-10-2007 / 13:30:18 / janfrog" |
|
477 |
! ! |
|
478 |
||
479 |
!HierarchicalPackageFilterList::PackageItem methodsFor:'user actions'! |
|
480 |
||
481 |
toggleSelection |
|
482 |
||
483 |
self selected: self selected not |
|
484 |
||
485 |
"Created: / 10-10-2007 / 12:16:08 / janfrog" |
|
486 |
! ! |
|
487 |
||
488 |
!HierarchicalPackageFilterList class methodsFor:'documentation'! |
|
489 |
||
490 |
version_CVS |
|
14864
e79e13de977e
class: Tools::HierarchicalPackageFilterList
Claus Gittinger <cg@exept.de>
parents:
14586
diff
changeset
|
491 |
^ '$Header: /cvs/stx/stx/libtool/Tools__HierarchicalPackageFilterList.st,v 1.8 2014-11-19 21:41:47 cg Exp $' |
9990 | 492 |
! |
493 |
||
494 |
version_SVN |
|
14864
e79e13de977e
class: Tools::HierarchicalPackageFilterList
Claus Gittinger <cg@exept.de>
parents:
14586
diff
changeset
|
495 |
^ '$Id: Tools__HierarchicalPackageFilterList.st,v 1.8 2014-11-19 21:41:47 cg Exp $' |
9990 | 496 |
! ! |
12715
755f78ea626b
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
10062
diff
changeset
|
497 |