author | tz |
Thu, 29 Jan 1998 19:34:51 +0100 | |
changeset 524 | 6ced725af608 |
parent 521 | 61569efc19f4 |
child 528 | 4c6acd1fa911 |
permissions | -rw-r--r-- |
332 | 1 |
" |
2 |
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
||
15 |
||
16 |
||
408 | 17 |
ToolApplicationModel subclass:#DataSetBuilder |
332 | 18 |
instanceVariableNames:'className superclassName hasChanged columnView columns |
19 |
selectedColumnIndex tabSelectionIndex aspects isModified' |
|
20 |
classVariableNames:'Number' |
|
21 |
poolDictionaries:'' |
|
22 |
category:'Interface-UIPainter' |
|
23 |
! |
|
24 |
||
25 |
!DataSetBuilder class methodsFor:'documentation'! |
|
26 |
||
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger |
|
30 |
All Rights Reserved |
|
31 |
||
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
||
40 |
||
41 |
||
42 |
||
43 |
! |
|
44 |
||
45 |
documentation |
|
46 |
" |
|
47 |
create and modify or inspect dataset columns; used by UIPainter (DataSetColumnSpec) |
|
48 |
||
49 |
[see also:] |
|
50 |
DataSetColumnSpec |
|
51 |
DataSetSpec |
|
52 |
DataSetView |
|
53 |
DataSetColumn |
|
54 |
||
55 |
[author:] |
|
56 |
Claus Atzkern |
|
57 |
" |
|
58 |
||
59 |
! ! |
|
60 |
||
61 |
!DataSetBuilder class methodsFor:'columns specs'! |
|
62 |
||
63 |
basicsEditSpec |
|
64 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
65 |
||
66 |
"do not manually edit this - the painter/builder may not be able to |
|
67 |
handle the specification if its corrupted." |
|
68 |
||
69 |
" |
|
70 |
UIPainter new openOnClass:DataSetBuilder andSelector:#basicsEditSpec |
|
71 |
DataSetBuilder new openInterface:#basicsEditSpec |
|
72 |
" |
|
73 |
||
74 |
<resource: #canvas> |
|
75 |
||
76 |
^ |
|
77 |
||
78 |
#(#FullSpec |
|
79 |
#'window:' |
|
80 |
#(#WindowSpec |
|
81 |
#'name:' 'DataSet Basic' |
|
470 | 82 |
#'layout:' #(#LayoutFrame 330 0 352 0 618 0 607 0) |
332 | 83 |
#'label:' 'DataSet Basic' |
84 |
#'min:' #(#Point 10 10) |
|
85 |
#'max:' #(#Point 1280 1024) |
|
470 | 86 |
#'bounds:' #(#Rectangle 330 352 619 608) |
370 | 87 |
#'usePreferredExtent:' false |
332 | 88 |
) |
89 |
#'component:' |
|
90 |
#(#SpecCollection |
|
91 |
#'collection:' |
|
92 |
#( |
|
408 | 93 |
#(#FramedBoxSpec |
94 |
#'name:' 'framedBox1' |
|
442 | 95 |
#'layout:' #(#LayoutFrame 0 0.0 3 0 0 1.0 145 0) |
408 | 96 |
#'component:' |
97 |
#(#SpecCollection |
|
98 |
#'collection:' |
|
99 |
#( |
|
100 |
#(#LabelSpec |
|
101 |
#'name:' 'label1' |
|
427 | 102 |
#'layout:' #(#AlignmentOrigin 107 0 32 0 1 0.5) |
408 | 103 |
#'label:' 'Label:' |
104 |
#'resizeForLabel:' true |
|
105 |
) |
|
106 |
#(#InputFieldSpec |
|
107 |
#'name:' 'labelField' |
|
108 |
#'layout:' #(#LayoutFrame 110 0 21 0 15 1.0 43 0) |
|
109 |
#'activeHelpKey:' #label |
|
470 | 110 |
#'tabable:' true |
408 | 111 |
#'model:' #label |
112 |
) |
|
113 |
#(#CheckBoxSpec |
|
114 |
#'name:' 'labelIsImage' |
|
442 | 115 |
#'layout:' #(#LayoutOrigin 107 0 103 0) |
408 | 116 |
#'activeHelpKey:' #labelIsImage |
470 | 117 |
#'tabable:' true |
408 | 118 |
#'model:' #labelIsImage |
119 |
#'label:' 'Label Is Image' |
|
120 |
) |
|
439 | 121 |
#(#UISubSpecification |
122 |
#'name:' 'fontSubSpec' |
|
123 |
#'layout:' #(#LayoutFrame 60 0.0 47 0 15 1.0 72 0) |
|
124 |
#'minorKey:' #fontSpec |
|
125 |
) |
|
442 | 126 |
#(#PopUpListSpec |
127 |
#'name:' 'Alignment' |
|
128 |
#'layout:' #(#LayoutFrame 110 0 78 0 15 1.0 100 0) |
|
129 |
#'label:' 'Alignment' |
|
130 |
#'model:' #labelAlignment |
|
131 |
#'menu:' |
|
132 |
#(#left |
|
133 |
#right #center |
|
134 |
) |
|
135 |
#'useIndex:' false |
|
136 |
) |
|
137 |
#(#LabelSpec |
|
138 |
#'name:' 'JustificationLabel' |
|
139 |
#'layout:' #(#AlignmentOrigin 107 0 89 0 1 0.5) |
|
140 |
#'label:' 'Justification:' |
|
141 |
#'adjust:' #left |
|
142 |
#'resizeForLabel:' true |
|
143 |
) |
|
408 | 144 |
) |
145 |
) |
|
146 |
#'label:' 'Header:' |
|
147 |
#'labelPosition:' #topLeft |
|
332 | 148 |
) |
149 |
#(#FramedBoxSpec |
|
150 |
#'name:' 'typesFrame' |
|
442 | 151 |
#'layout:' #(#LayoutFrame 0 0.0 145 0 0 1.0 227 0) |
332 | 152 |
#'component:' |
153 |
#(#SpecCollection |
|
154 |
#'collection:' |
|
155 |
#( |
|
156 |
#(#LabelSpec |
|
157 |
#'name:' 'rendererLabel' |
|
427 | 158 |
#'layout:' #(#AlignmentOrigin 107 0 29 0 1 0.5) |
332 | 159 |
#'label:' 'Renderer:' |
160 |
#'resizeForLabel:' true |
|
161 |
) |
|
162 |
#(#ComboListSpec |
|
163 |
#'name:' 'rendererField' |
|
408 | 164 |
#'layout:' #(#LayoutFrame 110 0 18 0 15 1.0 40 0) |
338 | 165 |
#'activeHelpKey:' #rendererType |
470 | 166 |
#'tabable:' true |
332 | 167 |
#'model:' #rendererType |
168 |
#'comboList:' #rendererTypeList |
|
169 |
#'useIndex:' false |
|
170 |
) |
|
171 |
#(#LabelSpec |
|
172 |
#'name:' 'editorLabel' |
|
427 | 173 |
#'layout:' #(#AlignmentOrigin 107 0 55 0 1 0.5) |
332 | 174 |
#'label:' 'Editor:' |
175 |
#'resizeForLabel:' true |
|
176 |
) |
|
177 |
#(#ComboBoxSpec |
|
178 |
#'name:' 'editorField' |
|
408 | 179 |
#'layout:' #(#LayoutFrame 110 0 44 0 15 1.0 66 0) |
338 | 180 |
#'activeHelpKey:' #editorField |
470 | 181 |
#'tabable:' true |
332 | 182 |
#'model:' #editorType |
183 |
#'type:' #symbolOrNil |
|
184 |
#'comboList:' #editorTypeList |
|
185 |
#'useIndex:' false |
|
186 |
) |
|
187 |
) |
|
188 |
) |
|
408 | 189 |
#'label:' 'Cell Type:' |
391 | 190 |
#'labelPosition:' #topLeft |
191 |
) |
|
192 |
) |
|
193 |
) |
|
194 |
) |
|
195 |
! |
|
196 |
||
408 | 197 |
colorsEditSpec |
332 | 198 |
"this window spec was automatically generated by the ST/X UIPainter" |
199 |
||
200 |
"do not manually edit this - the painter/builder may not be able to |
|
201 |
handle the specification if its corrupted." |
|
202 |
||
203 |
" |
|
408 | 204 |
UIPainter new openOnClass:DataSetBuilder andSelector:#colorsEditSpec |
205 |
DataSetBuilder new openInterface:#colorsEditSpec |
|
332 | 206 |
" |
207 |
||
208 |
<resource: #canvas> |
|
209 |
||
210 |
^ |
|
211 |
||
212 |
#(#FullSpec |
|
213 |
#'window:' |
|
214 |
#(#WindowSpec |
|
370 | 215 |
#'name:' 'DataSet Misc' |
505 | 216 |
#'layout:' #(#LayoutFrame 197 0 172 0 565 0 471 0) |
370 | 217 |
#'label:' 'DataSet Misc' |
332 | 218 |
#'min:' #(#Point 10 10) |
219 |
#'max:' #(#Point 1280 1024) |
|
505 | 220 |
#'bounds:' #(#Rectangle 197 172 566 472) |
370 | 221 |
#'usePreferredExtent:' false |
332 | 222 |
) |
223 |
#'component:' |
|
224 |
#(#SpecCollection |
|
225 |
#'collection:' |
|
226 |
#( |
|
370 | 227 |
#(#FramedBoxSpec |
427 | 228 |
#'name:' 'ColorsBox' |
229 |
#'layout:' #(#LayoutFrame 0 0.0 3 0 0 1.0 88 0) |
|
230 |
#'component:' |
|
231 |
#(#SpecCollection |
|
232 |
#'collection:' |
|
233 |
#( |
|
505 | 234 |
#(#LabelSpec |
235 |
#'name:' 'label1' |
|
236 |
#'layout:' #(#AlignmentOrigin 107 0 27 0 1 0.5) |
|
237 |
#'label:' 'Foreground:' |
|
238 |
#'adjust:' #right |
|
239 |
#'resizeForLabel:' true |
|
240 |
) |
|
427 | 241 |
#(#ColorMenuSpec |
242 |
#'name:' 'colorMenu1' |
|
243 |
#'layout:' #(#LayoutFrame 110 0 15 0 12 1.0 37 0) |
|
244 |
#'activeHelpKey:' #foregroundColor |
|
245 |
#'model:' #labelForegroundColor |
|
246 |
#'labelsAreColored:' true |
|
247 |
) |
|
248 |
#(#LabelSpec |
|
249 |
#'name:' 'label2' |
|
250 |
#'layout:' #(#AlignmentOrigin 107 0 55 0 1 0.5) |
|
251 |
#'label:' 'Background:' |
|
252 |
#'adjust:' #right |
|
253 |
#'resizeForLabel:' true |
|
254 |
) |
|
255 |
#(#ColorMenuSpec |
|
256 |
#'name:' 'colorMenu2' |
|
257 |
#'layout:' #(#LayoutFrame 110 0 43 0 12 1.0 65 0) |
|
258 |
#'activeHelpKey:' #backgroundColor |
|
259 |
#'model:' #labelBackgroundColor |
|
260 |
) |
|
261 |
) |
|
262 |
) |
|
263 |
#'label:' 'Label Colors:' |
|
264 |
#'labelPosition:' #topLeft |
|
265 |
) |
|
266 |
#(#FramedBoxSpec |
|
380 | 267 |
#'name:' 'defaultColorsBox' |
408 | 268 |
#'layout:' #(#LayoutFrame 0 0.0 88 0 0 1.0 230 0) |
370 | 269 |
#'component:' |
270 |
#(#SpecCollection |
|
271 |
#'collection:' |
|
272 |
#( |
|
273 |
#(#LabelSpec |
|
274 |
#'name:' 'fgLabel' |
|
408 | 275 |
#'layout:' #(#AlignmentOrigin 107 0 27 0 1 0.5) |
276 |
#'label:' 'Foreground:' |
|
370 | 277 |
#'adjust:' #right |
278 |
#'resizeForLabel:' true |
|
279 |
) |
|
505 | 280 |
#(#ColorMenuSpec |
281 |
#'name:' 'fgMenu' |
|
282 |
#'layout:' #(#LayoutFrame 110 0 15 0 12 1.0 37 0) |
|
283 |
#'activeHelpKey:' #foregroundColor |
|
284 |
#'model:' #foregroundColor |
|
285 |
#'labelsAreColored:' true |
|
286 |
) |
|
370 | 287 |
#(#LabelSpec |
288 |
#'name:' 'bgLabel' |
|
408 | 289 |
#'layout:' #(#AlignmentOrigin 107 0 55 0 1 0.5) |
290 |
#'label:' 'Background:' |
|
370 | 291 |
#'adjust:' #right |
292 |
#'resizeForLabel:' true |
|
293 |
) |
|
294 |
#(#ColorMenuSpec |
|
295 |
#'name:' 'bgMenu' |
|
408 | 296 |
#'layout:' #(#LayoutFrame 110 0 43 0 12 1.0 65 0) |
370 | 297 |
#'activeHelpKey:' #backgroundColor |
298 |
#'model:' #backgroundColor |
|
299 |
) |
|
380 | 300 |
#(#LabelSpec |
301 |
#'name:' 'fgSelLabel' |
|
408 | 302 |
#'layout:' #(#AlignmentOrigin 107 0 89 0 1 0.5) |
303 |
#'label:' 'FG-Selector:' |
|
380 | 304 |
#'adjust:' #right |
305 |
#'resizeForLabel:' true |
|
306 |
) |
|
307 |
#(#InputFieldSpec |
|
470 | 308 |
#'name:' 'fgSelField' |
309 |
#'layout:' #(#LayoutFrame 110 0 78 0 15 1.0 100 0) |
|
310 |
#'activeHelpKey:' #foregroundSelector |
|
311 |
#'tabable:' true |
|
312 |
#'model:' #foregroundSelector |
|
313 |
#'type:' #symbolOrNil |
|
314 |
) |
|
505 | 315 |
#(#LabelSpec |
316 |
#'name:' 'bgSelLabel' |
|
317 |
#'layout:' #(#AlignmentOrigin 107 0 114 0 1 0.5) |
|
318 |
#'label:' 'BG-Selector:' |
|
319 |
#'adjust:' #right |
|
320 |
#'resizeForLabel:' true |
|
321 |
) |
|
470 | 322 |
#(#InputFieldSpec |
380 | 323 |
#'name:' 'bgSelField' |
408 | 324 |
#'layout:' #(#LayoutFrame 110 0 103 0 15 1.0 125 0) |
325 |
#'activeHelpKey:' #backgroundSelector |
|
470 | 326 |
#'tabable:' true |
380 | 327 |
#'model:' #backgroundSelector |
408 | 328 |
#'type:' #symbolOrNil |
329 |
) |
|
380 | 330 |
) |
331 |
) |
|
408 | 332 |
#'label:' 'Cell Colors:' |
377 | 333 |
#'labelPosition:' #topLeft |
334 |
) |
|
332 | 335 |
) |
336 |
) |
|
337 |
) |
|
338 |
! |
|
339 |
||
370 | 340 |
formatEditSpec |
332 | 341 |
"this window spec was automatically generated by the ST/X UIPainter" |
342 |
||
343 |
"do not manually edit this - the painter/builder may not be able to |
|
344 |
handle the specification if its corrupted." |
|
345 |
||
346 |
" |
|
370 | 347 |
UIPainter new openOnClass:DataSetBuilder andSelector:#formatEditSpec |
348 |
DataSetBuilder new openInterface:#formatEditSpec |
|
349 |
" |
|
350 |
||
351 |
<resource: #canvas> |
|
352 |
||
353 |
^ |
|
354 |
||
355 |
#(#FullSpec |
|
356 |
#'window:' |
|
357 |
#(#WindowSpec |
|
358 |
#'name:' 'DataSet Details' |
|
470 | 359 |
#'layout:' #(#LayoutFrame 319 0 352 0 706 0 643 0) |
370 | 360 |
#'label:' 'DataSet Details' |
361 |
#'min:' #(#Point 10 10) |
|
362 |
#'max:' #(#Point 1280 1024) |
|
470 | 363 |
#'bounds:' #(#Rectangle 319 352 707 644) |
377 | 364 |
#'usePreferredExtent:' false |
370 | 365 |
) |
366 |
#'component:' |
|
367 |
#(#SpecCollection |
|
368 |
#'collection:' |
|
369 |
#( |
|
408 | 370 |
#(#FramedBoxSpec |
371 |
#'name:' 'framedBox1' |
|
439 | 372 |
#'layout:' #(#LayoutFrame 0 0.0 3 0 0 1.0 114 0) |
408 | 373 |
#'component:' |
374 |
#(#SpecCollection |
|
375 |
#'collection:' |
|
376 |
#( |
|
377 |
#(#LabelSpec |
|
378 |
#'name:' 'typeLabel' |
|
427 | 379 |
#'layout:' #(#AlignmentOrigin 107 0 29 0 1 0.5) |
408 | 380 |
#'label:' 'Input Type:' |
381 |
#'resizeForLabel:' true |
|
382 |
) |
|
470 | 383 |
#(#ComboListSpec |
384 |
#'name:' 'typeCombo' |
|
385 |
#'layout:' #(#LayoutFrame 110 0 18 0 15 1.0 40 0) |
|
386 |
#'activeHelpKey:' #type |
|
387 |
#'tabable:' true |
|
388 |
#'model:' #type |
|
389 |
#'comboList:' |
|
390 |
#(#string |
|
391 |
#password #number |
|
392 |
#numberOrNil #symbolOrNil |
|
393 |
) |
|
394 |
#'useIndex:' false |
|
395 |
) |
|
408 | 396 |
#(#LabelSpec |
397 |
#'name:' 'sizeLabel' |
|
398 |
#'layout:' #(#AlignmentOrigin 107 0 55 0 1 0.5) |
|
399 |
#'label:' 'Max Size:' |
|
400 |
#'resizeForLabel:' true |
|
401 |
) |
|
402 |
#(#InputFieldSpec |
|
403 |
#'name:' 'sizeField' |
|
404 |
#'layout:' #(#LayoutFrame 110 0 44 0 15 1.0 66 0) |
|
405 |
#'activeHelpKey:' #size |
|
470 | 406 |
#'tabable:' true |
408 | 407 |
#'model:' #size |
408 |
#'type:' #numberOrNil |
|
409 |
) |
|
439 | 410 |
#(#LabelSpec |
411 |
#'name:' 'formatLabel' |
|
412 |
#'layout:' #(#AlignmentOrigin 107 0 80 0 1 0.5) |
|
413 |
#'label:' 'Text Format:' |
|
414 |
#'resizeForLabel:' true |
|
415 |
) |
|
470 | 416 |
#(#InputFieldSpec |
417 |
#'name:' 'formatField' |
|
418 |
#'layout:' #(#LayoutFrame 110 0 69 0 15 1.0 91 0) |
|
419 |
#'activeHelpKey:' #formatString |
|
420 |
#'tabable:' true |
|
421 |
#'model:' #formatString |
|
422 |
) |
|
408 | 423 |
) |
424 |
) |
|
425 |
#'label:' 'Input Format' |
|
426 |
#'labelPosition:' #topLeft |
|
370 | 427 |
) |
428 |
) |
|
429 |
) |
|
430 |
) |
|
431 |
! |
|
432 |
||
408 | 433 |
frameEditSpec |
391 | 434 |
"this window spec was automatically generated by the ST/X UIPainter" |
435 |
||
436 |
"do not manually edit this - the painter/builder may not be able to |
|
437 |
handle the specification if its corrupted." |
|
438 |
||
439 |
" |
|
408 | 440 |
UIPainter new openOnClass:DataSetBuilder andSelector:#frameEditSpec |
441 |
DataSetBuilder new openInterface:#frameEditSpec |
|
391 | 442 |
" |
443 |
||
444 |
<resource: #canvas> |
|
445 |
||
446 |
^ |
|
447 |
||
448 |
#(#FullSpec |
|
449 |
#'window:' |
|
450 |
#(#WindowSpec |
|
408 | 451 |
#'name:' 'DataSet Dimension' |
470 | 452 |
#'layout:' #(#LayoutFrame 381 0 370 0 671 0 583 0) |
408 | 453 |
#'label:' 'DataSet Dimension' |
391 | 454 |
#'min:' #(#Point 10 10) |
455 |
#'max:' #(#Point 1280 1024) |
|
470 | 456 |
#'bounds:' #(#Rectangle 381 370 672 584) |
391 | 457 |
#'usePreferredExtent:' false |
458 |
) |
|
459 |
#'component:' |
|
460 |
#(#SpecCollection |
|
461 |
#'collection:' |
|
462 |
#( |
|
463 |
#(#FramedBoxSpec |
|
408 | 464 |
#'name:' 'separatorBox' |
465 |
#'layout:' #(#LayoutFrame 0 0.0 3 0 0 1.0 86 0) |
|
391 | 466 |
#'component:' |
467 |
#(#SpecCollection |
|
468 |
#'collection:' |
|
469 |
#( |
|
408 | 470 |
#(#CheckBoxSpec |
471 |
#'name:' 'showRowSeparator' |
|
472 |
#'layout:' #(#LayoutFrame 18 0 19 0 194 0 42 0) |
|
473 |
#'activeHelpKey:' #showRowSeparator |
|
470 | 474 |
#'tabable:' true |
408 | 475 |
#'model:' #showRowSeparator |
476 |
#'label:' 'Show Row-Separator' |
|
477 |
) |
|
478 |
#(#CheckBoxSpec |
|
479 |
#'name:' 'showColSeparator' |
|
480 |
#'layout:' #(#LayoutFrame 18 0 45 0 194 0 68 0) |
|
481 |
#'activeHelpKey:' #showColumnSeparator |
|
470 | 482 |
#'tabable:' true |
408 | 483 |
#'model:' #showColSeparator |
484 |
#'label:' 'Show Column-Separator' |
|
485 |
) |
|
486 |
) |
|
487 |
) |
|
488 |
#'label:' 'Separators' |
|
489 |
#'labelPosition:' #topLeft |
|
490 |
) |
|
491 |
#(#FramedBoxSpec |
|
492 |
#'name:' 'framedBox1' |
|
493 |
#'layout:' #(#LayoutFrame 0 0.0 86 0 0 1.0 198 0) |
|
494 |
#'component:' |
|
495 |
#(#SpecCollection |
|
496 |
#'collection:' |
|
497 |
#( |
|
391 | 498 |
#(#LabelSpec |
470 | 499 |
#'name:' 'widthLabel' |
500 |
#'layout:' #(#AlignmentOrigin 107 0.0 28 0 1 0.5) |
|
501 |
#'label:' 'Column Width:' |
|
391 | 502 |
#'adjust:' #right |
503 |
#'resizeForLabel:' true |
|
504 |
) |
|
470 | 505 |
#(#InputFieldSpec |
506 |
#'name:' 'widthField' |
|
507 |
#'layout:' #(#LayoutFrame 110 0 17 0 15 1.0 39 0) |
|
508 |
#'activeHelpKey:' #width |
|
509 |
#'tabable:' true |
|
510 |
#'model:' #width |
|
511 |
#'type:' #numberOrNil |
|
512 |
) |
|
391 | 513 |
#(#LabelSpec |
408 | 514 |
#'name:' 'minWidthLabel' |
427 | 515 |
#'layout:' #(#AlignmentOrigin 107 0.0 53 0 1 0.5) |
408 | 516 |
#'label:' 'Min Width:' |
391 | 517 |
#'adjust:' #right |
518 |
#'resizeForLabel:' true |
|
519 |
) |
|
408 | 520 |
#(#InputFieldSpec |
521 |
#'name:' 'minWidthField' |
|
522 |
#'layout:' #(#LayoutFrame 110 0 42 0 15 1.0 64 0) |
|
523 |
#'activeHelpKey:' #minWidth |
|
470 | 524 |
#'tabable:' true |
408 | 525 |
#'model:' #minWidth |
526 |
#'type:' #numberOrNil |
|
527 |
) |
|
528 |
#(#LabelSpec |
|
470 | 529 |
#'name:' 'heightLabel' |
530 |
#'layout:' #(#AlignmentOrigin 107 0.0 84 0 1 0.5) |
|
531 |
#'label:' 'Row Height:' |
|
408 | 532 |
#'adjust:' #right |
533 |
#'resizeForLabel:' true |
|
534 |
) |
|
535 |
#(#InputFieldSpec |
|
470 | 536 |
#'name:' 'heightField' |
537 |
#'layout:' #(#LayoutFrame 110 0 73 0 15 1.0 95 0) |
|
538 |
#'activeHelpKey:' #height |
|
539 |
#'tabable:' true |
|
540 |
#'model:' #height |
|
408 | 541 |
#'type:' #numberOrNil |
391 | 542 |
) |
543 |
) |
|
544 |
) |
|
408 | 545 |
#'label:' 'Dimensions:' |
391 | 546 |
#'labelPosition:' #topLeft |
547 |
) |
|
548 |
) |
|
549 |
) |
|
550 |
) |
|
551 |
! |
|
552 |
||
408 | 553 |
selectionEditSpec |
370 | 554 |
"this window spec was automatically generated by the ST/X UIPainter" |
555 |
||
556 |
"do not manually edit this - the painter/builder may not be able to |
|
557 |
handle the specification if its corrupted." |
|
558 |
||
559 |
" |
|
408 | 560 |
UIPainter new openOnClass:DataSetBuilder andSelector:#selectionEditSpec |
561 |
DataSetBuilder new openInterface:#selectionEditSpec |
|
332 | 562 |
" |
563 |
||
564 |
<resource: #canvas> |
|
565 |
||
566 |
^ |
|
567 |
||
568 |
#(#FullSpec |
|
569 |
#'window:' |
|
570 |
#(#WindowSpec |
|
370 | 571 |
#'name:' 'DataSet Basic' |
470 | 572 |
#'layout:' #(#LayoutFrame 296 0 284 0 584 0 539 0) |
370 | 573 |
#'label:' 'DataSet Basic' |
332 | 574 |
#'min:' #(#Point 10 10) |
575 |
#'max:' #(#Point 1280 1024) |
|
470 | 576 |
#'bounds:' #(#Rectangle 296 284 585 540) |
408 | 577 |
#'usePreferredExtent:' false |
578 |
) |
|
579 |
#'component:' |
|
580 |
#(#SpecCollection |
|
581 |
#'collection:' |
|
582 |
#( |
|
583 |
#(#FramedBoxSpec |
|
584 |
#'name:' 'framedBox2' |
|
438 | 585 |
#'layout:' #(#LayoutFrame 0 0.0 3 0 0 1.0 85 0) |
408 | 586 |
#'component:' |
587 |
#(#SpecCollection |
|
588 |
#'collection:' |
|
589 |
#( |
|
590 |
#(#LabelSpec |
|
591 |
#'name:' 'ActionLabel' |
|
427 | 592 |
#'layout:' #(#AlignmentOrigin 107 0 28 0 1 0.5) |
408 | 593 |
#'label:' 'Selector:' |
594 |
#'adjust:' #left |
|
595 |
#'resizeForLabel:' true |
|
596 |
) |
|
597 |
#(#InputFieldSpec |
|
598 |
#'name:' 'ActionSelector' |
|
599 |
#'layout:' #(#LayoutFrame 110 0 17 0 15 1.0 39 0) |
|
470 | 600 |
#'tabable:' true |
408 | 601 |
#'model:' #labelActionSelector |
602 |
#'type:' #symbolOrNil |
|
603 |
) |
|
427 | 604 |
#(#LabelSpec |
605 |
#'name:' 'ArgumentLabel' |
|
606 |
#'layout:' #(#AlignmentOrigin 107 0 53 0 1 0.5) |
|
607 |
#'label:' 'Argument:' |
|
608 |
#'adjust:' #left |
|
609 |
#'resizeForLabel:' true |
|
610 |
) |
|
611 |
#(#InputFieldSpec |
|
612 |
#'name:' 'ArgumentValue' |
|
613 |
#'layout:' #(#LayoutFrame 110 0 42 0 15 1.0 64 0) |
|
470 | 614 |
#'tabable:' true |
427 | 615 |
#'model:' #labelActionArgument |
616 |
#'type:' #string |
|
617 |
) |
|
408 | 618 |
) |
619 |
) |
|
438 | 620 |
#'label:' 'Label Select Action:' |
408 | 621 |
#'labelPosition:' #topLeft |
622 |
) |
|
623 |
#(#FramedBoxSpec |
|
470 | 624 |
#'name:' 'framedBox1' |
625 |
#'layout:' #(#LayoutFrame 0 0.0 85 0 0 1.0 166 0) |
|
626 |
#'component:' |
|
627 |
#(#SpecCollection |
|
628 |
#'collection:' |
|
629 |
#( |
|
630 |
#(#CheckBoxSpec |
|
631 |
#'name:' 'canSelect' |
|
632 |
#'layout:' #(#Point 107 17) |
|
633 |
#'activeHelpKey:' #canSelect |
|
634 |
#'tabable:' true |
|
635 |
#'model:' #canSelect |
|
636 |
#'label:' 'Is Selectable' |
|
637 |
) |
|
638 |
#(#LabelSpec |
|
639 |
#'name:' 'selectorLabel' |
|
640 |
#'layout:' #(#AlignmentOrigin 107 0 53 0 1 0.5) |
|
641 |
#'label:' 'Selector:' |
|
642 |
#'adjust:' #right |
|
643 |
#'resizeForLabel:' true |
|
644 |
) |
|
645 |
#(#InputFieldSpec |
|
646 |
#'name:' 'selectSelector' |
|
647 |
#'layout:' #(#LayoutFrame 110 0 42 0 15 1.0 64 0) |
|
648 |
#'activeHelpKey:' #selectSelector |
|
649 |
#'tabable:' true |
|
650 |
#'model:' #selectSelector |
|
651 |
#'type:' #symbolOrNil |
|
652 |
) |
|
653 |
) |
|
654 |
) |
|
655 |
#'label:' 'Cell Selection:' |
|
656 |
#'labelPosition:' #topLeft |
|
657 |
) |
|
658 |
#(#FramedBoxSpec |
|
408 | 659 |
#'name:' 'framedBox3' |
660 |
#'layout:' #(#LayoutFrame 0 0.0 166 0 0 1.0 220 0) |
|
661 |
#'component:' |
|
662 |
#(#SpecCollection |
|
663 |
#'collection:' |
|
664 |
#( |
|
665 |
#(#LabelSpec |
|
666 |
#'name:' 'doubleLabel' |
|
427 | 667 |
#'layout:' #(#AlignmentOrigin 107 0 27 0 1 0.5) |
408 | 668 |
#'label:' 'Selector:' |
669 |
#'adjust:' #right |
|
670 |
#'resizeForLabel:' true |
|
671 |
) |
|
672 |
#(#InputFieldSpec |
|
673 |
#'name:' 'doubleClicked' |
|
674 |
#'layout:' #(#LayoutFrame 110 0 16 0 15 1.0 38 0) |
|
675 |
#'activeHelpKey:' #doubleClickedSelector |
|
470 | 676 |
#'tabable:' true |
408 | 677 |
#'model:' #doubleClickedSelector |
678 |
#'type:' #symbolOrNil |
|
679 |
) |
|
680 |
) |
|
681 |
) |
|
438 | 682 |
#'label:' 'Cell Double Click:' |
408 | 683 |
#'labelPosition:' #topLeft |
684 |
) |
|
685 |
) |
|
686 |
) |
|
687 |
) |
|
688 |
! |
|
689 |
||
690 |
valuesEditSpec |
|
691 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
692 |
||
693 |
"do not manually edit this - the painter/builder may not be able to |
|
694 |
handle the specification if its corrupted." |
|
695 |
||
696 |
" |
|
697 |
UIPainter new openOnClass:DataSetBuilder andSelector:#valuesEditSpec |
|
698 |
DataSetBuilder new openInterface:#valuesEditSpec |
|
699 |
" |
|
700 |
||
701 |
<resource: #canvas> |
|
702 |
||
703 |
^ |
|
704 |
||
705 |
#(#FullSpec |
|
706 |
#'window:' |
|
707 |
#(#WindowSpec |
|
708 |
#'name:' 'DataSet Basic' |
|
470 | 709 |
#'layout:' #(#LayoutFrame 364 0 378 0 659 0 683 0) |
408 | 710 |
#'label:' 'DataSet Basic' |
711 |
#'min:' #(#Point 10 10) |
|
712 |
#'max:' #(#Point 1280 1024) |
|
470 | 713 |
#'bounds:' #(#Rectangle 364 378 660 684) |
370 | 714 |
#'usePreferredExtent:' false |
332 | 715 |
) |
716 |
#'component:' |
|
717 |
#(#SpecCollection |
|
718 |
#'collection:' |
|
719 |
#( |
|
370 | 720 |
#(#FramedBoxSpec |
721 |
#'name:' 'valuesBox' |
|
408 | 722 |
#'layout:' #(#LayoutFrame 0 0.0 3 0 0 1.0 107 0) |
370 | 723 |
#'component:' |
724 |
#(#SpecCollection |
|
725 |
#'collection:' |
|
726 |
#( |
|
727 |
#(#LabelSpec |
|
728 |
#'name:' 'readLabel' |
|
427 | 729 |
#'layout:' #(#AlignmentOrigin 107 0 29 0 1 0.5) |
370 | 730 |
#'label:' 'Read:' |
731 |
#'adjust:' #right |
|
732 |
#'resizeForLabel:' true |
|
733 |
) |
|
734 |
#(#InputFieldSpec |
|
735 |
#'name:' 'readSelector' |
|
408 | 736 |
#'layout:' #(#LayoutFrame 110 0 18 0 15 1.0 40 0) |
370 | 737 |
#'activeHelpKey:' #readSelector |
470 | 738 |
#'tabable:' true |
370 | 739 |
#'model:' #readSelector |
740 |
#'type:' #symbolOrNil |
|
741 |
) |
|
470 | 742 |
#(#LabelSpec |
743 |
#'name:' 'writeLabel' |
|
744 |
#'layout:' #(#AlignmentOrigin 107 0 54 0 1 0.5) |
|
745 |
#'label:' 'Write:' |
|
746 |
#'adjust:' #right |
|
747 |
#'resizeForLabel:' true |
|
748 |
) |
|
379 | 749 |
#(#InputFieldSpec |
750 |
#'name:' 'writeSelector' |
|
408 | 751 |
#'layout:' #(#LayoutFrame 110 0 43 0 15 1.0 63 0) |
379 | 752 |
#'activeHelpKey:' #writeSelector |
470 | 753 |
#'tabable:' true |
379 | 754 |
#'model:' #writeSelector |
755 |
#'type:' #symbolOrNil |
|
756 |
) |
|
370 | 757 |
#(#LabelSpec |
758 |
#'name:' 'printLabel' |
|
427 | 759 |
#'layout:' #(#AlignmentOrigin 107 0 77 0 1 0.5) |
370 | 760 |
#'label:' 'Print:' |
761 |
#'adjust:' #right |
|
762 |
#'resizeForLabel:' true |
|
763 |
) |
|
764 |
#(#InputFieldSpec |
|
765 |
#'name:' 'printSelector' |
|
408 | 766 |
#'layout:' #(#LayoutFrame 110 0 66 0 15 1.0 86 0) |
370 | 767 |
#'activeHelpKey:' #printSelector |
470 | 768 |
#'tabable:' true |
370 | 769 |
#'model:' #printSelector |
770 |
#'type:' #symbolOrNil |
|
771 |
) |
|
772 |
) |
|
773 |
) |
|
408 | 774 |
#'label:' 'Value Selectors:' |
370 | 775 |
#'labelPosition:' #topLeft |
332 | 776 |
) |
370 | 777 |
#(#FramedBoxSpec |
778 |
#'name:' 'menusBox' |
|
408 | 779 |
#'layout:' #(#LayoutFrame 0 0.0 107 0 0 1.0 186 0) |
370 | 780 |
#'component:' |
781 |
#(#SpecCollection |
|
782 |
#'collection:' |
|
783 |
#( |
|
784 |
#(#LabelSpec |
|
785 |
#'name:' 'menuLabel' |
|
427 | 786 |
#'layout:' #(#AlignmentOrigin 107 0 29 0 1 0.5) |
370 | 787 |
#'label:' 'Menu:' |
788 |
#'adjust:' #right |
|
789 |
#'resizeForLabel:' true |
|
790 |
) |
|
791 |
#(#InputFieldSpec |
|
792 |
#'name:' 'menuSelector' |
|
408 | 793 |
#'layout:' #(#LayoutFrame 110 0 18 0 15 1.0 38 0) |
370 | 794 |
#'activeHelpKey:' #menuSelector |
470 | 795 |
#'tabable:' true |
370 | 796 |
#'model:' #menu |
797 |
#'type:' #symbolOrNil |
|
798 |
) |
|
799 |
#(#LabelSpec |
|
800 |
#'name:' 'choicesLabel' |
|
427 | 801 |
#'layout:' #(#AlignmentOrigin 107 0 52 0 1 0.5) |
408 | 802 |
#'label:' 'Choice:' |
370 | 803 |
#'adjust:' #right |
804 |
#'resizeForLabel:' true |
|
805 |
) |
|
806 |
#(#InputFieldSpec |
|
807 |
#'name:' 'choicesSelector' |
|
408 | 808 |
#'layout:' #(#LayoutFrame 110 0 41 0 15 1.0 61 0) |
370 | 809 |
#'activeHelpKey:' #choices |
470 | 810 |
#'tabable:' true |
370 | 811 |
#'model:' #choices |
812 |
#'type:' #symbolOrNil |
|
813 |
) |
|
814 |
) |
|
815 |
) |
|
408 | 816 |
#'label:' 'Menu Selectors:' |
391 | 817 |
#'labelPosition:' #topLeft |
818 |
) |
|
332 | 819 |
) |
820 |
) |
|
821 |
) |
|
822 |
! ! |
|
823 |
||
338 | 824 |
!DataSetBuilder class methodsFor:'help specs'! |
825 |
||
826 |
helpSpec |
|
827 |
"return a dictionary filled with helpKey -> helptext associations. |
|
828 |
These are used by the activeHelp tool." |
|
829 |
||
830 |
" |
|
831 |
UIHelpTool openOnClass:DataSetBuilder |
|
832 |
" |
|
833 |
||
834 |
^ super helpSpec addPairsFrom:#( |
|
835 |
||
370 | 836 |
#backgroundColor |
419 | 837 |
'Sets the background color of the column if the color-checkBox is turned on. Otherwise, the column uses its default background color (which is specified in the styleSheet).' |
338 | 838 |
|
380 | 839 |
#backgroundSelector |
419 | 840 |
'Selector which returns the background color for a cell (optional). If the selector is nil or returns nil, the default background color is set.' |
380 | 841 |
|
338 | 842 |
#canSelect |
419 | 843 |
'If true, each cell in the column can be selected. In case of having a menu, the menu can be opened by selecting the cell and pressing down the right or middle button of the mouse. if false, the whole line is selected. The menu opened derives from the DataSetView, which is specified in the window specification (Basics).' |
370 | 844 |
|
845 |
#choices |
|
419 | 846 |
'Selector to get the collection of choices for a column which is selectable and its editor is kind of a ComboBox or ComboList. If a cell in the column is selected, the visual editor is opened and in case of having choices, the choices are assigned to the widget.' |
847 |
||
848 |
#doubleClickedSelector |
|
849 |
'Selector evaluated without arguments on selected column.' |
|
370 | 850 |
|
851 |
#editorField |
|
419 | 852 |
'Type of visual editor (using default editors) or a selector, which will return an visual editor. If the cell is selected, a visual editor is opened in in the cell. In case of an unsupported selector (user defined editor), the row object is asked for the visual editor by performing the selector on the row. A widget instance must be returned which is opened in the cell.' |
391 | 853 |
|
370 | 854 |
#foregroundColor |
419 | 855 |
'Sets the foreground color of the column if the color-checkBox is turned on. Otherwise, the column uses its default foreground color (which is specified in the styleSheet).' |
338 | 856 |
|
380 | 857 |
#foregroundSelector |
419 | 858 |
'Selector which returns the foreground color for a cell (optional). If the selector is nil or returns nil, the default foreground color is set.' |
380 | 859 |
|
338 | 860 |
#formatString |
419 | 861 |
'Format string, which specifies the output format of a text in a cell. At the moment only numbers are supported (for example: 0.0000).' |
370 | 862 |
|
863 |
#height |
|
419 | 864 |
'Preferred height (optional).' |
370 | 865 |
|
866 |
#label |
|
419 | 867 |
'The label of the column. If ''label is image'' is off, this is the label string. Otherwise, it specifies the applications selector, which returns the label - either a string or a bitmap image.' |
370 | 868 |
|
869 |
#labelIsImage |
|
419 | 870 |
'If ''label is image'' is off (the default), the columns label is the string as entered in the label aspect. Otherwise, its the name of the message sent to the application - this should return a string or bitmap image, which is used as logo in the column.' |
370 | 871 |
|
872 |
#menuSelector |
|
419 | 873 |
'A selector to access the middleButton menu or nil. If a cell is selected. The menu will be opened by selecting the cell and pressing down the right or middle button of the mouse.' |
370 | 874 |
|
875 |
#minWidth |
|
419 | 876 |
'Makes sense if the width is set to 0 or nil. This is the minimum size required; no computation dependent on the contents. When resizing the view the column may grow or shrink to the minimum width.' |
370 | 877 |
|
878 |
#printSelector |
|
419 | 879 |
'A selector with one argument, the DataSetView. Used to access a drawable display object. In case of nil, the value derived from the readSelector is shown in the unselected cell.\ \ Using bitmaps, the DataSetView offers three important methods:\ \ #registerImage:anImage key:aSymbol\ register an image with an unique symbol. This symbol can be used by the row object to access the image, using #registeredImageAt:. The image will be associated to the device.\ \ #registeredImageAt:aSymbol\ returns an image assigned to the symbol or nil. The image returned is associated to the device.\ \ #releaseAllRegisteredImages\ relaese all registered images.' |
370 | 880 |
|
881 |
#readSelector |
|
419 | 882 |
'A selector, which is used to get or set (if the write selector is undefined) the value of a cell. The value returned by the method can be a string object or a bitmap. The set operation only is performed if the column is selectable.' |
370 | 883 |
|
884 |
#rendererType |
|
885 |
'This type specifies, how the text of an unselected cell should be shown. As Text, CheckToggle, ComboBox, ComboList or as a RowSelector.' |
|
886 |
||
377 | 887 |
#selectSelector |
419 | 888 |
'An optional selector, which is used to test whether the cell in the column is selectable; the ''Is Selectable'' flag must be enabled.' |
377 | 889 |
|
370 | 890 |
#showColumnSeparator |
419 | 891 |
'Shows or hide the column separator (right vertical separator).' |
370 | 892 |
|
893 |
#showRowSeparator |
|
419 | 894 |
'Shows or hide the row separator (bottom horizontal separator).' |
338 | 895 |
|
896 |
#size |
|
419 | 897 |
'Max size of an InputField, ComboBox or ComboList. 0 or nil means unlimited.' |
338 | 898 |
|
899 |
#type |
|
419 | 900 |
'A type converter symbol used by the input field.' |
338 | 901 |
|
902 |
#width |
|
419 | 903 |
'The width of a fixed column; in case of nil or 0 the column width will be computed dependent on the contents.' |
338 | 904 |
|
380 | 905 |
#writeSelector |
419 | 906 |
'A selector, which is used to set the value of a cell. If the selector is not defined, the selector derives from the printSelector.' |
380 | 907 |
|
338 | 908 |
) |
909 |
! ! |
|
910 |
||
332 | 911 |
!DataSetBuilder class methodsFor:'interface specs'! |
912 |
||
913 |
defineClassNameSpec |
|
914 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
915 |
||
916 |
"do not manually edit this - the painter/builder may not be able to |
|
917 |
handle the specification if its corrupted." |
|
918 |
||
919 |
" |
|
920 |
UIPainter new openOnClass:DataSetBuilder andSelector:#defineClassNameSpec |
|
921 |
DataSetBuilder new openInterface:#defineClassNameSpec |
|
922 |
" |
|
923 |
||
924 |
<resource: #canvas> |
|
925 |
||
926 |
^ |
|
927 |
||
928 |
#(#FullSpec |
|
929 |
#'window:' |
|
930 |
#(#WindowSpec |
|
524 | 931 |
#'name:' 'Data Set Builder' |
932 |
#'layout:' #(#LayoutFrame 413 0 353 0 738 0 482 0) |
|
933 |
#'label:' 'Data Set Builder' |
|
332 | 934 |
#'min:' #(#Point 10 10) |
935 |
#'max:' #(#Point 1152 900) |
|
524 | 936 |
#'bounds:' #(#Rectangle 413 353 739 483) |
408 | 937 |
#'usePreferredExtent:' false |
332 | 938 |
) |
939 |
#'component:' |
|
940 |
#(#SpecCollection |
|
941 |
#'collection:' |
|
942 |
#( |
|
943 |
#(#LabelSpec |
|
431
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
944 |
#'name:' 'topLabel' |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
945 |
#'layout:' #(#Point 2 10) |
524 | 946 |
#'label:' 'Classes for code:' |
431
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
947 |
#'adjust:' #left |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
948 |
#'resizeForLabel:' true |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
949 |
) |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
950 |
#(#LabelSpec |
332 | 951 |
#'name:' 'classLabel' |
952 |
#'layout:' #(#AlignmentOrigin 50 0.11 50 0 1 0.5) |
|
408 | 953 |
#'label:' 'Class:' |
332 | 954 |
#'adjust:' #right |
955 |
#'resizeForLabel:' true |
|
956 |
) |
|
431
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
957 |
#(#InputFieldSpec |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
958 |
#'name:' 'classNameInputField' |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
959 |
#'layout:' #(#LayoutFrame 51 0.11 39 0 -2 1.0 61 0) |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
960 |
#'tabable:' true |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
961 |
#'model:' #classNameChannel |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
962 |
) |
332 | 963 |
#(#LabelSpec |
964 |
#'name:' 'superClassLabel' |
|
965 |
#'layout:' #(#AlignmentOrigin 50 0.11 77 0 1 0.5) |
|
408 | 966 |
#'label:' 'Superclass:' |
332 | 967 |
#'adjust:' #right |
968 |
#'resizeForLabel:' true |
|
969 |
) |
|
970 |
#(#InputFieldSpec |
|
431
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
971 |
#'name:' 'superclassNameInputField' |
332 | 972 |
#'layout:' #(#LayoutFrame 51 0.11 67 0 -2 1.0 89 0) |
973 |
#'tabable:' true |
|
974 |
#'model:' #superclassNameChannel |
|
975 |
) |
|
431
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
976 |
#(#UISubSpecification |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
977 |
#'name:' 'SubSpecification' |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
978 |
#'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1.0) |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
979 |
#'majorKey:' #ToolApplicationModel |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
980 |
#'minorKey:' #windowSpecForCommitWithoutChannels |
23ff7c325946
commit buttons replaced by subSpec in ToolApplicationModel
tz
parents:
429
diff
changeset
|
981 |
) |
332 | 982 |
) |
983 |
) |
|
984 |
) |
|
985 |
! |
|
986 |
||
987 |
slices |
|
408 | 988 |
^#( |
989 |
(Basics basicsEditSpec) |
|
990 |
(Values valuesEditSpec) |
|
991 |
(Format formatEditSpec) |
|
992 |
(Selection selectionEditSpec) |
|
993 |
(Frame frameEditSpec) |
|
994 |
(Colors colorsEditSpec) |
|
995 |
) |
|
332 | 996 |
! |
997 |
||
998 |
windowSpec |
|
999 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
1000 |
||
1001 |
"do not manually edit this - the painter/builder may not be able to |
|
1002 |
handle the specification if its corrupted." |
|
1003 |
||
1004 |
" |
|
1005 |
UIPainter new openOnClass:DataSetBuilder andSelector:#windowSpec |
|
1006 |
DataSetBuilder new openInterface:#windowSpec |
|
1007 |
" |
|
1008 |
"DataSetBuilder open" |
|
1009 |
||
1010 |
<resource: #canvas> |
|
1011 |
||
1012 |
^ |
|
1013 |
||
1014 |
#(#FullSpec |
|
1015 |
#'window:' |
|
1016 |
#(#WindowSpec |
|
408 | 1017 |
#'name:' 'Data Set Builder' |
483 | 1018 |
#'layout:' #(#LayoutFrame 101 0 336 0 587 0 695 0) |
408 | 1019 |
#'label:' 'Data Set Builder' |
332 | 1020 |
#'min:' #(#Point 10 10) |
1021 |
#'max:' #(#Point 1152 900) |
|
483 | 1022 |
#'bounds:' #(#Rectangle 101 336 588 696) |
408 | 1023 |
#'menu:' #menu |
370 | 1024 |
#'usePreferredExtent:' false |
332 | 1025 |
) |
1026 |
#'component:' |
|
1027 |
#(#SpecCollection |
|
1028 |
#'collection:' |
|
1029 |
#( |
|
1030 |
#(#MenuPanelSpec |
|
408 | 1031 |
#'name:' 'menuToolbarView' |
419 | 1032 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 32 0) |
408 | 1033 |
#'menu:' #menuToolbar |
332 | 1034 |
) |
1035 |
#(#VariableHorizontalPanelSpec |
|
1036 |
#'name:' 'VariablePanel' |
|
419 | 1037 |
#'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -22 1.0) |
332 | 1038 |
#'component:' |
1039 |
#(#SpecCollection |
|
1040 |
#'collection:' |
|
1041 |
#( |
|
1042 |
#(#ViewSpec |
|
1043 |
#'name:' 'labelsView' |
|
1044 |
#'component:' |
|
1045 |
#(#SpecCollection |
|
1046 |
#'collection:' |
|
1047 |
#( |
|
1048 |
#(#SequenceViewSpec |
|
1049 |
#'name:' 'columnView' |
|
408 | 1050 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
332 | 1051 |
#'model:' #selectedColumnModel |
408 | 1052 |
#'menu:' #menuEdit |
370 | 1053 |
#'hasHorizontalScrollBar:' true |
332 | 1054 |
#'hasVerticalScrollBar:' true |
370 | 1055 |
#'miniScrollerHorizontal:' true |
332 | 1056 |
#'useIndex:' true |
1057 |
#'sequenceList:' #seqList |
|
1058 |
) |
|
1059 |
) |
|
1060 |
) |
|
1061 |
) |
|
1062 |
#(#ViewSpec |
|
1063 |
#'name:' 'specView' |
|
1064 |
#'component:' |
|
1065 |
#(#SpecCollection |
|
1066 |
#'collection:' |
|
1067 |
#( |
|
1068 |
#(#TabViewSpec |
|
1069 |
#'name:' 'tabView' |
|
1070 |
#'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 35 0) |
|
1071 |
#'model:' #tabModel |
|
1072 |
#'menu:' #tabList |
|
1073 |
#'useIndex:' true |
|
1074 |
) |
|
1075 |
#(#SubCanvasSpec |
|
1076 |
#'name:' 'specCanvas' |
|
1077 |
#'layout:' #(#LayoutFrame 0 0.0 35 0.0 0 1.0 -30 1.0) |
|
1078 |
#'specHolder:' #specChannel |
|
1079 |
) |
|
421 | 1080 |
#(#UISubSpecification |
1081 |
#'name:' 'SubSpecification' |
|
1082 |
#'layout:' #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) |
|
1083 |
#'majorKey:' #ToolApplicationModel |
|
1084 |
#'minorKey:' #windowSpecForCommit |
|
332 | 1085 |
) |
1086 |
) |
|
1087 |
) |
|
1088 |
#'borderWidth:' 1 |
|
1089 |
) |
|
1090 |
) |
|
1091 |
) |
|
391 | 1092 |
#'handles:' #(#Any 0.265905 1.0) |
332 | 1093 |
) |
483 | 1094 |
#(#UISubSpecification |
1095 |
#'name:' 'infoBarSubSpec' |
|
1096 |
#'layout:' #(#LayoutFrame 0 0.0 -22 1 0 1.0 0 1.0) |
|
1097 |
#'majorKey:' #ToolApplicationModel |
|
1098 |
#'minorKey:' #windowSpecForInfoBar |
|
408 | 1099 |
) |
332 | 1100 |
) |
1101 |
) |
|
1102 |
) |
|
1103 |
! ! |
|
1104 |
||
1105 |
!DataSetBuilder class methodsFor:'menu specs'! |
|
1106 |
||
408 | 1107 |
menu |
332 | 1108 |
"this window spec was automatically generated by the ST/X MenuEditor" |
1109 |
||
1110 |
"do not manually edit this - the builder may not be able to |
|
1111 |
handle the specification if its corrupted." |
|
1112 |
||
1113 |
" |
|
408 | 1114 |
MenuEditor new openOnClass:DataSetBuilder andSelector:#menu |
1115 |
(Menu new fromLiteralArrayEncoding:(DataSetBuilder menu)) startUp |
|
332 | 1116 |
" |
1117 |
||
1118 |
<resource: #menu> |
|
1119 |
||
1120 |
^ |
|
1121 |
||
1122 |
#(#Menu |
|
1123 |
||
1124 |
#( |
|
1125 |
#(#MenuItem |
|
408 | 1126 |
#'label:' 'About' |
438 | 1127 |
#'labelImage:' #(#ResourceRetriever nil #icon) |
408 | 1128 |
#'submenuChannel:' #menuAbout |
1129 |
) |
|
1130 |
#(#MenuItem |
|
1131 |
#'label:' 'File' |
|
332 | 1132 |
#'submenu:' |
1133 |
#(#Menu |
|
1134 |
||
1135 |
#( |
|
1136 |
#(#MenuItem |
|
408 | 1137 |
#'label:' 'Generate Code' |
1138 |
#'value:' #doGenerateCode |
|
1139 |
) |
|
1140 |
#(#MenuItem |
|
1141 |
#'label:' '-' |
|
1142 |
) |
|
1143 |
#(#MenuItem |
|
505 | 1144 |
#'label:' 'Define DataSet Class...' |
408 | 1145 |
#'value:' #doDefineClass |
1146 |
) |
|
1147 |
#(#MenuItem |
|
505 | 1148 |
#'label:' 'Browse DataSet Class' |
408 | 1149 |
#'value:' #doBrowseClass |
1150 |
) |
|
1151 |
#(#MenuItem |
|
1152 |
#'label:' '-' |
|
1153 |
) |
|
1154 |
#(#MenuItem |
|
1155 |
#'label:' 'Exit' |
|
332 | 1156 |
#'value:' #closeRequest |
1157 |
) |
|
1158 |
) nil |
|
1159 |
nil |
|
1160 |
) |
|
1161 |
) |
|
1162 |
#(#MenuItem |
|
408 | 1163 |
#'label:' 'Edit' |
1164 |
#'submenuChannel:' #menuEdit |
|
332 | 1165 |
) |
521 | 1166 |
#(#MenuItem |
1167 |
#'label:' 'Add' |
|
1168 |
#'submenu:' |
|
1169 |
#(#Menu |
|
1170 |
||
1171 |
#( |
|
1172 |
#(#MenuItem |
|
1173 |
#'label:' 'Column' |
|
1174 |
#'value:' #doCreateColumn |
|
1175 |
#'enabled:' #columnIsNotEditing |
|
1176 |
#'labelImage:' #(#ResourceRetriever nil #newColumnIcon 'Column') |
|
1177 |
) |
|
1178 |
) nil |
|
1179 |
nil |
|
1180 |
) |
|
1181 |
) |
|
1182 |
#(#MenuItem |
|
1183 |
#'label:' 'Help' |
|
1184 |
#'submenuChannel:' #menuHelp |
|
1185 |
) |
|
332 | 1186 |
) nil |
1187 |
nil |
|
1188 |
) |
|
1189 |
! |
|
1190 |
||
408 | 1191 |
menuEdit |
332 | 1192 |
"this window spec was automatically generated by the ST/X MenuEditor" |
1193 |
||
1194 |
"do not manually edit this - the builder may not be able to |
|
1195 |
handle the specification if its corrupted." |
|
1196 |
||
1197 |
" |
|
408 | 1198 |
MenuEditor new openOnClass:DataSetBuilder andSelector:#menuEdit |
1199 |
(Menu new fromLiteralArrayEncoding:(DataSetBuilder menuEdit)) startUp |
|
1200 |
" |
|
1201 |
||
1202 |
<resource: #menu> |
|
1203 |
||
1204 |
^ |
|
1205 |
||
1206 |
#(#Menu |
|
1207 |
||
1208 |
#( |
|
1209 |
#(#MenuItem |
|
1210 |
#'label:' 'Cut' |
|
1211 |
#'value:' #doCutColumn |
|
1212 |
#'enabled:' #isColumnSelected |
|
1213 |
) |
|
1214 |
#(#MenuItem |
|
1215 |
#'label:' 'Copy' |
|
1216 |
#'value:' #doCopyColumn |
|
1217 |
#'enabled:' #isColumnSelected |
|
1218 |
) |
|
1219 |
#(#MenuItem |
|
1220 |
#'label:' 'Paste' |
|
1221 |
#'value:' #doPasteColumn |
|
1222 |
#'enabled:' #valueOfHavingClipboard |
|
1223 |
) |
|
1224 |
#(#MenuItem |
|
1225 |
#'label:' '-' |
|
1226 |
) |
|
1227 |
#(#MenuItem |
|
521 | 1228 |
#'label:' 'Move Up' |
408 | 1229 |
#'value:' #'doMoveColumn:' |
1230 |
#'enabled:' #isColumnSelected |
|
1231 |
#'argument:' #up |
|
521 | 1232 |
#'labelImage:' #(#ResourceRetriever #DataSetBuilder #upIcon 'Move Up') |
408 | 1233 |
) |
1234 |
#(#MenuItem |
|
521 | 1235 |
#'label:' 'Move Down' |
408 | 1236 |
#'value:' #'doMoveColumn:' |
1237 |
#'enabled:' #isColumnSelected |
|
1238 |
#'argument:' #down |
|
521 | 1239 |
#'labelImage:' #(#ResourceRetriever #DataSetBuilder #downIcon 'Move Down') |
408 | 1240 |
) |
1241 |
) nil |
|
1242 |
nil |
|
1243 |
) |
|
1244 |
! |
|
1245 |
||
1246 |
menuToolbar |
|
1247 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
1248 |
||
1249 |
"do not manually edit this - the builder may not be able to |
|
1250 |
handle the specification if its corrupted." |
|
1251 |
||
1252 |
" |
|
1253 |
MenuEditor new openOnClass:DataSetBuilder andSelector:#menuToolbar |
|
1254 |
(Menu new fromLiteralArrayEncoding:(DataSetBuilder menuToolbar)) startUp |
|
332 | 1255 |
" |
1256 |
||
1257 |
<resource: #menu> |
|
1258 |
||
1259 |
^ |
|
1260 |
||
1261 |
#(#Menu |
|
1262 |
||
1263 |
#( |
|
1264 |
#(#MenuItem |
|
417 | 1265 |
#'label:' 'Create Column' |
408 | 1266 |
#'isButton:' true |
332 | 1267 |
#'value:' #doCreateColumn |
419 | 1268 |
#'enabled:' #columnIsNotEditing |
408 | 1269 |
#'labelImage:' #(#ResourceRetriever nil #newColumnIcon) |
332 | 1270 |
) |
1271 |
#(#MenuItem |
|
1272 |
#'label:' '' |
|
1273 |
) |
|
1274 |
#(#MenuItem |
|
417 | 1275 |
#'label:' 'Step Up' |
408 | 1276 |
#'isButton:' true |
332 | 1277 |
#'value:' #'doMoveColumn:' |
408 | 1278 |
#'enabled:' #isColumnSelected |
332 | 1279 |
#'argument:' #up |
408 | 1280 |
#'labelImage:' #(#ResourceRetriever nil #upIcon) |
332 | 1281 |
) |
1282 |
#(#MenuItem |
|
417 | 1283 |
#'label:' 'Step Down' |
408 | 1284 |
#'isButton:' true |
332 | 1285 |
#'value:' #'doMoveColumn:' |
408 | 1286 |
#'enabled:' #isColumnSelected |
332 | 1287 |
#'argument:' #down |
408 | 1288 |
#'labelImage:' #(#ResourceRetriever nil #downIcon) |
332 | 1289 |
) |
1290 |
) nil |
|
1291 |
nil |
|
1292 |
) |
|
1293 |
! ! |
|
1294 |
||
408 | 1295 |
!DataSetBuilder class methodsFor:'resources'! |
1296 |
||
1297 |
newColumnIcon |
|
489 | 1298 |
"Generated by the Image Editor" |
1299 |
" |
|
1300 |
ImageEditor openOnClass:self andSelector:#newColumnIcon |
|
1301 |
" |
|
408 | 1302 |
|
1303 |
<resource: #image> |
|
489 | 1304 |
|
1305 |
^Icon |
|
1306 |
constantNamed:#'DataSetBuilder newColumnIcon' |
|
1307 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UT@@@@UPUTUUUXUPUTZ**,UPUTZB",UPUTX*H,UYUTX*H,UPUTZB",UPQTZ**,UPUTX*H,UPUTX*H,UPUTX*H,UPUTXB@,UPUTZ**,UPUTZ**,UPUTX"H,UYUTXB@,UPUTX"@,UPUTX"H,UPUTZ**,UPUTZ**,UPUT/??<UPUT@@@@UP'); colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:66.9978)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'A??@A??@A??@A??@A??@A??@A??@A??@A??CA??@A??@A??@A??@A??CA??AA??@A??CA??@A??CA??@A??@A??A'); yourself); yourself]! ! |
|
408 | 1308 |
|
332 | 1309 |
!DataSetBuilder methodsFor:'accessing'! |
1310 |
||
1311 |
columns |
|
419 | 1312 |
"returns list of columns" |
1313 |
||
1314 |
^columns |
|
332 | 1315 |
! |
1316 |
||
1317 |
columns:aListOfColumns fromView:aColumnView |
|
419 | 1318 |
"setup columns from a column view" |
1319 |
||
332 | 1320 |
|list| |
1321 |
||
1322 |
columnView := aColumnView. |
|
1323 |
columns := OrderedCollection new. |
|
1324 |
list := self seqList. |
|
1325 |
hasChanged := false. |
|
1326 |
||
1327 |
list removeAll. |
|
1328 |
||
419 | 1329 |
aListOfColumns size ~~ 0 |
1330 |
ifTrue: |
|
1331 |
[ |
|
1332 |
aListOfColumns do: |
|
1333 |
[:aColumn| |
|
1334 |
columns add: aColumn copy. |
|
1335 |
aColumn rendererType == #rowSelector |
|
1336 |
ifFalse:[list add: aColumn label] |
|
1337 |
ifTrue: [list add:'Row Selector'] |
|
332 | 1338 |
] |
419 | 1339 |
] |
333 | 1340 |
! |
1341 |
||
1342 |
rowClassName |
|
419 | 1343 |
|
1344 |
^(Smalltalk resolveName:className inClass:self class) notNil ifTrue:[className] ifFalse:[nil] |
|
333 | 1345 |
! |
1346 |
||
1347 |
rowClassName:aClassName |
|
419 | 1348 |
|
333 | 1349 |
|cls| |
1350 |
||
1351 |
superclassName := nil. |
|
1352 |
||
419 | 1353 |
(className := aClassName) notNil |
1354 |
ifTrue: |
|
1355 |
[ |
|
1356 |
(cls := self resolveClassNamed) notNil |
|
1357 |
ifTrue: [superclassName := cls superclass name asString] |
|
1358 |
ifFalse:[superclassName := 'Object'] |
|
333 | 1359 |
] |
1360 |
||
332 | 1361 |
! ! |
1362 |
||
419 | 1363 |
!DataSetBuilder methodsFor:'aspects'! |
332 | 1364 |
|
419 | 1365 |
aspectFor:aKey |
1366 |
"returns aspect for a key or nil" |
|
332 | 1367 |
|
419 | 1368 |
^aspects at:aKey ifAbsent:[super aspectFor:aKey] |
332 | 1369 |
|
1370 |
||
1371 |
! |
|
1372 |
||
419 | 1373 |
columnIsNotEditing |
1374 |
"returns a boolean value holder which is set to true if column is not editing" |
|
332 | 1375 |
|
419 | 1376 |
^builder valueAspectFor:#columnIsNotEditing initialValue: true |
332 | 1377 |
|
1378 |
||
1379 |
||
1380 |
! |
|
1381 |
||
419 | 1382 |
editorTypeList |
1383 |
"generate list of supported editor types" |
|
332 | 1384 |
|
1385 |
|list| |
|
1386 |
||
419 | 1387 |
(list := builder bindingAt:#editorTypeList) isNil |
1388 |
ifTrue: |
|
1389 |
[ |
|
332 | 1390 |
list := OrderedCollection new. |
419 | 1391 |
DataSetColumnSpec slices do: |
1392 |
[:aSlice||type| |
|
332 | 1393 |
type := aSlice at:1. |
419 | 1394 |
(list includes:type) ifFalse:[list add:type] |
332 | 1395 |
]. |
419 | 1396 |
builder aspectAt:#editorTypeList put:list |
332 | 1397 |
]. |
419 | 1398 |
^list |
332 | 1399 |
! |
1400 |
||
408 | 1401 |
isColumnSelected |
332 | 1402 |
"returns a boolean value holder which is set to true if something is modified |
419 | 1403 |
and not accepted" |
1404 |
||
1405 |
^builder valueAspectFor:#isColumnSelected initialValue: false |
|
332 | 1406 |
|
1407 |
||
1408 |
||
1409 |
! |
|
1410 |
||
429 | 1411 |
modifiedChannel |
1412 |
"returns a boolean value holder which is set to true if something is modified |
|
1413 |
and not accepted" |
|
1414 |
||
1415 |
^builder booleanValueAspectFor:#modifiedChannel |
|
1416 |
||
1417 |
||
1418 |
||
1419 |
! |
|
1420 |
||
332 | 1421 |
rendererTypeList |
419 | 1422 |
"generate list of supported renderer types" |
1423 |
||
332 | 1424 |
|list| |
1425 |
||
419 | 1426 |
(list := builder bindingAt:#rendererTypeList) isNil |
1427 |
ifTrue: |
|
1428 |
[ |
|
332 | 1429 |
list := OrderedCollection new. |
419 | 1430 |
DataSetColumnSpec slices do: |
1431 |
[:aSlice||type| |
|
332 | 1432 |
type := aSlice at:2. |
419 | 1433 |
(list includes:type) ifFalse:[list add:type] |
332 | 1434 |
]. |
419 | 1435 |
builder aspectAt:#rendererTypeList put:list |
332 | 1436 |
]. |
419 | 1437 |
^list |
332 | 1438 |
! |
1439 |
||
1440 |
selectedColumnModel |
|
419 | 1441 |
"returns a value holder which keeps selected column" |
332 | 1442 |
|
1443 |
|holder| |
|
1444 |
||
1445 |
(holder := builder bindingAt:#selectedColumnModel) isNil ifTrue:[ |
|
1446 |
holder := AspectAdaptor new subject:self; forAspect:#selectedColumnIndex. |
|
1447 |
builder aspectAt:#selectedColumnModel put:holder. |
|
1448 |
]. |
|
1449 |
^ holder |
|
1450 |
! |
|
1451 |
||
1452 |
seqList |
|
1453 |
||
1454 |
|list| |
|
1455 |
||
1456 |
(list := builder bindingAt:#seqList) isNil ifTrue:[ |
|
1457 |
builder aspectAt:#seqList put:(list := List new). |
|
1458 |
]. |
|
1459 |
^ list |
|
1460 |
! |
|
1461 |
||
1462 |
specChannel |
|
1463 |
||
1464 |
|holder| |
|
1465 |
||
1466 |
(holder := builder bindingAt:#specChannel) isNil ifTrue:[ |
|
1467 |
builder aspectAt:#specChannel put:(holder := ValueHolder new). |
|
b895330fc7aa
intitial checkin
ca |