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