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