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