author | tz |
Wed, 13 May 1998 22:24:26 +0200 | |
changeset 825 | 89719cf96c63 |
parent 818 | 5bd68980f09a |
child 826 | 6c879f404dfe |
permissions | -rw-r--r-- |
332 | 1 |
" |
825 | 2 |
COPYRIGHT (c) 1997 by eXept Software AG |
332 | 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 |
||
818 | 17 |
ResourceSpecEditor subclass:#DataSetBuilder |
825 | 18 |
instanceVariableNames:'rowClass rowSuperClass columnView columns selectedColumnIndex |
19 |
modalOpened' |
|
816 | 20 |
classVariableNames:'' |
332 | 21 |
poolDictionaries:'' |
22 |
category:'Interface-UIPainter' |
|
23 |
! |
|
24 |
||
25 |
!DataSetBuilder class methodsFor:'documentation'! |
|
26 |
||
27 |
copyright |
|
28 |
" |
|
825 | 29 |
COPYRIGHT (c) 1997 by eXept Software AG |
332 | 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:] |
|
545 | 56 |
Claus Atzkern, eXept Software AG |
332 | 57 |
" |
58 |
||
59 |
! ! |
|
60 |
||
825 | 61 |
!DataSetBuilder class methodsFor:'accessing'! |
799
22734b99f830
added dummy openOnClass:andSelector: (invoked by Browser)
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
62 |
|
818 | 63 |
resourceType |
64 |
"get the type of resource of the method generated by the MenuEditor" |
|
65 |
||
825 | 66 |
^#tableColumns |
67 |
||
68 |
||
69 |
! ! |
|
70 |
||
71 |
!DataSetBuilder class methodsFor:'aspects'! |
|
72 |
||
73 |
aspects |
|
74 |
"get the aspects for the attributes of the table columns" |
|
75 |
||
76 |
^#( |
|
77 |
label |
|
78 |
canSelect |
|
79 |
choices |
|
80 |
editorType |
|
81 |
formatString |
|
82 |
labelIsImage |
|
83 |
size |
|
84 |
type |
|
85 |
width |
|
86 |
minWidth |
|
87 |
height |
|
88 |
menu |
|
89 |
foregroundSelector |
|
90 |
backgroundSelector |
|
91 |
doubleClickedSelector |
|
92 |
selectSelector |
|
93 |
printSelector |
|
94 |
readSelector |
|
95 |
writeSelector |
|
96 |
rendererType |
|
97 |
showColSeparator |
|
98 |
showRowSeparator |
|
99 |
backgroundColor |
|
100 |
foregroundColor |
|
101 |
labelForegroundColor |
|
102 |
labelBackgroundColor |
|
103 |
labelFont |
|
104 |
labelActionSelector |
|
105 |
labelActionArgument |
|
106 |
labelAlignment |
|
107 |
columnAlignment |
|
108 |
) |
|
109 |
||
818 | 110 |
|
111 |
||
799
22734b99f830
added dummy openOnClass:andSelector: (invoked by Browser)
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
112 |
! ! |
22734b99f830
added dummy openOnClass:andSelector: (invoked by Browser)
Claus Gittinger <cg@exept.de>
parents:
687
diff
changeset
|
113 |
|
528 | 114 |
!DataSetBuilder class methodsFor:'help specs'! |
115 |
||
116 |
helpSpec |
|
818 | 117 |
"This resource specification was automatically generated |
118 |
by the UIHelpTool of ST/X." |
|
119 |
||
120 |
"Do not manually edit this!! If it is corrupted, |
|
121 |
the UIHelpTool may not be able to read the specification." |
|
528 | 122 |
|
123 |
" |
|
818 | 124 |
UIHelpTool openOnClass:DataSetBuilder |
528 | 125 |
" |
126 |
||
818 | 127 |
<resource: #help> |
128 |
||
129 |
^super helpSpec addPairsFrom:#( |
|
528 | 130 |
|
550 | 131 |
#addColumn |
132 |
'Adds a new column.' |
|
133 |
||
597 | 134 |
#basicsEditor |
135 |
'Default widget type or a selector returning an instance of an user defined widget opened in the cell.' |
|
528 | 136 |
|
597 | 137 |
#basicsFont |
138 |
'Sets the font of the label text.' |
|
528 | 139 |
|
597 | 140 |
#basicsJustification |
141 |
'Aligns the label text to the left, right, or centered in the cell.' |
|
528 | 142 |
|
597 | 143 |
#basicsLabel |
144 |
'The label of the column or a selector returning a string an image.' |
|
145 |
||
146 |
#basicsLabelIsImage |
|
147 |
'Turns on/off image behavior of the label string; i.e. it is used as selector returning an image.' |
|
528 | 148 |
|
597 | 149 |
#basicsRenderer |
150 |
'Specifies displaying cell as Text, CheckToggle, ComboBox, ComboList or as a RowSelector.' |
|
528 | 151 |
|
597 | 152 |
#colorsBackgroundCellColor |
153 |
'Sets the background color of the column.' |
|
154 |
||
155 |
#colorsBackgroundLabelColor |
|
156 |
'Sets the background color of the label.' |
|
528 | 157 |
|
597 | 158 |
#colorsBackgroundSelector |
159 |
'Selector returning the background color for a cell (optional).' |
|
528 | 160 |
|
597 | 161 |
#colorsForegroundCellColor |
162 |
'Sets the foreground color of the column.' |
|
163 |
||
164 |
#colorsForegroundLabelColor |
|
165 |
'Sets the foreground color of the label.' |
|
528 | 166 |
|
597 | 167 |
#colorsForegroundSelector |
168 |
'Selector returning the foreground color for a cell (optional).' |
|
528 | 169 |
|
597 | 170 |
#formatInputType |
171 |
'A type converter symbol used by the input field.' |
|
528 | 172 |
|
597 | 173 |
#formatMaxSize |
174 |
'Maximum size of the string which can be typed in. 0 or nil means unlimited.' |
|
528 | 175 |
|
597 | 176 |
#formatTextFormat |
177 |
'Format string specifying the output format of the cell text. In this release, only numbers are supported (for example: 0.0000).' |
|
178 |
||
179 |
#frameColumnWidth |
|
180 |
'Width (fixed) of a column (optional).' |
|
528 | 181 |
|
597 | 182 |
#frameMinWidth |
183 |
'Minimum width of the column (optional).' |
|
528 | 184 |
|
597 | 185 |
#frameRowHeight |
186 |
'Height of the row (optional).' |
|
187 |
||
188 |
#frameShowColumnSeparator |
|
189 |
'Turns on/off displaying column separators.' |
|
528 | 190 |
|
597 | 191 |
#frameShowRowSeparator |
192 |
'Turns on/off displaying row separators.' |
|
528 | 193 |
|
597 | 194 |
#selectionCellClickSelector |
818 | 195 |
'A selector called if cell was selected.' |
528 | 196 |
|
597 | 197 |
#selectionCellDoubleClickSelector |
198 |
'A selector called if cell was double clicked.' |
|
528 | 199 |
|
597 | 200 |
#selectionCellSelector |
528 | 201 |
'An optional selector, which is used to test whether the cell in the column is selectable; the ''Is Selectable'' flag must be enabled.' |
202 |
||
597 | 203 |
#selectionIsSelectable |
204 |
'Turns on/off selection behavior of a column.' |
|
205 |
||
206 |
#selectionLabelClickSelector |
|
207 |
'A selector called if label cell was clicked.' |
|
528 | 208 |
|
597 | 209 |
#selectionLabelSelectorArgument |
818 | 210 |
'An argument passed to label selection selector.' |
528 | 211 |
|
597 | 212 |
#valuesChoiceSelector |
213 |
'A selector returning a collection of choices for a cell having a ComboBox or a ComboList widget.' |
|
528 | 214 |
|
597 | 215 |
#valuesMenuSelector |
216 |
'A selector returning a middle button menu.' |
|
217 |
||
218 |
#valuesPrintSelector |
|
219 |
'A key selector used to register images on a DSVColumnView (the arg). For more detailed info see #register... methods in DSVColumnView.' |
|
528 | 220 |
|
597 | 221 |
#valuesReadSelector |
222 |
'A selector used to get (string or a bitmap) or set (if the write selector is undefined) the contents of a cell.' |
|
528 | 223 |
|
597 | 224 |
#valuesWriteSelector |
225 |
'A selector used to set the value of a cell.' |
|
528 | 226 |
|
227 |
) |
|
228 |
! ! |
|
229 |
||
230 |
!DataSetBuilder class methodsFor:'interface specs'! |
|
332 | 231 |
|
232 |
basicsEditSpec |
|
817 | 233 |
"This resource specification was automatically generated |
234 |
by the UIPainter of ST/X." |
|
332 | 235 |
|
817 | 236 |
"Do not manually edit this!! If it is corrupted, |
237 |
the UIPainter may not be able to read the specification." |
|
332 | 238 |
|
239 |
" |
|
240 |
UIPainter new openOnClass:DataSetBuilder andSelector:#basicsEditSpec |
|
241 |
DataSetBuilder new openInterface:#basicsEditSpec |
|
242 |
" |
|
243 |
||
244 |
<resource: #canvas> |
|
245 |
||
246 |
^ |
|
247 |
||
248 |
#(#FullSpec |
|
687 | 249 |
#window: |
332 | 250 |
#(#WindowSpec |
687 | 251 |
#name: 'DataSet Basic' |
817 | 252 |
#layout: #(#LayoutFrame 8 0 124 0 296 0 379 0) |
687 | 253 |
#label: 'DataSet Basic' |
254 |
#min: #(#Point 10 10) |
|
255 |
#max: #(#Point 1280 1024) |
|
817 | 256 |
#bounds: #(#Rectangle 8 124 297 380) |
687 | 257 |
#usePreferredExtent: false |
332 | 258 |
) |
687 | 259 |
#component: |
332 | 260 |
#(#SpecCollection |
687 | 261 |
#collection: |
332 | 262 |
#( |
408 | 263 |
#(#FramedBoxSpec |
687 | 264 |
#name: 'framedBox1' |
265 |
#layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 145 0) |
|
266 |
#component: |
|
408 | 267 |
#(#SpecCollection |
687 | 268 |
#collection: |
408 | 269 |
#( |
270 |
#(#LabelSpec |
|
687 | 271 |
#name: 'label1' |
272 |
#layout: #(#AlignmentOrigin 107 0 32 0 1 0.5) |
|
273 |
#label: 'Label:' |
|
274 |
#resizeForLabel: true |
|
408 | 275 |
) |
276 |
#(#InputFieldSpec |
|
687 | 277 |
#name: 'labelField' |
278 |
#layout: #(#LayoutFrame 110 0 21 0 15 1.0 43 0) |
|
279 |
#activeHelpKey: #basicsLabel |
|
280 |
#tabable: true |
|
281 |
#model: #label |
|
408 | 282 |
) |
283 |
#(#CheckBoxSpec |
|
687 | 284 |
#name: 'labelIsImage' |
285 |
#layout: #(#LayoutOrigin 107 0 103 0) |
|
286 |
#activeHelpKey: #basicsLabelIsImage |
|
287 |
#tabable: true |
|
288 |
#model: #labelIsImage |
|
289 |
#label: 'Label Is Image' |
|
408 | 290 |
) |
817 | 291 |
#(#LabelSpec |
292 |
#name: 'LabelFont' |
|
293 |
#layout: #(#AlignmentOrigin 107 0 61 0 1 0.5) |
|
294 |
#label: 'Font::' |
|
295 |
#adjust: #left |
|
296 |
#resizeForLabel: true |
|
297 |
) |
|
298 |
#(#FontMenuSpec |
|
299 |
#name: 'fontMenu' |
|
300 |
#layout: #(#LayoutFrame 110 0 49 0 13 1.0 71 0) |
|
301 |
#activeHelpKey: #labelFont |
|
302 |
#model: #style |
|
439 | 303 |
) |
442 | 304 |
#(#PopUpListSpec |
687 | 305 |
#name: 'Alignment' |
306 |
#layout: #(#LayoutFrame 110 0 78 0 15 1.0 100 0) |
|
307 |
#activeHelpKey: #basicsJustification |
|
308 |
#label: 'Alignment' |
|
309 |
#model: #labelAlignment |
|
310 |
#menu: |
|
442 | 311 |
#(#left |
312 |
#right #center |
|
313 |
) |
|
687 | 314 |
#useIndex: false |
442 | 315 |
) |
316 |
#(#LabelSpec |
|
687 | 317 |
#name: 'JustificationLabel' |
318 |
#layout: #(#AlignmentOrigin 107 0 89 0 1 0.5) |
|
319 |
#label: 'Justification:' |
|
320 |
#adjust: #left |
|
321 |
#resizeForLabel: true |
|
442 | 322 |
) |
408 | 323 |
) |
324 |
) |
|
687 | 325 |
#label: 'Header:' |
326 |
#labelPosition: #topLeft |
|
332 | 327 |
) |
328 |
#(#FramedBoxSpec |
|
687 | 329 |
#name: 'typesFrame' |
817 | 330 |
#layout: #(#LayoutFrame 0 0.0 145 0 0 1.0 253 0) |
687 | 331 |
#component: |
332 | 332 |
#(#SpecCollection |
687 | 333 |
#collection: |
332 | 334 |
#( |
335 |
#(#LabelSpec |
|
687 | 336 |
#name: 'rendererLabel' |
337 |
#layout: #(#AlignmentOrigin 107 0 29 0 1 0.5) |
|
338 |
#label: 'Renderer:' |
|
339 |
#resizeForLabel: true |
|
332 | 340 |
) |
341 |
#(#ComboListSpec |
|
687 | 342 |
#name: 'rendererField' |
343 |
#layout: #(#LayoutFrame 110 0 18 0 15 1.0 40 0) |
|
344 |
#activeHelpKey: #basicsRenderer |
|
345 |
#tabable: true |
|
346 |
#model: #rendererType |
|
347 |
#comboList: #rendererTypeList |
|
348 |
#useIndex: false |
|
332 | 349 |
) |
350 |
#(#LabelSpec |
|
687 | 351 |
#name: 'editorLabel' |
352 |
#layout: #(#AlignmentOrigin 107 0 55 0 1 0.5) |
|
353 |
#label: 'Editor:' |
|
354 |
#resizeForLabel: true |
|
332 | 355 |
) |
356 |
#(#ComboBoxSpec |
|
687 | 357 |
#name: 'editorField' |
358 |
#layout: #(#LayoutFrame 110 0 44 0 15 1.0 66 0) |
|
359 |
#activeHelpKey: #basicsEditor |
|
360 |
#tabable: true |
|
361 |
#model: #editorType |
|
362 |
#type: #symbolOrNil |
|
363 |
#comboList: #editorTypeList |
|
364 |
#useIndex: false |
|
332 | 365 |
) |
817 | 366 |
#(#LabelSpec |
367 |
#name: 'JustificationC' |
|
368 |
#layout: #(#AlignmentOrigin 107 0 82 0 1 0.5) |
|
369 |
#label: 'Justification:' |
|
370 |
#adjust: #left |
|
371 |
#resizeForLabel: true |
|
372 |
) |
|
373 |
#(#PopUpListSpec |
|
374 |
#name: 'AlignmentC' |
|
375 |
#layout: #(#LayoutFrame 110 0 71 0 15 1.0 93 0) |
|
376 |
#activeHelpKey: #basicsJustification |
|
377 |
#label: 'Alignment' |
|
378 |
#model: #columnAlignment |
|
379 |
#menu: |
|
380 |
#(#left |
|
381 |
#right #center |
|
382 |
) |
|
383 |
#useIndex: false |
|
384 |
) |
|
332 | 385 |
) |
386 |
) |
|
687 | 387 |
#label: 'Cell Type:' |
388 |
#labelPosition: #topLeft |
|
391 | 389 |
) |
390 |
) |
|
391 |
) |
|
392 |
) |
|
393 |
! |
|
394 |
||
408 | 395 |
colorsEditSpec |
825 | 396 |
"This resource specification was automatically generated |
397 |
by the UIPainter of ST/X." |
|
332 | 398 |
|
825 | 399 |
"Do not manually edit this!! If it is corrupted, |
400 |
the UIPainter may not be able to read the specification." |
|
332 | 401 |
|
402 |
" |
|
408 | 403 |
UIPainter new openOnClass:DataSetBuilder andSelector:#colorsEditSpec |
404 |
DataSetBuilder new openInterface:#colorsEditSpec |
|
332 | 405 |
" |
406 |
||
407 |
<resource: #canvas> |
|
408 |
||
409 |
^ |
|
410 |
||
411 |
#(#FullSpec |
|
687 | 412 |
#window: |
332 | 413 |
#(#WindowSpec |
687 | 414 |
#name: 'DataSet Misc' |
825 | 415 |
#layout: #(#LayoutFrame 518 0 351 0 886 0 650 0) |
687 | 416 |
#label: 'DataSet Misc' |
417 |
#min: #(#Point 10 10) |
|
418 |
#max: #(#Point 1280 1024) |
|
825 | 419 |
#bounds: #(#Rectangle 518 351 887 651) |
687 | 420 |
#usePreferredExtent: false |
332 | 421 |
) |
687 | 422 |
#component: |
332 | 423 |
#(#SpecCollection |
687 | 424 |
#collection: |
332 | 425 |
#( |
370 | 426 |
#(#FramedBoxSpec |
687 | 427 |
#name: 'ColorsBox' |
428 |
#layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 88 0) |
|
429 |
#component: |
|
427 | 430 |
#(#SpecCollection |
687 | 431 |
#collection: |
427 | 432 |
#( |
505 | 433 |
#(#LabelSpec |
687 | 434 |
#name: 'label1' |
435 |
#layout: #(#AlignmentOrigin 107 0 27 0 1 0.5) |
|
436 |
#label: 'Foreground:' |
|
437 |
#adjust: #right |
|
438 |
#resizeForLabel: true |
|
505 | 439 |
) |
427 | 440 |
#(#ColorMenuSpec |
687 | 441 |
#name: 'colorMenu1' |
442 |
#layout: #(#LayoutFrame 110 0 15 0 12 1.0 37 0) |
|
443 |
#activeHelpKey: #colorsForegroundLabelColor |
|
444 |
#model: #labelForegroundColor |
|
445 |
#labelsAreColored: true |
|
427 | 446 |
) |
447 |
#(#LabelSpec |
|
687 | 448 |
#name: 'label2' |
449 |
#layout: #(#AlignmentOrigin 107 0 55 0 1 0.5) |
|
450 |
#label: 'Background:' |
|
451 |
#adjust: #right |
|
452 |
#resizeForLabel: true |
|
427 | 453 |
) |
454 |
#(#ColorMenuSpec |
|
687 | 455 |
#name: 'colorMenu2' |
456 |
#layout: #(#LayoutFrame 110 0 43 0 12 1.0 65 0) |
|
457 |
#activeHelpKey: #colorsBackgroundLabelColor |
|
458 |
#model: #labelBackgroundColor |
|
459 |
#labelsAreColored: false |
|
427 | 460 |
) |
461 |
) |
|
462 |
) |
|
687 | 463 |
#label: 'Label Colors:' |
464 |
#labelPosition: #topLeft |
|
427 | 465 |
) |
466 |
#(#FramedBoxSpec |
|
687 | 467 |
#name: 'defaultColorsBox' |
468 |
#layout: #(#LayoutFrame 0 0.0 88 0 0 1.0 230 0) |
|
469 |
#component: |
|
370 | 470 |
#(#SpecCollection |
687 | 471 |
#collection: |
370 | 472 |
#( |
473 |
#(#LabelSpec |
|
687 | 474 |
#name: 'fgLabel' |
475 |
#layout: #(#AlignmentOrigin 107 0 27 0 1 0.5) |
|
476 |
#label: 'Foreground:' |
|
477 |
#adjust: #right |
|
478 |
#resizeForLabel: true |
|
370 | 479 |
) |
505 | 480 |
#(#ColorMenuSpec |
687 | 481 |
#name: 'fgMenu' |
482 |
#layout: #(#LayoutFrame 110 0 15 0 12 1.0 37 0) |
|
483 |
#activeHelpKey: #colorsForegroundCellColor |
|
484 |
#model: #foregroundColor |
|
485 |
#labelsAreColored: true |
|
505 | 486 |
) |
370 | 487 |
#(#LabelSpec |
687 | 488 |
#name: 'bgLabel' |
489 |
#layout: #(#AlignmentOrigin 107 0 55 0 1 0.5) |
|
490 |
#label: 'Background:' |
|
491 |
#adjust: #right |
|
492 |
#resizeForLabel: true |
|
370 | 493 |
) |
494 |
#(#ColorMenuSpec |
|
687 | 495 |
#name: 'bgMenu' |
496 |
#layout: #(#LayoutFrame 110 0 43 0 12 1.0 65 0) |
|
497 |
#activeHelpKey: #colorsBackgroundCellColor |
|
498 |
#model: #backgroundColor |
|
499 |
#labelsAreColored: false |
|
370 | 500 |
) |
380 | 501 |
#(#LabelSpec |
687 | 502 |
#name: 'fgSelLabel' |
503 |
#layout: #(#AlignmentOrigin 107 0 89 0 1 0.5) |
|
504 |
#label: 'FG-Selector:' |
|
505 |
#adjust: #right |
|
506 |
#resizeForLabel: true |
|
380 | 507 |
) |
508 |
#(#InputFieldSpec |
|
687 | 509 |
#name: 'fgSelField' |
510 |
#layout: #(#LayoutFrame 110 0 78 0 15 1.0 100 0) |
|
511 |
#activeHelpKey: #colorsForegroundSelector |
|
512 |
#tabable: true |
|
513 |
#model: #foregroundSelector |
|
514 |
#type: #symbolOrNil |
|
470 | 515 |
) |
505 | 516 |
#(#LabelSpec |
687 | 517 |
#name: 'bgSelLabel' |
518 |
#layout: #(#AlignmentOrigin 107 0 114 0 1 0.5) |
|
519 |
#label: 'BG-Selector:' |
|
520 |
#adjust: #right |
|
521 |
#resizeForLabel: true |
|
505 | 522 |
) |
470 | 523 |
#(#InputFieldSpec |
687 | 524 |
#name: 'bgSelField' |
525 |
#layout: #(#LayoutFrame 110 0 103 0 15 1.0 125 0) |
|
526 |
#activeHelpKey: #colorsBackgroundSelector |
|
527 |
#tabable: true |
|
528 |
#model: #backgroundSelector |
|
529 |
#type: #symbolOrNil |
|
408 | 530 |
) |
380 | 531 |
) |
532 |
) |
|
687 | 533 |
#label: 'Cell Colors:' |
534 |
#labelPosition: #topLeft |
|
377 | 535 |
) |
332 | 536 |
) |
537 |
) |
|
538 |
) |
|
539 |
! |
|
540 |
||
528 | 541 |
defineClassNameSpec |
825 | 542 |
"This resource specification was automatically generated |
543 |
by the UIPainter of ST/X." |
|
528 | 544 |
|
825 | 545 |
"Do not manually edit this!! If it is corrupted, |
546 |
the UIPainter may not be able to read the specification." |
|
528 | 547 |
|
548 |
" |
|
549 |
UIPainter new openOnClass:DataSetBuilder andSelector:#defineClassNameSpec |
|
550 |
DataSetBuilder new openInterface:#defineClassNameSpec |
|
551 |
" |
|
552 |
||
553 |
<resource: #canvas> |
|
554 |
||
555 |
^ |
|
556 |
||
557 |
#(#FullSpec |
|
687 | 558 |
#window: |
528 | 559 |
#(#WindowSpec |
687 | 560 |
#name: 'Data Set Builder' |
825 | 561 |
#layout: #(#LayoutFrame 414 0 336 0 740 0 471 0) |
687 | 562 |
#label: 'Data Set Builder' |
563 |
#min: #(#Point 10 10) |
|
564 |
#max: #(#Point 1152 900) |
|
825 | 565 |
#bounds: #(#Rectangle 414 336 741 472) |
687 | 566 |
#usePreferredExtent: false |
528 | 567 |
) |
687 | 568 |
#component: |
528 | 569 |
#(#SpecCollection |
687 | 570 |
#collection: |
528 | 571 |
#( |
572 |
#(#FramedBoxSpec |
|
687 | 573 |
#name: 'framedBox1' |
574 |
#layout: #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -34 1.0) |
|
575 |
#label: 'Classes for code' |
|
576 |
#labelPosition: #topLeft |
|
528 | 577 |
) |
578 |
#(#LabelSpec |
|
687 | 579 |
#name: 'classLabel' |
580 |
#layout: #(#AlignmentOrigin 73 0.11 38 0 1 0.5) |
|
581 |
#label: 'Class:' |
|
582 |
#adjust: #right |
|
583 |
#resizeForLabel: true |
|
528 | 584 |
) |
585 |
#(#InputFieldSpec |
|
687 | 586 |
#name: 'classNameInputField' |
587 |
#layout: #(#LayoutFrame 77 0.11 27 0 -16 1.0 49 0) |
|
588 |
#tabable: true |
|
589 |
#model: #classNameChannel |
|
528 | 590 |
) |
591 |
#(#LabelSpec |
|
687 | 592 |
#name: 'superClassLabel' |
593 |
#layout: #(#AlignmentOrigin 73 0.11 65 0 1 0.5) |
|
594 |
#label: 'Superclass:' |
|
595 |
#adjust: #right |
|
596 |
#resizeForLabel: true |
|
528 | 597 |
) |
598 |
#(#InputFieldSpec |
|
687 | 599 |
#name: 'superclassNameInputField' |
600 |
#layout: #(#LayoutFrame 76 0.11 55 0 -16 1.0 77 0) |
|
601 |
#tabable: true |
|
602 |
#model: #superclassNameChannel |
|
528 | 603 |
) |
604 |
#(#UISubSpecification |
|
687 | 605 |
#name: 'SubSpecification' |
606 |
#layout: #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1.0) |
|
607 |
#majorKey: #ToolApplicationModel |
|
608 |
#minorKey: #windowSpecForCommitWithoutChannels |
|
528 | 609 |
) |
610 |
) |
|
611 |
) |
|
612 |
) |
|
613 |
! |
|
614 |
||
370 | 615 |
formatEditSpec |
825 | 616 |
"This resource specification was automatically generated |
617 |
by the UIPainter of ST/X." |
|
332 | 618 |
|
825 | 619 |
"Do not manually edit this!! If it is corrupted, |
620 |
the UIPainter may not be able to read the specification." |
|
332 | 621 |
|
622 |
" |
|
370 | 623 |
UIPainter new openOnClass:DataSetBuilder andSelector:#formatEditSpec |
624 |
DataSetBuilder new openInterface:#formatEditSpec |
|
625 |
" |
|
626 |
||
627 |
<resource: #canvas> |
|
628 |
||
629 |
^ |
|
630 |
||
631 |
#(#FullSpec |
|
687 | 632 |
#window: |
370 | 633 |
#(#WindowSpec |
687 | 634 |
#name: 'DataSet Details' |
825 | 635 |
#layout: #(#LayoutFrame 329 0 353 0 716 0 644 0) |
687 | 636 |
#label: 'DataSet Details' |
637 |
#min: #(#Point 10 10) |
|
638 |
#max: #(#Point 1280 1024) |
|
825 | 639 |
#bounds: #(#Rectangle 329 353 717 645) |
687 | 640 |
#usePreferredExtent: false |
370 | 641 |
) |
687 | 642 |
#component: |
370 | 643 |
#(#SpecCollection |
687 | 644 |
#collection: |
370 | 645 |
#( |
408 | 646 |
#(#FramedBoxSpec |
687 | 647 |
#name: 'framedBox1' |
648 |
#layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 114 0) |
|
649 |
#component: |
|
408 | 650 |
#(#SpecCollection |
687 | 651 |
#collection: |
408 | 652 |
#( |
653 |
#(#LabelSpec |
|
687 | 654 |
#name: 'typeLabel' |
655 |
#layout: #(#AlignmentOrigin 107 0 29 0 1 0.5) |
|
656 |
#label: 'Input Type:' |
|
657 |
#resizeForLabel: true |
|
408 | 658 |
) |
470 | 659 |
#(#ComboListSpec |
687 | 660 |
#name: 'typeCombo' |
661 |
#layout: #(#LayoutFrame 110 0 18 0 15 1.0 40 0) |
|
662 |
#activeHelpKey: #formatInputType |
|
663 |
#tabable: true |
|
664 |
#model: #type |
|
665 |
#comboList: |
|
470 | 666 |
#(#string |
667 |
#password #number |
|
668 |
#numberOrNil #symbolOrNil |
|
669 |
) |
|
687 | 670 |
#useIndex: false |
470 | 671 |
) |
408 | 672 |
#(#LabelSpec |
687 | 673 |
#name: 'sizeLabel' |
674 |
#layout: #(#AlignmentOrigin 107 0 55 0 1 0.5) |
|
675 |
#label: 'Max Size:' |
|
676 |
#resizeForLabel: true |
|
408 | 677 |
) |
678 |
#(#InputFieldSpec |
|
687 | 679 |
#name: 'sizeField' |
680 |
#layout: #(#LayoutFrame 110 0 44 0 15 1.0 66 0) |
|
681 |
#activeHelpKey: #formatMaxSize |
|
682 |
#tabable: true |
|
683 |
#model: #size |
|
684 |
#type: #numberOrNil |
|
408 | 685 |
) |
439 | 686 |
#(#LabelSpec |
687 | 687 |
#name: 'formatLabel' |
688 |
#layout: #(#AlignmentOrigin 107 0 80 0 1 0.5) |
|
689 |
#label: 'Text Format:' |
|
690 |
#resizeForLabel: true |
|
439 | 691 |
) |
470 | 692 |
#(#InputFieldSpec |
687 | 693 |
#name: 'formatField' |
694 |
#layout: #(#LayoutFrame 110 0 69 0 15 1.0 91 0) |
|
695 |
#activeHelpKey: #formatTextFormat |
|
696 |
#tabable: true |
|
697 |
#model: #formatString |
|
470 | 698 |
) |
408 | 699 |
) |
700 |
) |
|
687 | 701 |
#label: 'Input Format' |
702 |
#labelPosition: #topLeft |
|
370 | 703 |
) |
704 |
) |
|
705 |
) |
|
706 |
) |
|
707 |
! |
|
708 |
||
408 | 709 |
frameEditSpec |
825 | 710 |
"This resource specification was automatically generated |
711 |
by the UIPainter of ST/X." |
|
391 | 712 |
|
825 | 713 |
"Do not manually edit this!! If it is corrupted, |
714 |
the UIPainter may not be able to read the specification." |
|
391 | 715 |
|
716 |
" |
|
408 | 717 |
UIPainter new openOnClass:DataSetBuilder andSelector:#frameEditSpec |
718 |
DataSetBuilder new openInterface:#frameEditSpec |
|
391 | 719 |
" |
720 |
||
721 |
<resource: #canvas> |
|
722 |
||
723 |
^ |
|
724 |
||
725 |
#(#FullSpec |
|
687 | 726 |
#window: |
391 | 727 |
#(#WindowSpec |
687 | 728 |
#name: 'DataSet Dimension' |
825 | 729 |
#layout: #(#LayoutFrame 512 0 370 0 802 0 583 0) |
687 | 730 |
#label: 'DataSet Dimension' |
731 |
#min: #(#Point 10 10) |
|
732 |
#max: #(#Point 1280 1024) |
|
825 | 733 |
#bounds: #(#Rectangle 512 370 803 584) |
687 | 734 |
#usePreferredExtent: false |
391 | 735 |
) |
687 | 736 |
#component: |
391 | 737 |
#(#SpecCollection |
687 | 738 |
#collection: |
391 | 739 |
#( |
740 |
#(#FramedBoxSpec |
|
687 | 741 |
#name: 'separatorBox' |
742 |
#layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 86 0) |
|
743 |
#component: |
|
391 | 744 |
#(#SpecCollection |
687 | 745 |
#collection: |
391 | 746 |
#( |
408 | 747 |
#(#CheckBoxSpec |
687 | 748 |
#name: 'showRowSeparator' |
749 |
#layout: #(#LayoutFrame 18 0 19 0 194 0 42 0) |
|
750 |
#activeHelpKey: #frameShowRowSeparator |
|
751 |
#tabable: true |
|
752 |
#model: #showRowSeparator |
|
753 |
#label: 'Show Row-Separator' |
|
408 | 754 |
) |
755 |
#(#CheckBoxSpec |
|
687 | 756 |
#name: 'showColSeparator' |
757 |
#layout: #(#LayoutFrame 18 0 45 0 194 0 68 0) |
|
758 |
#activeHelpKey: #frameShowColumnSeparator |
|
759 |
#tabable: true |
|
760 |
#model: #showColSeparator |
|
761 |
#label: 'Show Column-Separator' |
|
408 | 762 |
) |
763 |
) |
|
764 |
) |
|
687 | 765 |
#label: 'Separators' |
766 |
#labelPosition: #topLeft |
|
408 | 767 |
) |
768 |
#(#FramedBoxSpec |
|
687 | 769 |
#name: 'framedBox1' |
770 |
#layout: #(#LayoutFrame 0 0.0 86 0 0 1.0 198 0) |
|
771 |
#component: |
|
408 | 772 |
#(#SpecCollection |
687 | 773 |
#collection: |
408 | 774 |
#( |
391 | 775 |
#(#LabelSpec |
687 | 776 |
#name: 'widthLabel' |
777 |
#layout: #(#AlignmentOrigin 107 0.0 28 0 1 0.5) |
|
778 |
#label: 'Column Width:' |
|
779 |
#adjust: #right |
|
780 |
#resizeForLabel: true |
|
391 | 781 |
) |
470 | 782 |
#(#InputFieldSpec |
687 | 783 |
#name: 'widthField' |
784 |
#layout: #(#LayoutFrame 110 0 17 0 15 1.0 39 0) |
|
785 |
#activeHelpKey: #frameColumnWidth |
|
786 |
#tabable: true |
|
787 |
#model: #width |
|
788 |
#type: #numberOrNil |
|
470 | 789 |
) |
391 | 790 |
#(#LabelSpec |
687 | 791 |
#name: 'minWidthLabel' |
792 |
#layout: #(#AlignmentOrigin 107 0.0 53 0 1 0.5) |
|
793 |
#label: 'Min Width:' |
|
794 |
#adjust: #right |
|
795 |
#resizeForLabel: true |
|
391 | 796 |
) |
408 | 797 |
#(#InputFieldSpec |
687 | 798 |
#name: 'minWidthField' |
799 |
#layout: #(#LayoutFrame 110 0 42 0 15 1.0 64 0) |
|
800 |
#activeHelpKey: #frameMinWidth |
|
801 |
#tabable: true |
|
802 |
#model: #minWidth |
|
803 |
#type: #numberOrNil |
|
408 | 804 |
) |
805 |
#(#LabelSpec |
|
687 | 806 |
#name: 'heightLabel' |
807 |
#layout: #(#AlignmentOrigin 107 0.0 84 0 1 0.5) |
|
808 |
#label: 'Row Height:' |
|
809 |
#adjust: #right |
|
810 |
#resizeForLabel: true |
|
408 | 811 |
) |
812 |
#(#InputFieldSpec |
|
687 | 813 |
#name: 'heightField' |
814 |
#layout: #(#LayoutFrame 110 0 73 0 15 1.0 95 0) |
|
815 |
#activeHelpKey: #frameRowHeight |
|
816 |
#tabable: true |
|
817 |
#model: #height |
|
818 |
#type: #numberOrNil |
|
391 | 819 |
) |
820 |
) |
|
821 |
) |
|
687 | 822 |
#label: 'Dimensions:' |
823 |
#labelPosition: #topLeft |
|
391 | 824 |
) |
825 |
) |
|
826 |
) |
|
827 |
) |
|
828 |
! |
|
829 |
||
408 | 830 |
selectionEditSpec |
825 | 831 |
"This resource specification was automatically generated |
832 |
by the UIPainter of ST/X." |
|
370 | 833 |
|
825 | 834 |
"Do not manually edit this!! If it is corrupted, |
835 |
the UIPainter may not be able to read the specification." |
|
370 | 836 |
|
837 |
" |
|
408 | 838 |
UIPainter new openOnClass:DataSetBuilder andSelector:#selectionEditSpec |
839 |
DataSetBuilder new openInterface:#selectionEditSpec |
|
332 | 840 |
" |
841 |
||
842 |
<resource: #canvas> |
|
843 |
||
844 |
^ |
|
845 |
||
846 |
#(#FullSpec |
|
687 | 847 |
#window: |
332 | 848 |
#(#WindowSpec |
687 | 849 |
#name: 'DataSet Basic' |
825 | 850 |
#layout: #(#LayoutFrame 533 0 372 0 821 0 627 0) |
687 | 851 |
#label: 'DataSet Basic' |
852 |
#min: #(#Point 10 10) |
|
853 |
#max: #(#Point 1280 1024) |
|
825 | 854 |
#bounds: #(#Rectangle 533 372 822 628) |
687 | 855 |
#usePreferredExtent: false |
408 | 856 |
) |
687 | 857 |
#component: |
408 | 858 |
#(#SpecCollection |
687 | 859 |
#collection: |
408 | 860 |
#( |
861 |
#(#FramedBoxSpec |
|
687 | 862 |
#name: 'framedBox1' |
863 |
#layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 85 0) |
|
864 |
#component: |
|
408 | 865 |
#(#SpecCollection |
687 | 866 |
#collection: |
408 | 867 |
#( |
868 |
#(#LabelSpec |
|
687 | 869 |
#name: 'ActionLabel' |
870 |
#layout: #(#AlignmentOrigin 107 0 28 0 1 0.5) |
|
871 |
#label: 'Selector:' |
|
872 |
#adjust: #left |
|
873 |
#resizeForLabel: true |
|
408 | 874 |
) |
875 |
#(#InputFieldSpec |
|
687 | 876 |
#name: 'ActionSelector' |
877 |
#layout: #(#LayoutFrame 110 0 17 0 15 1.0 39 0) |
|
878 |
#activeHelpKey: #selectionLabelClickSelector |
|
879 |
#tabable: true |
|
880 |
#model: #labelActionSelector |
|
881 |
#type: #symbolOrNil |
|
408 | 882 |
) |
427 | 883 |
#(#LabelSpec |
687 | 884 |
#name: 'ArgumentLabel' |
885 |
#layout: #(#AlignmentOrigin 107 0 53 0 1 0.5) |
|
886 |
#label: 'Argument:' |
|
887 |
#adjust: #left |
|
888 |
#resizeForLabel: true |
|
427 | 889 |
) |
890 |
#(#InputFieldSpec |
|
687 | 891 |
#name: 'ArgumentValue' |
892 |
#layout: #(#LayoutFrame 110 0 42 0 15 1.0 64 0) |
|
893 |
#activeHelpKey: #selectionLabelSelectorArgument |
|
894 |
#tabable: true |
|
895 |
#model: #labelActionArgument |
|
896 |
#type: #string |
|
427 | 897 |
) |
408 | 898 |
) |
899 |
) |
|
687 | 900 |
#label: 'Label Select Action:' |
901 |
#labelPosition: #topLeft |
|
408 | 902 |
) |
903 |
#(#FramedBoxSpec |
|
687 | 904 |
#name: 'framedBox2' |
905 |
#layout: #(#LayoutFrame 0 0.0 85 0 0 1.0 166 0) |
|
906 |
#component: |
|
470 | 907 |
#(#SpecCollection |
687 | 908 |
#collection: |
470 | 909 |
#( |
910 |
#(#CheckBoxSpec |
|
687 | 911 |
#name: 'canSelect' |
912 |
#layout: #(#Point 107 17) |
|
913 |
#activeHelpKey: #selectionIsSelectable |
|
914 |
#tabable: true |
|
915 |
#model: #canSelect |
|
916 |
#label: 'Is Selectable' |
|
470 | 917 |
) |
918 |
#(#LabelSpec |
|
687 | 919 |
#name: 'selectorLabel' |
920 |
#layout: #(#AlignmentOrigin 107 0 53 0 1 0.5) |
|
921 |
#label: 'Selector:' |
|
922 |
#adjust: #right |
|
923 |
#resizeForLabel: true |
|
470 | 924 |
) |
925 |
#(#InputFieldSpec |
|
687 | 926 |
#name: 'selectSelector' |
927 |
#layout: #(#LayoutFrame 110 0 42 0 15 1.0 64 0) |
|
928 |
#activeHelpKey: #selectionCellClickSelector |
|
929 |
#tabable: true |
|
930 |
#model: #selectSelector |
|
931 |
#type: #symbolOrNil |
|
470 | 932 |
) |
933 |
) |
|
934 |
) |
|
687 | 935 |
#label: 'Cell Selection:' |
936 |
#labelPosition: #topLeft |
|
470 | 937 |
) |
938 |
#(#FramedBoxSpec |
|
687 | 939 |
#name: 'framedBox3' |
940 |
#layout: #(#LayoutFrame 0 0.0 166 0 0 1.0 220 0) |
|
941 |
#component: |
|
408 | 942 |
#(#SpecCollection |
687 | 943 |
#collection: |
408 | 944 |
#( |
945 |
#(#LabelSpec |
|
687 | 946 |
#name: 'doubleLabel' |
947 |
#layout: #(#AlignmentOrigin 107 0 27 0 1 0.5) |
|
948 |
#label: 'Selector:' |
|
949 |
#adjust: #right |
|
950 |
#resizeForLabel: true |
|
408 | 951 |
) |
952 |
#(#InputFieldSpec |
|
687 | 953 |
#name: 'doubleClicked' |
954 |
#layout: #(#LayoutFrame 110 0 16 0 15 1.0 38 0) |
|
955 |
#activeHelpKey: #selectionCellDoubleClickSelector |
|
956 |
#tabable: true |
|
957 |
#model: #doubleClickedSelector |
|
958 |
#type: #symbolOrNil |
|
408 | 959 |
) |
960 |
) |
|
961 |
) |
|
687 | 962 |
#label: 'Cell Double Click:' |
963 |
#labelPosition: #topLeft |
|
408 | 964 |
) |
965 |
) |
|
966 |
) |
|
967 |
) |
|
968 |
! |
|
969 |
||
528 | 970 |
slices |
971 |
^#( |
|
972 |
(Basics basicsEditSpec) |
|
973 |
(Values valuesEditSpec) |
|
974 |
(Format formatEditSpec) |
|
975 |
(Selection selectionEditSpec) |
|
976 |
(Frame frameEditSpec) |
|
977 |
(Colors colorsEditSpec) |
|
978 |
) |
|
979 |
! |
|
980 |
||
408 | 981 |
valuesEditSpec |
825 | 982 |
"This resource specification was automatically generated |
983 |
by the UIPainter of ST/X." |
|
408 | 984 |
|
825 | 985 |
"Do not manually edit this!! If it is corrupted, |
986 |
the UIPainter may not be able to read the specification." |
|
408 | 987 |
|
988 |
" |
|
989 |
UIPainter new openOnClass:DataSetBuilder andSelector:#valuesEditSpec |
|
990 |
DataSetBuilder new openInterface:#valuesEditSpec |
|
991 |
" |
|
992 |
||
993 |
<resource: #canvas> |
|
994 |
||
995 |
^ |
|
996 |
||
997 |
#(#FullSpec |
|
687 | 998 |
#window: |
408 | 999 |
#(#WindowSpec |
687 | 1000 |
#name: 'DataSet Basic' |
825 | 1001 |
#layout: #(#LayoutFrame 501 0 386 0 796 0 691 0) |
687 | 1002 |
#label: 'DataSet Basic' |
1003 |
#min: #(#Point 10 10) |
|
1004 |
#max: #(#Point 1280 1024) |
|
825 | 1005 |
#bounds: #(#Rectangle 501 386 797 692) |
687 | 1006 |
#usePreferredExtent: false |
332 | 1007 |
) |
687 | 1008 |
#component: |
332 | 1009 |
#(#SpecCollection |
687 | 1010 |
#collection: |
332 | 1011 |
#( |
370 | 1012 |
#(#FramedBoxSpec |
687 | 1013 |
#name: 'valuesBox' |
1014 |
#layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 110 0) |
|
1015 |
#component: |
|
370 | 1016 |
#(#SpecCollection |
687 | 1017 |
#collection: |
370 | 1018 |
#( |
1019 |
#(#LabelSpec |
|
687 | 1020 |
#name: 'readLabel' |
1021 |
#layout: #(#AlignmentOrigin 107 0 29 0 1 0.5) |
|
1022 |
#label: 'Read:' |
|
1023 |
#adjust: #right |
|
1024 |
#resizeForLabel: true |
|
370 | 1025 |
) |
1026 |
#(#InputFieldSpec |
|
687 | 1027 |
#name: 'readSelector' |
1028 |
#layout: #(#LayoutFrame 110 0 18 0 15 1.0 40 0) |
|
1029 |
#activeHelpKey: #valuesReadSelector |
|
1030 |
#tabable: true |
|
1031 |
#model: #readSelector |
|
1032 |
#type: #symbolOrNil |
|
370 | 1033 |
) |
470 | 1034 |
#(#LabelSpec |
687 | 1035 |
#name: 'writeLabel' |
1036 |
#layout: #(#AlignmentOrigin 107 0 54 0 1 0.5) |
|
1037 |
#label: 'Write:' |
|
1038 |
#adjust: #right |
|
1039 |
#resizeForLabel: true |
|
470 | 1040 |
) |
379 | 1041 |
#(#InputFieldSpec |
687 | 1042 |
#name: 'writeSelector' |
1043 |
#layout: #(#LayoutFrame 110 0 43 0 15 1.0 65 0) |
|
1044 |
#activeHelpKey: #valuesWriteSelector |
|
1045 |
#tabable: true |
|
1046 |
#model: #writeSelector |
|
1047 |
#type: #symbolOrNil |
|
379 | 1048 |
) |
370 | 1049 |
#(#LabelSpec |
687 | 1050 |
#name: 'printLabel' |
1051 |
#layout: #(#AlignmentOrigin 107 0 79 0 1 0.5) |
|
1052 |
#label: 'Print:' |
|
1053 |
#adjust: #right |
|
1054 |
#resizeForLabel: true |
|
370 | 1055 |
) |
1056 |
#(#InputFieldSpec |
|
687 | 1057 |
#name: 'printSelector' |
1058 |
#layout: #(#LayoutFrame 110 0 68 0 15 1.0 90 0) |
|
1059 |
#activeHelpKey: #valuesPrintSelector |
|
1060 |
#tabable: true |
|
1061 |
#model: #printSelector |
|
1062 |
#type: #symbolOrNil |
|
370 | 1063 |
) |
1064 |
) |
|
1065 |
) |
|
687 | 1066 |
#label: 'Value Selectors:' |
1067 |
#labelPosition: #topLeft |
|
332 | 1068 |
) |
370 | 1069 |
#(#FramedBoxSpec |
687 | 1070 |
#name: 'menusBox' |
1071 |
#layout: #(#LayoutFrame 0 0.0 110 0 0 1.0 167 0) |
|
1072 |
#component: |
|
370 | 1073 |
#(#SpecCollection |
687 | 1074 |
#collection: |
370 | 1075 |
#( |
1076 |
#(#LabelSpec |
|
687 | 1077 |
#name: 'menuLabel' |
1078 |
#layout: #(#AlignmentOrigin 107 0 29 0 1 0.5) |
|
1079 |
#label: 'Selector:' |
|
1080 |
#adjust: #right |
|
1081 |
#resizeForLabel: true |
|
370 | 1082 |
) |
1083 |
#(#InputFieldSpec |
|
687 | 1084 |
#name: 'menuSelector' |
1085 |
#layout: #(#LayoutFrame 110 0 18 0 15 1.0 40 0) |
|
1086 |
#activeHelpKey: #valuesMenuSelector |
|
1087 |
#tabable: true |
|
1088 |
#model: #menu |
|
1089 |
#type: #symbolOrNil |
|
370 | 1090 |
) |
597 | 1091 |
) |
1092 |
) |
|
687 | 1093 |
#label: 'Menu:' |
1094 |
#labelPosition: #topLeft |
|
597 | 1095 |
) |
1096 |
#(#FramedBoxSpec |
|
687 | 1097 |
#name: 'framedBox1' |
1098 |
#layout: #(#LayoutFrame 1 0.0 167 0 1 1.0 225 0) |
|
1099 |
#component: |
|
597 | 1100 |
#(#SpecCollection |
687 | 1101 |
#collection: |
597 | 1102 |
#( |
370 | 1103 |
#(#LabelSpec |
687 | 1104 |
#name: 'label2' |
1105 |
#layout: #(#AlignmentOrigin 107 0 29 0 1 0.5) |
|
1106 |
#activeHelpKey: #valuesChoiceSelector |
|
1107 |
#label: 'Selector:' |
|
1108 |
#adjust: #right |
|
1109 |
#resizeForLabel: true |
|
370 | 1110 |
) |
1111 |
#(#InputFieldSpec |
|
687 | 1112 |
#name: 'inputField2' |
1113 |
#layout: #(#LayoutFrame 110 0 18 0 15 1.0 40 0) |
|
1114 |
#activeHelpKey: #valuesChoiceSelector |
|
1115 |
#tabable: true |
|
1116 |
#model: #choices |
|
1117 |
#type: #symbolOrNil |
|
370 | 1118 |
) |
1119 |
) |
|
1120 |
) |
|
687 | 1121 |
#label: 'List Choice:' |
1122 |
#labelPosition: #topLeft |
|
391 | 1123 |
) |
332 | 1124 |
) |
1125 |
) |
|
1126 |
) |
|
1127 |
! |
|
1128 |
||
1129 |
windowSpec |
|
817 | 1130 |
"This resource specification was automatically generated |
1131 |
by the UIPainter of ST/X." |
|
332 | 1132 |
|
817 | 1133 |
"Do not manually edit this!! If it is corrupted, |
1134 |
the UIPainter may not be able to read the specification." |
|
332 | 1135 |
|
1136 |
" |
|
1137 |
UIPainter new openOnClass:DataSetBuilder andSelector:#windowSpec |
|
1138 |
DataSetBuilder new openInterface:#windowSpec |
|
817 | 1139 |
DataSetBuilder open |
332 | 1140 |
" |
1141 |
||
1142 |
<resource: #canvas> |
|
1143 |
||
1144 |
^ |
|
1145 |
||
1146 |
#(#FullSpec |
|
687 | 1147 |
#window: |
332 | 1148 |
#(#WindowSpec |
687 | 1149 |
#name: 'Data Set Builder' |
825 | 1150 |
#layout: #(#LayoutFrame 314 0 309 0 853 0 808 0) |
687 | 1151 |
#label: 'Data Set Builder' |
1152 |
#min: #(#Point 10 10) |
|
1153 |
#max: #(#Point 1152 900) |
|
825 | 1154 |
#bounds: #(#Rectangle 314 309 854 809) |
687 | 1155 |
#menu: #menu |
1156 |
#usePreferredExtent: false |
|
332 | 1157 |
) |
687 | 1158 |
#component: |
332 | 1159 |
#(#SpecCollection |
687 | 1160 |
#collection: |
332 | 1161 |
#( |
825 | 1162 |
#(#MenuPanelSpec |
1163 |
#name: 'menuToolbarView' |
|
1164 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 32 0) |
|
1165 |
#menu: #menuToolbar |
|
1166 |
) |
|
1167 |
#(#VariableVerticalPanelSpec |
|
1168 |
#name: 'VariableVerticalPanel1' |
|
1169 |
#layout: #(#LayoutFrame 0 0.0 38 0.0 0 1.0 -26 1.0) |
|
687 | 1170 |
#component: |
332 | 1171 |
#(#SpecCollection |
687 | 1172 |
#collection: |
332 | 1173 |
#( |
825 | 1174 |
#(#FramedBoxSpec |
1175 |
#name: 'FramedBox' |
|
1176 |
#component: |
|
1177 |
#(#SpecCollection |
|
1178 |
#collection: |
|
1179 |
#( |
|
1180 |
#(#DataSetSpec |
|
1181 |
#name: 'columnView' |
|
1182 |
#layout: #(#LayoutFrame 15 0.0 16 0.0 15 1.0 16 1.0) |
|
1183 |
#hasHorizontalScrollBar: true |
|
1184 |
#hasVerticalScrollBar: false |
|
1185 |
#miniScrollerHorizontal: true |
|
1186 |
#rowClassName: 'CodingExamples_GUI::GUIDemoDataSetView::Row' |
|
1187 |
#useIndex: false |
|
1188 |
#has3Dsepartors: true |
|
1189 |
) |
|
1190 |
) |
|
1191 |
) |
|
1192 |
#label: 'Table Columns' |
|
1193 |
#labelPosition: #topLeft |
|
818 | 1194 |
) |
1195 |
#(#VariableHorizontalPanelSpec |
|
1196 |
#name: 'VariablePanel' |
|
687 | 1197 |
#component: |
332 | 1198 |
#(#SpecCollection |
687 | 1199 |
#collection: |
332 | 1200 |
#( |
818 | 1201 |
#(#ViewSpec |
1202 |
#name: 'labelsView' |
|
1203 |
#component: |
|
1204 |
#(#SpecCollection |
|
1205 |
#collection: |
|
1206 |
#( |
|
1207 |
#(#SequenceViewSpec |
|
1208 |
#name: 'labelAndColumns' |
|
1209 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1210 |
#model: #selectedColumnModel |
|
1211 |
#menu: #menuEdit |
|
1212 |
#hasHorizontalScrollBar: true |
|
1213 |
#hasVerticalScrollBar: true |
|
1214 |
#miniScrollerHorizontal: true |
|
1215 |
#useIndex: true |
|
1216 |
#sequenceList: #seqList |
|
1217 |
) |
|
1218 |
) |
|
1219 |
) |
|
1220 |
) |
|
1221 |
#(#ViewSpec |
|
1222 |
#name: 'specView' |
|
1223 |
#component: |
|
1224 |
#(#SpecCollection |
|
1225 |
#collection: |
|
1226 |
#( |
|
1227 |
#(#TabViewSpec |
|
1228 |
#name: 'tabView' |
|
1229 |
#layout: #(#LayoutFrame 1 0.0 0 0 0 1.0 35 0) |
|
1230 |
#model: #tabModel |
|
1231 |
#menu: #tabList |
|
1232 |
#useIndex: true |
|
1233 |
) |
|
1234 |
#(#SubCanvasSpec |
|
1235 |
#name: 'specCanvas' |
|
1236 |
#layout: #(#LayoutFrame 1 0.0 35 0.0 0 1.0 -30 1.0) |
|
1237 |
#specHolder: #specChannel |
|
1238 |
) |
|
1239 |
#(#UISubSpecification |
|
1240 |
#name: 'SubSpecification' |
|
1241 |
#layout: #(#LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) |
|
1242 |
#majorKey: #ToolApplicationModel |
|
1243 |
#minorKey: #windowSpecForCommit |
|
1244 |
) |
|
1245 |
) |
|
1246 |
) |
|
1247 |
#level: -1 |
|
332 | 1248 |
) |
1249 |
) |
|
1250 |
) |
|
825 | 1251 |
#level: -1 |
1252 |
#handles: #(#Any 0.311111 1.0) |
|
332 | 1253 |
) |
1254 |
) |
|
1255 |
) |
|
825 | 1256 |
#handles: #(#Any 0.25 1.0) |
332 | 1257 |
) |
825 | 1258 |
#(#UISubSpecification |
1259 |
#name: 'infoBarSubSpec' |
|
1260 |
#layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) |
|
1261 |
#majorKey: #ToolApplicationModel |
|
1262 |
#minorKey: #windowSpecForInfoBar |
|
408 | 1263 |
) |
332 | 1264 |
) |
1265 |
) |
|
1266 |
) |
|
1267 |
! ! |
|
1268 |
||
1269 |
!DataSetBuilder class methodsFor:'menu specs'! |
|
1270 |
||
408 | 1271 |
menu |
818 | 1272 |
"This resource specification was automatically generated |
1273 |
by the MenuEditor of ST/X." |
|
332 | 1274 |
|
818 | 1275 |
"Do not manually edit this!! If it is corrupted, |
1276 |
the MenuEditor may not be able to read the specification." |
|
332 | 1277 |
|
1278 |
" |
|
408 | 1279 |
MenuEditor new openOnClass:DataSetBuilder andSelector:#menu |
1280 |
(Menu new fromLiteralArrayEncoding:(DataSetBuilder menu)) startUp |
|
332 | 1281 |
" |
1282 |
||
1283 |
<resource: #menu> |
|
1284 |
||
1285 |
^ |
|
1286 |
||
1287 |
#(#Menu |
|
1288 |
||
1289 |
#( |
|
1290 |
#(#MenuItem |
|
818 | 1291 |
#label: 'About' |
1292 |
#accessCharacterPosition: 1 |
|
1293 |
#labelImage: #(#ResourceRetriever nil #menuIcon) |
|
1294 |
#submenuChannel: #menuAbout |
|
408 | 1295 |
) |
1296 |
#(#MenuItem |
|
818 | 1297 |
#label: 'File' |
1298 |
#activeHelpKey: #file |
|
1299 |
#submenu: |
|
332 | 1300 |
#(#Menu |
1301 |
||
1302 |
#( |
|
1303 |
#(#MenuItem |
|
818 | 1304 |
#label: 'New' |
1305 |
#value: #doNew |
|
1306 |
#activeHelpKey: #fileNew |
|
1307 |
) |
|
1308 |
#(#MenuItem |
|
1309 |
#label: '-' |
|
408 | 1310 |
) |
1311 |
#(#MenuItem |
|
818 | 1312 |
#label: 'Load...' |
1313 |
#translateLabel: true |
|
1314 |
#value: #doLoad |
|
1315 |
#activeHelpKey: #fileLoad |
|
408 | 1316 |
) |
1317 |
#(#MenuItem |
|
818 | 1318 |
#label: '-' |
1319 |
) |
|
1320 |
#(#MenuItem |
|
1321 |
#label: 'Save' |
|
1322 |
#value: #doSave |
|
1323 |
#activeHelpKey: #fileSave |
|
408 | 1324 |
) |
1325 |
#(#MenuItem |
|
818 | 1326 |
#label: 'Save As...' |
1327 |
#value: #doSaveAs |
|
1328 |
#activeHelpKey: #fileSaveAs |
|
1329 |
) |
|
1330 |
#(#MenuItem |
|
1331 |
#label: '-' |
|
1332 |
) |
|
1333 |
#(#MenuItem |
|
1334 |
#label: 'Pick Columns...' |
|
1335 |
#value: #doPickColumns |
|
408 | 1336 |
) |
1337 |
#(#MenuItem |
|
818 | 1338 |
#label: '-' |
1339 |
) |
|
1340 |
#(#MenuItem |
|
1341 |
#label: 'Browse Class' |
|
1342 |
#value: #doBrowseClass |
|
1343 |
#activeHelpKey: #fileBrowseClass |
|
408 | 1344 |
) |
1345 |
#(#MenuItem |
|
818 | 1346 |
#label: '-' |
1347 |
) |
|
1348 |
#(#MenuItem |
|
1349 |
#label: 'Exit' |
|
1350 |
#translateLabel: true |
|
1351 |
#value: #closeRequest |
|
1352 |
#activeHelpKey: #fileExit |
|
332 | 1353 |
) |
1354 |
) nil |
|
1355 |
nil |
|
1356 |
) |
|
1357 |
) |
|
1358 |
#(#MenuItem |
|
818 | 1359 |
#label: 'Edit' |
1360 |
#activeHelpKey: #edit |
|
1361 |
#submenuChannel: #menuEdit |
|
332 | 1362 |
) |
521 | 1363 |
#(#MenuItem |
818 | 1364 |
#label: 'Add' |
1365 |
#submenu: |
|
521 | 1366 |
#(#Menu |
1367 |
||
1368 |
#( |
|
1369 |
#(#MenuItem |
|
818 | 1370 |
#label: 'Column' |
1371 |
#value: #doCreateColumn |
|
1372 |
#activeHelpKey: #addColumn |
|
1373 |
#enabled: #columnIsNotEditing |
|
1374 |
#labelImage: #(#ResourceRetriever nil #newColumnIcon) |
|
521 | 1375 |
) |
1376 |
) nil |
|
1377 |
nil |
|
1378 |
) |
|
1379 |
) |
|
1380 |
#(#MenuItem |
|
818 | 1381 |
#label: 'Generate' |
1382 |
#activeHelpKey: #file |
|
1383 |
#submenu: |
|
1384 |
#(#Menu |
|
1385 |
||
1386 |
#( |
|
1387 |
#(#MenuItem |
|
1388 |
#label: 'Define Row Class...' |
|
1389 |
#value: #doDefineRowClass |
|
1390 |
#activeHelpKey: #fileDefineClass |
|
1391 |
) |
|
1392 |
#(#MenuItem |
|
1393 |
#label: 'Browse Row Class' |
|
1394 |
#value: #doBrowseRowClass |
|
1395 |
) |
|
1396 |
#(#MenuItem |
|
1397 |
#label: '-' |
|
1398 |
) |
|
1399 |
#(#MenuItem |
|
1400 |
#label: 'Generate Code' |
|
1401 |
#value: #doGenerateCode |
|
1402 |
) |
|
1403 |
) nil |
|
1404 |
nil |
|
1405 |
) |
|
1406 |
) |
|
1407 |
#(#MenuItem |
|
825 | 1408 |
#label: 'Settings' |
1409 |
#submenu: |
|
1410 |
#(#Menu |
|
1411 |
||
1412 |
#( |
|
1413 |
#(#MenuItem |
|
1414 |
#label: 'Fonts' |
|
1415 |
#submenuChannel: #menuFont |
|
1416 |
) |
|
1417 |
) nil |
|
1418 |
nil |
|
1419 |
) |
|
1420 |
) |
|
1421 |
#(#MenuItem |
|
818 | 1422 |
#label: 'History' |
1423 |
#activeHelpKey: #history |
|
1424 |
#submenuChannel: #menuHistory |
|
1425 |
) |
|
1426 |
#(#MenuItem |
|
1427 |
#label: 'Help' |
|
1428 |
#startGroup: #right |
|
825 | 1429 |
#submenuChannel: #menuHelp |
521 | 1430 |
) |
332 | 1431 |
) nil |
1432 |
nil |
|
1433 |
) |
|
1434 |
! |
|
1435 |
||
408 | 1436 |
menuEdit |
825 | 1437 |
"This resource specification was automatically generated |
1438 |
by the MenuEditor of ST/X." |
|
332 | 1439 |
|
825 | 1440 |
"Do not manually edit this!! If it is corrupted, |
1441 |
the MenuEditor may not be able to read the specification." |
|
332 | 1442 |
|
1443 |
" |
|
408 | 1444 |
MenuEditor new openOnClass:DataSetBuilder andSelector:#menuEdit |
1445 |
(Menu new fromLiteralArrayEncoding:(DataSetBuilder menuEdit)) startUp |
|
1446 |
" |
|
1447 |
||
1448 |
<resource: #menu> |
|
1449 |
||
1450 |
^ |
|
1451 |
||
1452 |
#(#Menu |
|
1453 |
||
1454 |
#( |
|
1455 |
#(#MenuItem |
|
825 | 1456 |
#label: 'Cut' |
1457 |
#value: #doCut |
|
1458 |
#activeHelpKey: #editCut |
|
1459 |
#enabled: #isColumnSelected |
|
408 | 1460 |
) |
1461 |
#(#MenuItem |
|
825 | 1462 |
#label: 'Copy' |
1463 |
#value: #doCopy |
|
1464 |
#activeHelpKey: #editCopy |
|
1465 |
#enabled: #isColumnSelected |
|
408 | 1466 |
) |
1467 |
#(#MenuItem |
|
825 | 1468 |
#label: 'Paste' |
1469 |
#value: #doPaste |
|
1470 |
#activeHelpKey: #editPaste |
|
1471 |
#enabled: #valueOfHavingClipboard |
|
408 | 1472 |
) |
1473 |
#(#MenuItem |
|
825 | 1474 |
#label: 'Delete' |
1475 |
#value: #doDelete |
|
1476 |
#activeHelpKey: #editPaste |
|
1477 |
#enabled: #valueOfHavingClipboard |
|
1478 |
) |
|
1479 |
#(#MenuItem |
|
1480 |
#label: '-' |
|
408 | 1481 |
) |
1482 |
#(#MenuItem |
|
825 | 1483 |
#label: 'Move Up' |
1484 |
#value: #doMoveColumn: |
|
1485 |
#activeHelpKey: #editMoveUp |
|
1486 |
#enabled: #isColumnSelected |
|
1487 |
#argument: #up |
|
1488 |
#labelImage: #(#ResourceRetriever #DataSetBuilder #upIcon 'Move Up') |
|
408 | 1489 |
) |
1490 |
#(#MenuItem |
|
825 | 1491 |
#label: 'Move Down' |
1492 |
#value: #doMoveColumn: |
|
1493 |
#activeHelpKey: #editMoveDown |
|
1494 |
#enabled: #isColumnSelected |
|
1495 |
#argument: #down |
|
1496 |
#labelImage: #(#ResourceRetriever #DataSetBuilder #downIcon 'Move Down') |
|
408 | 1497 |
) |
1498 |
) nil |
|
1499 |
nil |
|
1500 |
) |
|
1501 |
! |
|
1502 |
||
1503 |
menuToolbar |
|
825 | 1504 |
"This resource specification was automatically generated |
1505 |
by the MenuEditor of ST/X." |
|
408 | 1506 |
|
825 | 1507 |
"Do not manually edit this!! If it is corrupted, |
1508 |
the MenuEditor may not be able to read the specification." |
|
408 | 1509 |
|
1510 |
" |
|
1511 |
MenuEditor new openOnClass:DataSetBuilder andSelector:#menuToolbar |
|
1512 |
(Menu new fromLiteralArrayEncoding:(DataSetBuilder menuToolbar)) startUp |
|
332 | 1513 |
" |
1514 |
||
1515 |
<resource: #menu> |
|
1516 |
||
1517 |
^ |
|
1518 |
||
1519 |
#(#Menu |
|
1520 |
||
1521 |
#( |
|
1522 |
#(#MenuItem |
|
825 | 1523 |
#label: 'New' |
1524 |
#isButton: true |
|
1525 |
#value: #doNew |
|
1526 |
#activeHelpKey: #fileNew |
|
1527 |
#labelImage: #(#ResourceRetriever nil #newIcon) |
|
1528 |
) |
|
1529 |
#(#MenuItem |
|
1530 |
#label: 'Load' |
|
1531 |
#isButton: true |
|
1532 |
#value: #doLoad |
|
1533 |
#activeHelpKey: #fileLoad |
|
1534 |
#labelImage: #(#ResourceRetriever nil #loadIcon) |
|
332 | 1535 |
) |
1536 |
#(#MenuItem |
|
825 | 1537 |
#label: 'Save' |
1538 |
#isButton: true |
|
1539 |
#value: #doSave |
|
1540 |
#activeHelpKey: #fileSave |
|
1541 |
#labelImage: #(#ResourceRetriever nil #saveIcon) |
|
1542 |
) |
|
1543 |
#(#MenuItem |
|
1544 |
#label: '' |
|
1545 |
) |
|
1546 |
#(#MenuItem |
|
1547 |
#label: 'Cut' |
|
1548 |
#isButton: true |
|
1549 |
#value: #doCut |
|
1550 |
#activeHelpKey: #editCut |
|
1551 |
#enabled: #isColumnSelected |
|
1552 |
#labelImage: #(#ResourceRetriever nil #cutIcon) |
|
1553 |
) |
|
1554 |
#(#MenuItem |
|
1555 |
#label: 'Copy' |
|
1556 |
#isButton: true |
|
1557 |
#value: #doCopy |
|
1558 |
#activeHelpKey: #editCopy |
|
1559 |
#enabled: #isColumnSelected |
|
1560 |
#labelImage: #(#ResourceRetriever nil #copyIcon) |
|
332 | 1561 |
) |
1562 |
#(#MenuItem |
|
825 | 1563 |
#label: 'Paste' |
1564 |
#isButton: true |
|
1565 |
#value: #doPaste |
|
1566 |
#activeHelpKey: #editPaste |
|
1567 |
#enabled: #valueOfCanPaste |
|
1568 |
#labelImage: #(#ResourceRetriever nil #pasteIcon) |
|
1569 |
) |
|
1570 |
#(#MenuItem |
|
1571 |
#label: 'Delete' |
|
1572 |
#isButton: true |
|
1573 |
#value: #doDelete |
|
1574 |
#activeHelpKey: #editDelete |
|
1575 |
#enabled: #isColumnSelected |
|
1576 |
#labelImage: #(#ResourceRetriever nil #deleteIcon) |
|
1577 |
) |
|
1578 |
#(#MenuItem |
|
1579 |
#label: '' |
|
332 | 1580 |
) |
1581 |
#(#MenuItem |
|
825 | 1582 |
#label: 'Add Column' |
1583 |
#isButton: true |
|
1584 |
#value: #doCreateColumn |
|
1585 |
#activeHelpKey: #addColumn |
|
1586 |
#enabled: #columnIsNotEditing |
|
1587 |
#labelImage: #(#ResourceRetriever nil #newColumnIcon) |
|
1588 |
) |
|
1589 |
#(#MenuItem |
|
1590 |
#label: '' |
|
1591 |
) |
|
1592 |
#(#MenuItem |
|
1593 |
#label: 'Move Up' |
|
1594 |
#isButton: true |
|
1595 |
#value: #doMoveColumn: |
|
1596 |
#activeHelpKey: #editMoveUp |
|
1597 |
#enabled: #isColumnSelected |
|
1598 |
#argument: #up |
|
1599 |
#labelImage: #(#ResourceRetriever nil #upIcon) |
|
1600 |
) |
|
1601 |
#(#MenuItem |
|
1602 |
#label: 'Move Down' |
|
1603 |
#isButton: true |
|
1604 |
#value: #doMoveColumn: |
|
1605 |
#activeHelpKey: #editMoveDown |
|
1606 |
#enabled: #isColumnSelected |
|
1607 |
#argument: #down |
|
1608 |
#labelImage: #(#ResourceRetriever nil #downIcon) |
|
332 | 1609 |
) |
1610 |
) nil |
|
1611 |
nil |
|
1612 |
) |
|
1613 |
! ! |
|
1614 |
||
408 | 1615 |
!DataSetBuilder class methodsFor:'resources'! |
1616 |
||
1617 |
newColumnIcon |
|
825 | 1618 |
"This resource specification was automatically generated |
1619 |
by the ImageEditor of ST/X." |
|
1620 |
||
1621 |
"Do not manually edit this!! If it is corrupted, |
|
1622 |
the ImageEditor may not be able to read the specification." |
|
1623 |
||
489 | 1624 |
" |
825 | 1625 |
self newColumnIcon inspect |
1626 |
ImageEditor openOnClass:self andSelector:#newColumnIcon |
|
489 | 1627 |
" |
408 | 1628 |
|
1629 |
<resource: #image> |
|
489 | 1630 |
|
1631 |
^Icon |
|
1632 |
constantNamed:#'DataSetBuilder newColumnIcon' |
|
825 | 1633 |
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') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; 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 | 1634 |
|
332 | 1635 |
!DataSetBuilder methodsFor:'accessing'! |
1636 |
||
1637 |
columns |
|
419 | 1638 |
"returns list of columns" |
1639 |
||
818 | 1640 |
^ columns |
332 | 1641 |
! |
1642 |
||
818 | 1643 |
columns:aListOfColumns |
419 | 1644 |
"setup columns from a column view" |
1645 |
||
332 | 1646 |
|list| |
1647 |
||
1648 |
columns := OrderedCollection new. |
|
1649 |
list := self seqList. |
|
1650 |
||
1651 |
list removeAll. |
|
1652 |
||
818 | 1653 |
aListOfColumns size ~~ 0 ifTrue:[ |
1654 |
aListOfColumns do:[:aColumn||column| |
|
1655 |
(column := aColumn) isSequenceable ifTrue:[ |
|
1656 |
column := DataSetColumnSpec new fromLiteralArrayEncoding:aColumn |
|
1657 |
] ifFalse:[ |
|
1658 |
column := aColumn copy |
|
1659 |
]. |
|
1660 |
columns add:column. |
|
825 | 1661 |
list add:(self labelFromColumn:column). |
332 | 1662 |
] |
818 | 1663 |
]. |
1664 |
self updateColumnView. |
|
1665 |
||
333 | 1666 |
! |
1667 |
||
1668 |
rowClassName |
|
419 | 1669 |
|
818 | 1670 |
^(Smalltalk resolveName:rowClass inClass:self class) notNil ifTrue:[rowClass] ifFalse:[nil] |
333 | 1671 |
! |
1672 |
||
1673 |
rowClassName:aClassName |
|
419 | 1674 |
|
333 | 1675 |
|cls| |
1676 |
||
818 | 1677 |
rowSuperClass := nil. |
333 | 1678 |
|
818 | 1679 |
(rowClass := aClassName) notNil ifTrue:[ |
825 | 1680 |
(cls := self resolveClassNamed) notNil |
818 | 1681 |
ifTrue: [rowSuperClass := cls superclass name asString] |
1682 |
ifFalse:[rowSuperClass := 'Object'] |
|
333 | 1683 |
] |
1684 |
||
332 | 1685 |
! ! |
1686 |
||
419 | 1687 |
!DataSetBuilder methodsFor:'aspects'! |
332 | 1688 |
|
419 | 1689 |
columnIsNotEditing |
1690 |
"returns a boolean value holder which is set to true if column is not editing" |
|
332 | 1691 |
|
419 | 1692 |
^builder valueAspectFor:#columnIsNotEditing initialValue: true |
332 | 1693 |
|
1694 |
||
1695 |
||
1696 |
! |
|
1697 |
||
419 | 1698 |
editorTypeList |
1699 |
"generate list of supported editor types" |
|
332 | 1700 |
|
1701 |
|list| |
|
1702 |
||
419 | 1703 |
(list := builder bindingAt:#editorTypeList) isNil |
1704 |
ifTrue: |
|
1705 |
[ |
|
332 | 1706 |
list := OrderedCollection new. |
419 | 1707 |
DataSetColumnSpec slices do: |
1708 |
[:aSlice||type| |
|
332 | 1709 |
type := aSlice at:1. |
419 | 1710 |
(list includes:type) ifFalse:[list add:type] |
332 | 1711 |
]. |
419 | 1712 |
builder aspectAt:#editorTypeList put:list |
332 | 1713 |
]. |
419 | 1714 |
^list |
332 | 1715 |
! |
1716 |
||
408 | 1717 |
isColumnSelected |
332 | 1718 |
"returns a boolean value holder which is set to true if something is modified |
419 | 1719 |
and not accepted" |
1720 |
||
1721 |
^builder valueAspectFor:#isColumnSelected initialValue: false |
|
332 | 1722 |
|
1723 |
||
1724 |
||
1725 |
! |
|
1726 |
||
1727 |
rendererTypeList |
|
419 | 1728 |
"generate list of supported renderer types" |
1729 |
||
332 | 1730 |
|list| |
1731 |
||
419 | 1732 |
(list := builder bindingAt:#rendererTypeList) isNil |
1733 |
ifTrue: |
|
1734 |
[ |
|
332 | 1735 |
list := OrderedCollection new. |
419 | 1736 |
DataSetColumnSpec slices do: |
1737 |
[:aSlice||type| |
|
332 | 1738 |
type := aSlice at:2. |
419 | 1739 |
(list includes:type) ifFalse:[list add:type] |
332 | 1740 |
]. |
419 | 1741 |
builder aspectAt:#rendererTypeList put:list |
332 | 1742 |
]. |
419 | 1743 |
^list |
332 | 1744 |
! |
1745 |
||
1746 |
selectedColumnModel |
|
419 | 1747 |
"returns a value holder which keeps selected column" |
332 | 1748 |
|
1749 |
|holder| |
|
1750 |
||
1751 |
(holder := builder bindingAt:#selectedColumnModel) isNil ifTrue:[ |
|
1752 |
holder := AspectAdaptor new subject:self; forAspect:#selectedColumnIndex. |
|
1753 |
builder aspectAt:#selectedColumnModel put:holder. |
|
1754 |
]. |
|
1755 |
^ holder |
|
1756 |
! |
|
1757 |
||
1758 |
seqList |
|
1759 |
||
1760 |
|list| |
|
1761 |
||
1762 |
(list := builder bindingAt:#seqList) isNil ifTrue:[ |
|
1763 |
builder aspectAt:#seqList put:(list := List new). |
|
1764 |
]. |
|
1765 |
^ list |
|
1766 |
! |
|
1767 |
||
1768 |
specChannel |
|
1769 |
||
1770 |
|holder| |
|
1771 |
||
1772 |
(holder := builder bindingAt:#specChannel) isNil ifTrue:[ |
|
1773 |
builder aspectAt:#specChannel put:(holder := ValueHolder new). |
|
1774 |
]. |
|
1775 |
^ holder |
|
1776 |
! |
|
1777 |
||
391 | 1778 |
style |
419 | 1779 |
|
1780 |
^self aspectFor:#labelFont |
|
391 | 1781 |
! |
1782 |
||
332 | 1783 |
tabList |
1784 |
||
419 | 1785 |
^self class slices collect:[:aSlice|aSlice first] |
332 | 1786 |
|
1787 |
! ! |
|
1788 |
||
818 | 1789 |
!DataSetBuilder methodsFor:'building'! |
1790 |
||
1791 |
buildFromClass:aClass andSelector:aSelector |
|
825 | 1792 |
|
1793 |
|updateBlock cls list| |
|
1794 |
||
1795 |
selectedColumnIndex := 0. |
|
1796 |
||
1797 |
updateBlock := [ |
|
1798 |
columns notEmpty ifTrue: [ |
|
1799 |
self tabModel value: 0. |
|
1800 |
self tabModel value: 1. |
|
1801 |
self selectedColumnModel value: nil. |
|
1802 |
self selectedColumnModel value: 1. |
|
1803 |
self updateColumnView. |
|
1804 |
self updateInputFields. |
|
1805 |
self updateInfoLabel. |
|
1806 |
self updateHistory |
|
1807 |
] |
|
1808 |
]. |
|
1809 |
||
1810 |
"if opened on table columns" |
|
1811 |
||
1812 |
aClass isNil ifTrue: [ |
|
1813 |
self tabModel value: 0. |
|
1814 |
self columns removeAll. |
|
1815 |
self seqList removeAll. |
|
1816 |
self updateColumnView. |
|
1817 |
self updateInfoLabel. |
|
1818 |
self specChannel value:nil. |
|
1819 |
self isColumnSelected value: false. |
|
1820 |
^self |
|
1821 |
]. |
|
1822 |
||
1823 |
specSelector isNil ifTrue: [updateBlock value. ^self]. |
|
818 | 1824 |
|
1825 |
list := nil. |
|
1826 |
||
1827 |
(aClass notNil or:[self isStandAlone or:[self window shown]]) ifTrue:[ |
|
1828 |
||
1829 |
(aClass notNil and:[aSelector notNil]) ifTrue:[ |
|
1830 |
cls := self resolveName:aClass. |
|
1831 |
||
1832 |
(cls respondsTo:aSelector) ifTrue:[ |
|
1833 |
list := cls perform:aSelector |
|
1834 |
] |
|
1835 |
] |
|
1836 |
] ifFalse:[ |
|
1837 |
list := columns |
|
1838 |
]. |
|
825 | 1839 |
self columns:list. |
1840 |
updateBlock value |
|
1841 |
||
818 | 1842 |
! |
1843 |
||
1844 |
buildFromResourceSpec:aResourceSpec |
|
1845 |
||
825 | 1846 |
self columns:aResourceSpec. |
1847 |
||
1848 |
columns notEmpty ifTrue: [ |
|
1849 |
self tabModel value: 1. |
|
1850 |
self selectedColumnModel value: nil. |
|
1851 |
self selectedColumnModel value: 1. |
|
1852 |
self updateInputFields. |
|
1853 |
self updateInfoLabel. |
|
1854 |
self updateHistory |
|
1855 |
] |
|
818 | 1856 |
! ! |
1857 |
||
332 | 1858 |
!DataSetBuilder methodsFor:'change & update'! |
1859 |
||
1860 |
update:something with:aParameter from:someObject |
|
419 | 1861 |
"one of my aspects has changed; update modified channel" |
413 | 1862 |
|
825 | 1863 |
super update:something with:aParameter from:someObject. |
1864 |
||
600 | 1865 |
self columnIsNotEditing value: false |
1866 |
||
332 | 1867 |
! ! |
1868 |
||
1869 |
!DataSetBuilder methodsFor:'code generation'! |
|
1870 |
||
1871 |
compile:aCode forClass:aClass inCategory:aCategory |
|
419 | 1872 |
"compile method for class in a category" |
1873 |
||
332 | 1874 |
ByteCodeCompiler compile:aCode withCRs forClass:aClass inCategory:aCategory |
1875 |
! |
|
1876 |
||
380 | 1877 |
generateBackgroundSelectorIn:aClass |
419 | 1878 |
"generate code for #backgroundSelector" |
1879 |
||
380 | 1880 |
|sel catg code bCode| |
1881 |
||
391 | 1882 |
catg := 'accessing look' asSymbol. |
380 | 1883 |
code := '\' |
1884 |
, ' "automatically generated by DataSetBuilder ..."\' |
|
1885 |
, '\' |
|
1886 |
, ' "specific background color for a cell"\' |
|
1887 |
, '\' |
|
1888 |
. |
|
1889 |
||
419 | 1890 |
columns do: |
1891 |
[:aColumn| |
|
1892 |
((sel := aColumn backgroundSelector) notNil and:[(aClass implements:sel) not]) |
|
1893 |
ifTrue: |
|
1894 |
[ |
|
1895 |
bCode := sel asString, code, ' ^nil'. |
|
380 | 1896 |
self compile:bCode forClass:aClass inCategory:catg |
1897 |
] |
|
1898 |
] |
|
1899 |
||
1900 |
||
1901 |
! |
|
1902 |
||
332 | 1903 |
generateChoicesIn:aClass |
419 | 1904 |
"generate code for #choices" |
1905 |
||
332 | 1906 |
|sel catg code| |
1907 |
||
391 | 1908 |
catg := 'accessing menu' asSymbol. |
332 | 1909 |
code := '\' |
1910 |
, ' "automatically generated by DataSetBuilder ..."\' |
|
1911 |
, '\' |
|
1912 |
, ' "get choices for visual editor; (a list of labels)\' |
|
1913 |
, '\' |
|
419 | 1914 |
, ' ^nil' |
332 | 1915 |
. |
1916 |
||
419 | 1917 |
columns do: |
1918 |
[:aColumn| |
|
1919 |
(aColumn canSelect |
|
1920 |
and:[aColumn rendererType ~~ #rowSelector |
|
1921 |
and:[(sel := aColumn choices) notNil |
|
1922 |
and:[(aClass implements:sel) not]]]) |
|
1923 |
ifTrue: |
|
1924 |
[ |
|
332 | 1925 |
self compile:(sel asString, code) forClass:aClass inCategory:catg |
1926 |
] |
|
1927 |
] |
|
1928 |
! |
|
1929 |
||
391 | 1930 |
generateDoubleClickSelectorIn:aClass |
419 | 1931 |
"generate code for #foregroundSelector" |
1932 |
||
391 | 1933 |
|sel catg code bCode| |
1934 |
||
1935 |
catg := 'accessing action' asSymbol. |
|
1936 |
code := '\' |
|
1937 |
, ' "automatically generated by DataSetBuilder ..."\' |
|
1938 |
, '\' |
|
1939 |
, ' "specific selector to be called on double click"\' |
|
1940 |
, '\' |
|
1941 |
. |
|
1942 |
||
419 | 1943 |
columns do: |
1944 |
[:aColumn| |
|
1945 |
((sel := aColumn doubleClickedSelector) notNil |
|
1946 |
and:[(aClass implements:sel) not]) |
|
1947 |
ifTrue: |
|
1948 |
[ |
|
391 | 1949 |
bCode := sel asString, code. |
1950 |
self compile:bCode forClass:aClass inCategory:catg |
|
1951 |
] |
|
1952 |
] |
|
1953 |
||
1954 |
||
1955 |
! |
|
1956 |
||
380 | 1957 |
generateForegroundSelectorIn:aClass |
1958 |
"generate code for #foregroundSelector |
|
1959 |
" |
|
1960 |
|sel catg code bCode| |
|
1961 |
||
391 | 1962 |
catg := 'accessing look' asSymbol. |
380 | 1963 |
code := '\' |
1964 |
, ' "automatically generated by DataSetBuilder ..."\' |
|
1965 |
, '\' |
|
1966 |
, ' "specific foreground color for a cell"\' |
|
1967 |
, '\' |
|
1968 |
. |
|
1969 |
||
419 | 1970 |
columns do: |
1971 |
[:aColumn| |
|
1972 |
((sel := aColumn foregroundSelector) notNil |
|
1973 |
and:[(aClass implements:sel) not]) |
|
1974 |
ifTrue: |
|
1975 |
[ |
|
1976 |
bCode := sel asString, code, ' ^nil'. |
|
380 | 1977 |
self compile:bCode forClass:aClass inCategory:catg |
1978 |
] |
|
1979 |
] |
|
1980 |
||
1981 |
||
1982 |
! |
|
1983 |
||
332 | 1984 |
generateMenuIn:aClass |
419 | 1985 |
"generate code for #menu" |
1986 |
||
332 | 1987 |
|sel catg code| |
1988 |
||
391 | 1989 |
catg := 'accessing menu' asSymbol. |
332 | 1990 |
code := '\' |
1991 |
, ' "automatically generated by DataSetBuilder ..."\' |
|
1992 |
, '\' |
|
1993 |
, ' "get middleButton menu for selected cell in column"\' |
|
1994 |
, '\' |
|
419 | 1995 |
, ' ^nil' |
332 | 1996 |
. |
1997 |
||
419 | 1998 |
columns do: |
1999 |
[:aColumn| |
|
2000 |
(aColumn canSelect |
|
2001 |
and:[(sel := aColumn menu) notNil |
|
2002 |
and:[(aClass implements:sel) not]]) |
|
2003 |
ifTrue: |
|
2004 |
[ |
|
332 | 2005 |
self compile:(sel asString, code) forClass:aClass inCategory:catg |
2006 |
] |
|
2007 |
] |
|
2008 |
! |
|
2009 |
||
2010 |
generatePrintSelectorIn:aClass |
|
419 | 2011 |
"generate code for #printSelector" |
2012 |
||
332 | 2013 |
|sel catg code| |
2014 |
||
391 | 2015 |
catg := 'accessing' asSymbol. |
332 | 2016 |
code := 'aGC\' |
2017 |
, ' "automatically generated by DataSetBuilder ..."\' |
|
2018 |
, '\' |
|
2019 |
, ' "get drawable image or text on a gc"\' |
|
2020 |
, '\' |
|
419 | 2021 |
, ' ^nil' |
332 | 2022 |
. |
2023 |
||
419 | 2024 |
columns do: |
2025 |
[:aColumn| |
|
2026 |
(aColumn rendererType ~~ #rowSelector |
|
2027 |
and:[(sel := aColumn printSelector) notNil |
|
2028 |
and:[(aClass implements:sel) not]]) |
|
2029 |
ifTrue: |
|
2030 |
[ |
|
332 | 2031 |
self compile:(sel asString, code) forClass:aClass inCategory:catg |
2032 |
] |
|
2033 |
] |
|
2034 |
! |
|
2035 |
||
2036 |
generateReadSelectorIn:aClass |
|
419 | 2037 |
"generate code for #readSelector" |
2038 |
||
332 | 2039 |
|sel catg code bCode| |
2040 |
||
391 | 2041 |
catg := 'accessing' asSymbol. |
332 | 2042 |
code := '\' |
2043 |
, ' "automatically generated by DataSetBuilder ..."\' |
|
2044 |
, '\' |
|
2045 |
, ' "get value"\' |
|
2046 |
, '\' |
|
2047 |
. |
|
2048 |
||
419 | 2049 |
columns do: |
2050 |
[:aColumn| |
|
2051 |
(aColumn rendererType ~~ #rowSelector |
|
2052 |
and:[(sel := aColumn readSelector) notNil |
|
2053 |
and:[(aClass implements:sel) not]]) |
|
2054 |
ifTrue: |
|
2055 |
[ |
|
2056 |
(aColumn printSelector isNil or:[aColumn canSelect]) |
|
2057 |
ifTrue: |
|
2058 |
[ |
|
2059 |
sel numArgs == 0 |
|
2060 |
ifTrue: [bCode := sel asString, code] |
|
2061 |
ifFalse:[bCode := sel asString, 'anIndex\', code]. |
|
2062 |
aColumn rendererType == #CheckToggle |
|
2063 |
ifFalse:[bCode := bCode, ' ^nil'] |
|
2064 |
ifTrue: [bCode := bCode, ' ^true']. |
|
332 | 2065 |
self compile:bCode forClass:aClass inCategory:catg |
2066 |
] |
|
2067 |
] |
|
2068 |
] |
|
2069 |
! |
|
2070 |
||
377 | 2071 |
generateSelectSelectorIn:aClass |
2072 |
"generate code for #selectSelector |
|
2073 |
" |
|
2074 |
|sel catg code bCode| |
|
2075 |
||
391 | 2076 |
catg := 'accessing selection' asSymbol. |
377 | 2077 |
code := '\' |
2078 |
, ' "automatically generated by DataSetBuilder ..."\' |
|
2079 |
, '\' |
|
2080 |
, ' "can select cell in column"\' |
|
2081 |
, '\' |
|
2082 |
. |
|
2083 |
||
419 | 2084 |
columns do: |
2085 |
[:aColumn| |
|
2086 |
(aColumn rendererType ~~ #rowSelector |
|
377 | 2087 |
and:[(sel := aColumn selectSelector) notNil |
419 | 2088 |
and:[(aClass implements:sel) not]]) |
2089 |
ifTrue: |
|
2090 |
[ |
|
2091 |
aColumn canSelect |
|
2092 |
ifTrue: |
|
2093 |
[ |
|
2094 |
bCode := sel asString, code, ' ^true'. |
|
377 | 2095 |
self compile:bCode forClass:aClass inCategory:catg |
2096 |
] |
|
2097 |
] |
|
2098 |
] |
|
2099 |
! |
|
2100 |
||
332 | 2101 |
generateWriteSelectorIn:aClass |
419 | 2102 |
"generate code for #writeSelector" |
2103 |
||
379 | 2104 |
|sel catg code bCode sz| |
332 | 2105 |
|
391 | 2106 |
catg := 'accessing' asSymbol. |
332 | 2107 |
code := 'aValue\' |
2108 |
, ' "automatically generated by DataSetBuilder ..."\' |
|
2109 |
, '\' |
|
2110 |
, ' "set value"\' |
|
2111 |
. |
|
2112 |
||
419 | 2113 |
columns do: |
2114 |
[:aColumn| |
|
2115 |
((sel := aColumn writeSelector) notNil |
|
2116 |
and:[aColumn canSelect |
|
2117 |
and:[(aClass implements:sel) not]]) |
|
2118 |
ifTrue: |
|
2119 |
[ |
|
2120 |
sel numArgs == 1 |
|
2121 |
ifTrue: |
|
2122 |
[ |
|
379 | 2123 |
bCode := sel asString |
419 | 2124 |
] |
2125 |
ifFalse: |
|
2126 |
[ |
|
379 | 2127 |
sz := sel indexOf:$:. |
2128 |
bCode := sel copyTo:sz. |
|
419 | 2129 |
bCode := bCode, 'anIndex ', (sel copyFrom:sz + 1) |
379 | 2130 |
]. |
2131 |
self compile:(bCode, code) forClass:aClass inCategory:catg |
|
332 | 2132 |
] |
2133 |
] |
|
2134 |
! ! |
|
2135 |
||
2136 |
!DataSetBuilder methodsFor:'initialization'! |
|
2137 |
||
2138 |
initialize |
|
825 | 2139 |
"initializes" |
332 | 2140 |
|
2141 |
super initialize. |
|
2142 |
||
825 | 2143 |
selectedColumnIndex := 0. |
2144 |
columns := OrderedCollection new. |
|
2145 |
modalOpened := false |
|
2146 |
||
332 | 2147 |
|
2148 |
! ! |
|
2149 |
||
2150 |
!DataSetBuilder methodsFor:'private'! |
|
2151 |
||
825 | 2152 |
askForListModification |
2153 |
"asks for resource modification" |
|
408 | 2154 |
|
825 | 2155 |
modalOpened |
2156 |
ifFalse: |
|
408 | 2157 |
[ |
825 | 2158 |
^super askForListModification |
408 | 2159 |
]. |
2160 |
^true |
|
2161 |
||
2162 |
! |
|
2163 |
||
818 | 2164 |
labelFromColumn:aColumn |
2165 |
||
825 | 2166 |
^ aColumn rendererType == #rowSelector |
2167 |
ifFalse:[aColumn label] |
|
2168 |
ifTrue: ['Row Selector']. |
|
332 | 2169 |
! |
2170 |
||
2171 |
updateColumnView |
|
825 | 2172 |
"updates column view from column descriptions" |
2173 |
||
2174 |
columnView notNil ifTrue:[ |
|
2175 |
|previewColumns columnItems columnList| |
|
2176 |
columnList := List new. |
|
2177 |
previewColumns := columns deepCopy. |
|
2178 |
columns notEmpty |
|
2179 |
ifTrue: |
|
2180 |
[ |
|
2181 |
previewColumns do: |
|
2182 |
[:column| |
|
2183 |
column readSelector: #at:. |
|
2184 |
column writeSelector: #at:put:. |
|
2185 |
column backgroundSelector:nil. |
|
2186 |
column foregroundSelector:nil. |
|
2187 |
column selectSelector: nil. |
|
2188 |
column doubleClickedSelector: nil. |
|
2189 |
column printSelector: nil. |
|
2190 |
column menu: nil |
|
2191 |
]. |
|
2192 |
#('1' '2' '...' 'x') do: |
|
2193 |
[:suffix| |
|
2194 |
columnItems := Array new: previewColumns size. |
|
2195 |
1 to: previewColumns size do: [:i| columnItems at: i put: (previewColumns at: i) label ? 'Cell', suffix]. |
|
2196 |
columnList add: columnItems. |
|
2197 |
] |
|
2198 |
]. |
|
2199 |
columnView list: #(). |
|
2200 |
columnView columnDescriptors: previewColumns. |
|
2201 |
columnView list: columnList. |
|
2202 |
] |
|
419 | 2203 |
! |
2204 |
||
2205 |
updateInputFields |
|
825 | 2206 |
"reloads item value into input fields" |
419 | 2207 |
|
2208 |
|column| |
|
2209 |
||
2210 |
(column := self selectedColumn) isNil |
|
2211 |
ifTrue: |
|
2212 |
[ |
|
2213 |
self tabModel value:0. |
|
2214 |
] |
|
2215 |
ifFalse: |
|
2216 |
[ |
|
600 | 2217 |
aspects keysAndValuesDo:[:aKey :aModel|aModel value:(column perform:aKey) withoutNotifying: self]. |
825 | 2218 |
tabSelection == 0 ifTrue:[self tabModel value:1] |
419 | 2219 |
] |
332 | 2220 |
! ! |
2221 |
||
2222 |
!DataSetBuilder methodsFor:'selection'! |
|
2223 |
||
2224 |
selectedColumn |
|
419 | 2225 |
"returns selected column or nil" |
2226 |
||
2227 |
^selectedColumnIndex == 0 |
|
825 | 2228 |
ifFalse:[columns at:selectedColumnIndex ifAbsent: nil] |
419 | 2229 |
ifTrue: [nil] |
332 | 2230 |
! |
2231 |
||
2232 |
selectedColumnIndex |
|
419 | 2233 |
"returns selected column index or 0" |
2234 |
||
2235 |
^selectedColumnIndex |
|
332 | 2236 |
! |
2237 |
||
2238 |
selectedColumnIndex:something |
|
825 | 2239 |
"changes selected column and update specifications" |
419 | 2240 |
|
2241 |
something == selectedColumnIndex |
|
2242 |
ifFalse: |
|
2243 |
[ |
|
332 | 2244 |
selectedColumnIndex := something ? 0. |
408 | 2245 |
self isColumnSelected value: true |
419 | 2246 |
] |
332 | 2247 |
|
2248 |
! |
|
2249 |
||
825 | 2250 |
tabSelection:something |
2251 |
"changes selected tab and set corresponding specification" |
|
419 | 2252 |
|
332 | 2253 |
|specSelector| |
2254 |
||
825 | 2255 |
something == tabSelection ifTrue:[^self]. |
419 | 2256 |
self selectedColumn isNil |
2257 |
ifTrue: |
|
2258 |
[ |
|
825 | 2259 |
tabSelection == 0 ifTrue:[^self]. |
2260 |
tabSelection := 0 |
|
419 | 2261 |
] |
2262 |
ifFalse: |
|
2263 |
[ |
|
825 | 2264 |
(tabSelection := something) ~~ 0 |
2265 |
ifTrue: [specSelector := (self class slices at:tabSelection) last] |
|
332 | 2266 |
]. |
825 | 2267 |
self specChannel value:specSelector. |
2268 |
(self window notNil and: [self window shown]) ifTrue: [self updateFonts] |
|
332 | 2269 |
|
2270 |
! ! |
|
2271 |
||
408 | 2272 |
!DataSetBuilder methodsFor:'startup / release'! |
2273 |
||
825 | 2274 |
openModalOnResourceSpec: aListSpec |
2275 |
"sets the modalOpened flag, so later, |
|
2276 |
there is no need to ask for saving into a class" |
|
419 | 2277 |
|
825 | 2278 |
modalOpened := true. |
2279 |
||
2280 |
super openModalOnResourceSpec: aListSpec |
|
2281 |
||
2282 |
||
409 | 2283 |
! |
2284 |
||
408 | 2285 |
postBuildWith:builder |
2286 |
||
818 | 2287 |
columnView := self builder componentAt:#columnView. |
2288 |
columnView labelView enabled:false. |
|
2289 |
||
408 | 2290 |
super postBuildWith:builder. |
2291 |
||
818 | 2292 |
(builder componentAt: #labelAndColumns) |
825 | 2293 |
selectConditionBlock: [:i|self askForItemModification]; |
419 | 2294 |
action: [:i|self cancel]; |
818 | 2295 |
selection: 1. |
408 | 2296 |
|
2297 |
||
825 | 2298 |
|
408 | 2299 |
! ! |
2300 |
||
419 | 2301 |
!DataSetBuilder methodsFor:'user actions'! |
2302 |
||
2303 |
accept |
|
2304 |
"accept changes made" |
|
2305 |
||
2306 |
|column type| |
|
2307 |
||
825 | 2308 |
super accept. |
419 | 2309 |
|
2310 |
(column := self selectedColumn) isNil ifTrue: [^self cancel]. |
|
2311 |
||
2312 |
type := (aspects at:#rendererType) value. |
|
2313 |
||
818 | 2314 |
type == #rowSelector ifTrue:[ |
419 | 2315 |
#(label width minWidth editorType choices readSelector writeSelector printSelector |
818 | 2316 |
formatString type size height canSelect selectSelector |
2317 |
) do:[:aKey| |
|
2318 |
(aspects at:aKey) value:nil |
|
2319 |
] |
|
419 | 2320 |
]. |
2321 |
aspects keysAndValuesDo:[:aKey :aModel| column perform:(aKey , ':') asSymbol with: aModel value]. |
|
818 | 2322 |
self seqList at:selectedColumnIndex put:(self labelFromColumn:column). |
419 | 2323 |
self updateColumnView. |
825 | 2324 |
self cancel. |
2325 |
modified := true. |
|
2326 |
||
419 | 2327 |
! |
2328 |
||
2329 |
cancel |
|
2330 |
"remove all changes and reload selected column values" |
|
2331 |
||
2332 |
self updateInputFields. |
|
421 | 2333 |
self valueOfEnablingCommitButtons value:false. |
419 | 2334 |
self columnIsNotEditing value: true. |
2335 |
! |
|
2336 |
||
818 | 2337 |
doBrowseRowClass |
419 | 2338 |
"browse class of columns spec" |
2339 |
||
2340 |
|cls| |
|
2341 |
||
825 | 2342 |
(cls := self resolveClassNamed) notNil |
419 | 2343 |
ifTrue: [SystemBrowser openInClass:cls] |
2344 |
ifFalse:[self information:'No class defined!!'] |
|
2345 |
||
2346 |
||
2347 |
||
2348 |
! |
|
2349 |
||
825 | 2350 |
doCopy |
419 | 2351 |
"copy selected column to the clipboard" |
2352 |
||
2353 |
|idx| |
|
2354 |
||
2355 |
(idx := selectedColumnIndex) ~~ 0 |
|
2356 |
ifTrue: |
|
2357 |
[ |
|
2358 |
self clipboard: (columns at: idx) deepCopy |
|
2359 |
] |
|
2360 |
! |
|
2361 |
||
2362 |
doCreateColumn |
|
2363 |
"create a new column after selected column or at left (nothing selected)" |
|
2364 |
||
2365 |
|label list| |
|
2366 |
||
2367 |
list := self seqList. |
|
554 | 2368 |
label := 'Column ', (list size + 1) printString. |
419 | 2369 |
columns add:(DataSetColumnSpec label:label selector:nil) afterIndex:selectedColumnIndex. |
2370 |
self seqList add:label afterIndex:selectedColumnIndex. |
|
421 | 2371 |
self valueOfEnablingCommitButtons value ifFalse:[self selectedColumnModel value:selectedColumnIndex + 1]. |
818 | 2372 |
self cancel. |
825 | 2373 |
self updateColumnView. |
2374 |
modified := true. |
|
419 | 2375 |
|
2376 |
! |
|
2377 |
||
825 | 2378 |
doCut |
419 | 2379 |
"remove selected column and put it to the clipboard" |
2380 |
||
2381 |
|idx| |
|
2382 |
||
825 | 2383 |
((idx := selectedColumnIndex) ~~ 0 and: [self askForItemModification]) |
419 | 2384 |
ifTrue: |
2385 |
[ |
|
2386 |
self selectedColumnModel value:0. |
|
2387 |
self clipboard: (columns at: idx). |
|
2388 |
columns removeIndex:idx. |
|
2389 |
self seqList removeIndex:idx. |
|
555 | 2390 |
columns size > 0 ifTrue: [self selectedColumnModel value: ((idx - 1) max: 1)]. |
556 | 2391 |
self updateColumnView. |
555 | 2392 |
self updateInputFields. |
419 | 2393 |
columns isEmpty ifTrue: [self isColumnSelected value: false]. |
555 | 2394 |
self cancel. |
825 | 2395 |
modified := true. |
419 | 2396 |
] |
2397 |
! |
|
2398 |
||
818 | 2399 |
doDefineRowClass |
419 | 2400 |
"launch a dialog to define class and superclass" |
2401 |
||
2402 |
|aspects cls oldClass oldSuper| |
|
2403 |
||
2404 |
aspects := IdentityDictionary new. |
|
818 | 2405 |
oldClass := rowClass. |
2406 |
oldSuper := rowSuperClass. |
|
419 | 2407 |
|
2408 |
[true] |
|
2409 |
whileTrue: |
|
2410 |
[ |
|
818 | 2411 |
rowClass notNil |
419 | 2412 |
ifTrue: |
2413 |
[ |
|
825 | 2414 |
(cls := self resolveClassNamed) notNil |
419 | 2415 |
ifTrue: |
2416 |
[ |
|
818 | 2417 |
rowSuperClass := cls superclass name asString |
419 | 2418 |
]. |
818 | 2419 |
aspects at:#classNameChannel put:rowClass asValue |
419 | 2420 |
] |
2421 |
ifFalse: |
|
2422 |
[ |
|
2423 |
aspects at:#classNameChannel put:'DSVRow' asValue |
|
2424 |
]. |
|
2425 |
||
818 | 2426 |
rowSuperClass notNil |
2427 |
ifTrue: [aspects at:#superclassNameChannel put:rowSuperClass asValue] |
|
419 | 2428 |
ifFalse:[aspects at:#superclassNameChannel put:'Object' asValue]. |
2429 |
||
2430 |
(self openDialogInterface:#defineClassNameSpec withBindings:aspects) |
|
2431 |
ifFalse: |
|
2432 |
[ |
|
818 | 2433 |
rowClass := oldClass. |
2434 |
rowSuperClass := oldSuper. |
|
419 | 2435 |
^self |
2436 |
]. |
|
818 | 2437 |
rowClass := ((aspects at:#classNameChannel) value) withoutSeparators. |
2438 |
rowSuperClass := ((aspects at:#superclassNameChannel) value) withoutSeparators. |
|
419 | 2439 |
|
818 | 2440 |
rowClass size == 0 |
419 | 2441 |
ifTrue: |
2442 |
[ |
|
818 | 2443 |
rowClass := nil. |
419 | 2444 |
self information:'no valid className' |
2445 |
] |
|
2446 |
ifFalse: |
|
2447 |
[ |
|
825 | 2448 |
cls := self resolveClassNamed. |
419 | 2449 |
|
2450 |
cls notNil ifTrue:[cls := cls superclass name asString]. |
|
2451 |
||
818 | 2452 |
rowSuperClass size == 0 |
419 | 2453 |
ifTrue: |
2454 |
[ |
|
2455 |
cls notNil ifTrue:[ |
|
818 | 2456 |
rowSuperClass := cls |
419 | 2457 |
] ifFalse:[ |
818 | 2458 |
rowSuperClass := 'Object' |
419 | 2459 |
]. |
2460 |
self information: 'set superclassName' |
|
2461 |
] |
|
2462 |
ifFalse: |
|
2463 |
[ |
|
825 | 2464 |
(cls isNil or:[rowSuperClass = cls]) ifTrue:[^self]. |
818 | 2465 |
self information:('A global named ' , rowClass , ' exists,\' , |
2466 |
'but is not a subclass of ' , rowSuperClass, '.\\' , |
|
419 | 2467 |
'Check and try again if that is not what you want.') withCRs. |
2468 |
||
818 | 2469 |
rowSuperClass := cls |
419 | 2470 |
] |
2471 |
] |
|
2472 |
] |
|
2473 |
! |
|
2474 |
||
825 | 2475 |
doDelete |
2476 |
"remove selected column and put it to the clipboard" |
|
2477 |
||
2478 |
|idx| |
|
2479 |
||
2480 |
((idx := selectedColumnIndex) ~~ 0 and: [self askForItemModification]) |
|
2481 |
ifTrue: |
|
2482 |
[ |
|
2483 |
self selectedColumnModel value:0. |
|
2484 |
columns removeIndex:idx. |
|
2485 |
self seqList removeIndex:idx. |
|
2486 |
columns size > 0 ifTrue: [self selectedColumnModel value: ((idx - 1) max: 1)]. |
|
2487 |
self updateColumnView. |
|
2488 |
self updateInputFields. |
|
2489 |
columns isEmpty ifTrue: [self isColumnSelected value: false]. |
|
2490 |
self cancel. |
|
2491 |
modified := true. |
|
2492 |
] |
|
2493 |
! |
|
2494 |
||
419 | 2495 |
doGenerateCode |
2496 |
"generate code for column values" |
|
2497 |
||
2498 |
|cls superclass| |
|
2499 |
||
818 | 2500 |
rowClass isNil ifTrue:[^self information:'No class defined!!']. |
825 | 2501 |
cls := self resolveClassNamed. |
419 | 2502 |
|
2503 |
cls isNil |
|
2504 |
ifTrue: |
|
2505 |
[ |
|
818 | 2506 |
superclass := Smalltalk resolveName:rowSuperClass inClass:self class. |
419 | 2507 |
|
2508 |
superclass isNil ifTrue:[^self information:'No superclass defined!!']. |
|
818 | 2509 |
(self confirm:'create ' , rowClass , ' ?') ifFalse:[^self]. |
2510 |
cls := superclass subclass:rowClass asSymbol |
|
419 | 2511 |
instanceVariableNames:'' |
2512 |
classVariableNames:'' |
|
2513 |
poolDictionaries:'' |
|
2514 |
category:'Applications'. |
|
2515 |
]. |
|
2516 |
||
2517 |
self generateChoicesIn:cls. |
|
2518 |
self generateMenuIn:cls. |
|
2519 |
self generatePrintSelectorIn:cls. |
|
2520 |
self generateReadSelectorIn:cls. |
|
2521 |
self generateBackgroundSelectorIn:cls. |
|
2522 |
self generateForegroundSelectorIn:cls. |
|
2523 |
self generateSelectSelectorIn:cls. |
|
2524 |
self generateWriteSelectorIn:cls. |
|
2525 |
self generateDoubleClickSelectorIn:cls. |
|
2526 |
! |
|
2527 |
||
2528 |
doMoveColumn:upOrDown |
|
2529 |
"move selected column up or down" |
|
2530 |
||
2531 |
|idx list label col size| |
|
2532 |
||
2533 |
(idx := selectedColumnIndex) == 0 ifTrue:[^self]. |
|
2534 |
list := self seqList. |
|
2535 |
size := list size. |
|
2536 |
||
2537 |
size == 1 ifTrue:[^self]. |
|
2538 |
selectedColumnIndex := 0. |
|
2539 |
label := list at:idx. |
|
2540 |
col := columns at:idx. |
|
2541 |
list removeIndex:idx. |
|
2542 |
columns removeIndex:idx. |
|
2543 |
||
2544 |
upOrDown == #up |
|
2545 |
ifTrue: |
|
2546 |
[ |
|
2547 |
idx == 1 ifTrue:[idx := size] |
|
2548 |
ifFalse:[idx := idx - 1] |
|
2549 |
] |
|
2550 |
ifFalse: |
|
2551 |
[ |
|
2552 |
idx == size ifTrue:[idx := 1] |
|
2553 |
ifFalse:[idx := idx + 1] |
|
2554 |
]. |
|
2555 |
columns add:col beforeIndex:idx. |
|
2556 |
list add:label beforeIndex:idx. |
|
2557 |
self selectedColumnModel value:idx. |
|
2558 |
self updateColumnView. |
|
2559 |
! |
|
2560 |
||
825 | 2561 |
doPaste |
419 | 2562 |
"paste clipboard copy column after selected column or at left (nothing selected)" |
2563 |
||
818 | 2564 |
|col lbl| |
419 | 2565 |
|
825 | 2566 |
self askForItemModification ifFalse: [^nil]. |
818 | 2567 |
col := self class clipboard deepCopy. |
2568 |
lbl := self labelFromColumn:col. |
|
2569 |
||
2570 |
columns add:col afterIndex:selectedColumnIndex. |
|
2571 |
self seqList add:lbl afterIndex:selectedColumnIndex. |
|
419 | 2572 |
|
818 | 2573 |
self valueOfEnablingCommitButtons value ifFalse:[ |
2574 |
self selectedColumnModel value:selectedColumnIndex + 1 |
|
2575 |
]. |
|
419 | 2576 |
self updateColumnView. |
556 | 2577 |
self updateInputFields. |
825 | 2578 |
modified := true. |
2579 |
||
818 | 2580 |
! |
2581 |
||
2582 |
doPickColumns |
|
2583 |
||
2584 |
|view cls| |
|
2585 |
||
2586 |
view := Screen current viewFromUser. |
|
2587 |
cls := view class. |
|
2588 |
||
2589 |
(cls == DSVColumnView or:[cls == DataSetView or:[cls == DSVLabelView]]) ifTrue:[ |
|
2590 |
self columns:(view columnView columnDescriptors) |
|
2591 |
] |
|
2592 |
! |
|
2593 |
||
2594 |
doSave |
|
2595 |
|cls dst spc idx category mthd excla code resourceType| |
|
2596 |
||
2597 |
(columns size ~~ 0 and:[super doSave]) ifFalse:[ |
|
2598 |
^ nil |
|
2599 |
]. |
|
2600 |
cls := self resolveName:specClass. |
|
2601 |
dst := columns collect:[:aCol| aCol literalArrayEncoding ]. |
|
2602 |
spc := WriteStream on:String new. |
|
2603 |
UISpecification prettyPrintSpecArray:dst asArray on:spc indent:4. |
|
2604 |
spc := spc contents. |
|
2605 |
idx := (spc indexOfNonSeparatorStartingAt:1) - 2. |
|
2606 |
||
2607 |
spc at:idx put:$^. |
|
2608 |
||
2609 |
"/ if that method already exists, do not overwrite the category |
|
2610 |
||
2611 |
resourceType := self class resourceType. |
|
2612 |
category := resourceType, ' specs'. |
|
2613 |
||
2614 |
(mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[ |
|
2615 |
category := mthd category. |
|
2616 |
]. |
|
2617 |
||
2618 |
excla := Character excla asString. |
|
2619 |
||
2620 |
code := excla |
|
2621 |
, (cls name , ' class methodsFor:' , category storeString) |
|
2622 |
, excla , '\\' |
|
2623 |
||
2624 |
, specSelector , '\' |
|
2625 |
, (self class codeGenerationComment replChar:$!! withString:'!!!!') |
|
2626 |
, '\\ "\' |
|
2627 |
, (' DataSetBuilder new openOnClass:' , cls name , ' andSelector:#' , specSelector , '\') |
|
2628 |
, ' "\'. |
|
2629 |
||
2630 |
code := code |
|
2631 |
, '\' |
|
2632 |
, ' <resource: #', resourceType, '>\\' |
|
2633 |
, spc |
|
2634 |
, '\' |
|
2635 |
, (excla , ' ' , excla) |
|
2636 |
, '\\'. |
|
2637 |
||
2638 |
code := code withCRs. |
|
2639 |
(ReadStream on:code) fileIn. |
|
2640 |
||
2641 |
"/ self isStandAlone ifTrue: [self helpTool installHelpSpecsOnClass:self specClass]. |
|
2642 |
||
2643 |
self updateHistory. |
|
2644 |
self updateInfoLabel. |
|
2645 |
||
2646 |
hasSaved := true. |
|
2647 |
modified := false. |
|
2648 |
||
419 | 2649 |
! ! |
2650 |
||
332 | 2651 |
!DataSetBuilder class methodsFor:'documentation'! |
2652 |
||
2653 |
version |
|
2654 |
^ '$Header$' |
|
2655 |
! ! |