DataSetBuilder.st
author Claus Gittinger <cg@exept.de>
Sat, 21 Jul 2012 18:58:03 +0200
changeset 2898 c7f6c498df6a
parent 2840 3fc46b951a0f
child 2903 8470507f8cd8
permissions -rw-r--r--
category of:15 methods
     1 "
     2  COPYRIGHT (c) 1997 by eXept Software AG
     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 "{ Package: 'stx:libtool2' }"
    13 
    14 ResourceSpecEditor subclass:#DataSetBuilder
    15 	instanceVariableNames:'rowClass rowSuperClass columnView columns selectedColumnIndex
    16 		modalOpened listOfSpecViews listOfItemsView editingSpecOnly
    17 		acceptedColumns'
    18 	classVariableNames:''
    19 	poolDictionaries:''
    20 	category:'Interface-UIPainter'
    21 !
    22 
    23 Array variableSubclass:#Row
    24 	instanceVariableNames:''
    25 	classVariableNames:''
    26 	poolDictionaries:''
    27 	privateIn:DataSetBuilder
    28 !
    29 
    30 !DataSetBuilder class methodsFor:'documentation'!
    31 
    32 copyright
    33 "
    34  COPYRIGHT (c) 1997 by eXept Software AG
    35               All Rights Reserved
    36 
    37  This software is furnished under a license and may be used
    38  only in accordance with the terms of that license and with the
    39  inclusion of the above copyright notice.   This software may not
    40  be provided or otherwise made available to, or used by, any
    41  other person.  No title to or ownership of the software is
    42  hereby transferred.
    43 "
    44 
    45 
    46 
    47 
    48 !
    49 
    50 documentation
    51 "
    52     create and modify or inspect dataset columns; used by UIPainter (DataSetColumnSpec)
    53 
    54     [see also:]
    55         DataSetColumnSpec
    56         DataSetSpec
    57         DataSetView
    58         DataSetColumn
    59 
    60     [author:]
    61         Claus Atzkern, eXept Software AG
    62 "
    63 
    64 ! !
    65 
    66 !DataSetBuilder class methodsFor:'accessing'!
    67 
    68 resourceType
    69     "get the type of resource of the method generated by the MenuEditor"
    70 
    71     ^#tableColumns
    72 
    73 
    74 ! !
    75 
    76 !DataSetBuilder class methodsFor:'aspects'!
    77 
    78 aspects
    79     "get the aspects for the attributes of the table columns"
    80 
    81     ^#(
    82         id
    83         activeHelpKey
    84         activeHelpKeyForLabel
    85         label
    86         canSelect
    87         choices
    88         translatedChoices
    89         editorType
    90         formatString
    91         formatSelector
    92         labelIsImage
    93         labelButtonType
    94         translateLabel
    95         longStringCompression
    96         size
    97         type
    98         width
    99         minWidth
   100         usePreferredWidth
   101         isResizeable
   102         height
   103         menu
   104         menuFromApplication
   105         foregroundSelector
   106         backgroundSelector
   107         selectedForegroundSelector
   108         selectedBackgroundSelector
   109         doubleClickedSelector
   110         rowSeparatorSelector
   111         selectSelector
   112         converterSelector
   113         showComboFieldSelector
   114         printSelector
   115         readSelector
   116         writeSelector
   117         visibilitySelector
   118         rendererType
   119         showColSeparator
   120         showSelectionHighLighted
   121         showRowSeparator
   122         backgroundColor
   123         foregroundColor
   124         selectedBackgroundColor
   125         selectedForegroundColor
   126         labelForegroundColor
   127         labelBackgroundColor
   128         labelFont
   129         labelActionSelector
   130         labelActionArgument
   131         labelAlignment
   132         columnAlignment
   133         minValue
   134         maxValue
   135         isSortable
   136         sortSelector
   137         sortBlockSelector
   138      )
   139 
   140     "Modified: / 25-10-2010 / 10:31:51 / cg"
   141 ! !
   142 
   143 !DataSetBuilder class methodsFor:'help specs'!
   144 
   145 flyByHelpSpec
   146     "This resource specification was automatically generated
   147      by the UIHelpTool of ST/X."
   148 
   149     "Do not manually edit this!! If it is corrupted,
   150      the UIHelpTool may not be able to read the specification."
   151 
   152     "
   153      UIHelpTool openOnClass:DataSetBuilder    
   154     "
   155 
   156     <resource: #help>
   157 
   158     ^ super flyByHelpSpec addPairsFrom:#(
   159 
   160 #addColumn
   161 'Add a Column'
   162 
   163 #addNonSelectableColumn
   164 'Add a Non-Selectable Column'
   165 
   166 #fileLoad
   167 'Load Column Description from Method'
   168 
   169 #fileNew
   170 'New Column Description'
   171 
   172 #fileSave
   173 'Save the Column Description'
   174 
   175 #fileSaveMethod
   176 'Save Column Description as Method'
   177 
   178 #fileSaveAsMethod
   179 'Save Column Description as Method (ask for Class/Selector)'
   180 
   181 #editCut
   182 'Cut Column'
   183 
   184 #editCopy
   185 'Copy Column'
   186 
   187 #editPaste
   188 'Paste Column'
   189 
   190 )
   191 !
   192 
   193 helpSpec
   194     "This resource specification was automatically generated
   195      by the UIHelpTool of ST/X."
   196 
   197     "Do not manually edit this!! If it is corrupted,
   198      the UIHelpTool may not be able to read the specification."
   199 
   200     "
   201      UIHelpTool openOnClass:DataSetBuilder    
   202     "
   203 
   204     <resource: #help>
   205 
   206     ^ super helpSpec addPairsFrom:#(
   207 
   208 #addColumn
   209 'Adds a new column.'
   210 
   211 #addNonSelectableColumn
   212 'Adds a new non-selectable column.'
   213 
   214 #basicsEditor
   215 'Default widget type or a selector returning an instance of a user defined widget opened in the cell.'
   216 
   217 #basicsFont
   218 'Sets the font of the labeled text.'
   219 
   220 #basicsJustification
   221 'Aligns the label to the left, right, or center in the cell.'
   222 
   223 #basicsJustificationEditor
   224 'Aligns the column editor to the left, right, or center in the cell.'
   225 
   226 #basicsLabel
   227 'The label of the column, a String or an array of Strings.'
   228 
   229 #basicsLabelId
   230 'Unique identifier of the column (optional).'
   231 
   232 #basicsLabelIsImage
   233 'Label is actually the selector of a message providing an image-label.'
   234 
   235 #basicsLabelTranslate
   236 'Translate the label via the resource mechanism to a national language string.'
   237 
   238 #basicsRenderer
   239 'Specifies displaying cell as Text, CheckToggle, ComboBox, ComboList or as a RowSelector.'
   240 
   241 #browseRowClass
   242 'Open a browser on the row class'
   243 
   244 #colorsBackgroundCellColor
   245 'The background color of the cell.'
   246 
   247 #colorsBackgroundLabelColor
   248 'The background color of the label.'
   249 
   250 #colorsBackgroundSelector
   251 'Optional selector returning the background color for the cell (with optional row/column args).'
   252 
   253 #colorsForegroundCellColor
   254 'The foreground color of the cell (with optional row/column args).'
   255 
   256 #colorsForegroundLabelColor
   257 'The foreground color of the label.'
   258 
   259 #colorsForegroundSelector
   260 'Optional selector returning the foreground color for a cell.'
   261 
   262 #converterSelector
   263 'Selector returning a TypeConverter on the model the argument or nil.'
   264 
   265 #fileLoad
   266 'Specify class/selector and edit that column description'
   267 
   268 #fileNew
   269 'Discard changes and continue with a new, empty column description'
   270 
   271 #fileSave
   272 'Install the column description'
   273 
   274 #fileSaveAs
   275 'Specify class/selector and install the column description'
   276 
   277 #formatFormatSelector
   278 'Selector sent to the row to get the format string.'
   279 
   280 #formatInputType
   281 'A type converter symbol used by the input field.'
   282 
   283 #formatMaxSize
   284 'Maximum size of the string which can be typed in. 0 or nil means unlimited.'
   285 
   286 #formatTextFormat
   287 'Format string specifying the output format of the cell text. (printf-format - for example: %5.4f gives 0.0000).'
   288 
   289 #frameColumnWidth
   290 'Width (fixed or relative) of a column (optional).'
   291 
   292 #frameMinWidth
   293 'Minimum width of the column (optional).'
   294 
   295 #frameRowHeight
   296 'Height of the row (optional).'
   297 
   298 #frameShowColumnSeparator
   299 'Turns on/off displaying column separators.'
   300 
   301 #frameShowRowSeparator
   302 'Turns on/off displaying row separators.'
   303 
   304 #frameShowRowSeparatorSelector
   305 'Message selector to test if the bottom separator is shown.'
   306 
   307 #generateCode
   308 'Generate code and install in the selected class/selector.'
   309 
   310 #isResizable
   311 'Column can be resized by user.'
   312 
   313 #isSortable
   314 'Adds indicator to allow user to sort rows based on this column.'
   315 
   316 #pickColumns
   317 'Select an open view and readOut the column specification from it.'
   318 
   319 #selectedBackgroundCellColor
   320 'Optional background color of a selected cell.'
   321 
   322 #selectedBackgroundCellColorSelector
   323 'Optional selector returning the background color for a selected cell.'
   324 
   325 #selectedForegroundCellColor
   326 'Optional foreground color of a selected cell.'
   327 
   328 #selectedForegroundCellColorSelector
   329 'Optional selector returning the foreground color for a selected cell.'
   330 
   331 #selectionCellClickSelector
   332 'Message sent if cell is about to be selected - return boolean to en/disable editing'
   333 
   334 #selectionCellDoubleClickSelector
   335 'Message sent if cell is double clicked'
   336 
   337 #selectionCellSelector
   338 'Name of the message sent to the row to validate a selection.'
   339 
   340 #selectionIsSelectable
   341 'Turns on/off selection behavior of a column.'
   342 
   343 #selectionLabelClickSelector
   344 'Message sent if a columns label was clicked on'
   345 
   346 #selectionLabelSelectorArgument
   347 'An optional argument passed with the message above.'
   348 
   349 #showComboFieldSelector
   350 'Selector which returns true if the editor on the ComboBox/List has an input field.'
   351 
   352 #showSelectionHighLighted
   353 'Show selected cell highligthened (change fg/bg color).'
   354 
   355 #sortBlockSelector
   356 'Sent to the row to retrieve a selector which is sent to the application to provide a block for sorting.'
   357 
   358 #sortSelector
   359 'Sent to the row to extract the value used for sorting. If a block is returned, that one is used as sortBlock.'
   360 
   361 #usePreferredWidth
   362 'Compute width from first 10 row items.'
   363 
   364 #valuesChoicesSelector
   365 'Selector to get a collection of choices for a cell having a ComboBox or a ComboList widget.'
   366 
   367 #valuesMenuFromApplication
   368 'Fetch the menu from the application (instead of the row)'
   369 
   370 #valuesMenuSelector
   371 'Selector to retrieve the middle button menu.'
   372 
   373 #valuesPrintSelector
   374 'Selector used to register images on a DSVColumnView (the arg). For more detailed info see #register... methods in DSVColumnView.'
   375 
   376 #valuesReadSelector
   377 'Selector returning the label to be displayed (string, bitmap or a collection).'
   378 
   379 #valuesVisibilitySelector
   380 'Boolean message selector controlling the columns visibility.'
   381 
   382 #valuesWriteSelector
   383 'Selector used to set the value derived from the editor.'
   384 
   385 #valuesXChoicesSelector
   386 'Selector to get a collection of translated choices for a cell having a ComboBox or a ComboList widget.'
   387 
   388 )
   389 
   390     "Modified: / 01-04-2011 / 16:23:39 / cg"
   391 ! !
   392 
   393 !DataSetBuilder class methodsFor:'image specs'!
   394 
   395 newColumnIcon
   396     "This resource specification was automatically generated
   397      by the ImageEditor of ST/X."
   398 
   399     "Do not manually edit this!! If it is corrupted,
   400      the ImageEditor may not be able to read the specification."
   401 
   402     "
   403      self newColumnIcon inspect
   404      ImageEditor openOnClass:self andSelector:#newColumnIcon
   405      Icon flushCachedIcons
   406     "
   407 
   408     <resource: #image>
   409 
   410     ^Icon
   411         constantNamed:#'DataSetBuilder class newColumnIcon'
   412         ifAbsentPut:[(Depth2Image new) width: 19; height: 22; photometric:(#palette); bitsPerSample:(#[2]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
   413 U@@@@EQTUUUXUEQ***1TUF (+EQTX*H,UEQ"("1TUF (+EQTZ**,UEQ"("1TUFJ"KEQTX*H,UEQ HB1TUF**+EQTZ**,UEQ"H"1TUF@ KEQTX"@,UEQ"H"1T
   414 UF**+EQTZ**,UER???1TU@@@@EPb') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 19; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@') ; yourself); yourself]
   415 !
   416 
   417 newColumnNonSelectableIcon
   418     "This resource specification was automatically generated
   419      by the ImageEditor of ST/X."
   420 
   421     "Do not manually edit this!! If it is corrupted,
   422      the ImageEditor may not be able to read the specification."
   423 
   424     "
   425      self newColumnNonSelectableIcon inspect
   426      ImageEditor openOnClass:self andSelector:#newColumnNonSelectableIcon
   427      Icon flushCachedIcons
   428     "
   429 
   430     <resource: #image>
   431 
   432     ^Icon
   433         constantNamed:#'DataSetBuilder class newColumnNonSelectableIcon'
   434         ifAbsentPut:[(Depth2Image new) width: 19; height: 22; photometric:(#palette); bitsPerSample:(#[2]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
   435 U@@@@EQTUUUXUEQ***1TUF**+EQTX*(,UEQ"*"1TUFB(KEQTZJ",UEQ(HJ1TUF("+EQTZ J,UEQ*@*1TUF("+EQTZBB,UEQ(*J1TUFB(KEQTX*(,UEQ"*"1T
   436 UF**+EQTZ**,UER???1TU@@@@EPb') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 19; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@') ; yourself); yourself]
   437 ! !
   438 
   439 !DataSetBuilder class methodsFor:'interface specs'!
   440 
   441 basicsEditSpec
   442     "This resource specification was automatically generated
   443      by the UIPainter of ST/X."
   444 
   445     "Do not manually edit this!! If it is corrupted,
   446      the UIPainter may not be able to read the specification."
   447 
   448     "
   449      UIPainter new openOnClass:DataSetBuilder andSelector:#basicsEditSpec
   450      DataSetBuilder new openInterface:#basicsEditSpec
   451     "
   452 
   453     <resource: #canvas>
   454 
   455     ^ 
   456      #(FullSpec
   457         name: basicsEditSpec
   458         window: 
   459        (WindowSpec
   460           label: 'DataSet Basic'
   461           name: 'DataSet Basic'
   462           min: (Point 10 10)
   463           bounds: (Rectangle 0 0 389 473)
   464         )
   465         component: 
   466        (SpecCollection
   467           collection: (
   468            (VerticalPanelViewSpec
   469               name: 'VerticalPanel1'
   470               layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   471               horizontalLayout: fit
   472               verticalLayout: top
   473               horizontalSpace: 3
   474               verticalSpace: 3
   475               component: 
   476              (SpecCollection
   477                 collection: (
   478                  (FramedBoxSpec
   479                     label: 'Header:'
   480                     name: 'headerFrame'
   481                     labelPosition: topLeft
   482                     translateLabel: true
   483                     component: 
   484                    (SpecCollection
   485                       collection: (
   486                        (LabelSpec
   487                           label: 'ID:'
   488                           name: 'idLabel'
   489                           layout: (AlignmentOrigin 94 0 14 0 1 0.5)
   490                           translateLabel: true
   491                           resizeForLabel: true
   492                         )
   493                        (InputFieldSpec
   494                           name: 'idField'
   495                           layout: (LayoutFrame 97 0 0 0 2 1.0 22 0)
   496                           activeHelpKey: basicsLabelId
   497                           tabable: true
   498                           model: id
   499                           group: inputGroup
   500                           acceptOnLostFocus: false
   501                           acceptChannel: acceptChannel
   502                           modifiedChannel: modifiedChannel
   503                           acceptOnPointerLeave: false
   504                         )
   505                        (LabelSpec
   506                           label: 'Label:'
   507                           name: 'label1'
   508                           layout: (AlignmentOrigin 94 0 39 0 1 0.5)
   509                           translateLabel: true
   510                           resizeForLabel: true
   511                         )
   512                        (InputFieldSpec
   513                           name: 'labelField'
   514                           layout: (LayoutFrame 97 0 28 0 2 1.0 50 0)
   515                           activeHelpKey: basicsLabel
   516                           tabable: true
   517                           model: label
   518                           group: inputGroup
   519                           type: smalltalkObject
   520                           immediateAccept: false
   521                           acceptOnLeave: false
   522                           acceptOnLostFocus: false
   523                           acceptChannel: acceptChannel
   524                           modifiedChannel: modifiedChannel
   525                           acceptOnPointerLeave: false
   526                         )
   527                        (LabelSpec
   528                           label: 'Font:'
   529                           name: 'LabelFont'
   530                           layout: (AlignmentOrigin 94 0 68 0 1 0.5)
   531                           translateLabel: true
   532                           resizeForLabel: true
   533                           adjust: left
   534                         )
   535                        (FontMenuSpec
   536                           name: 'fontMenu'
   537                           layout: (LayoutFrame 97 0 56 0 0 1.0 78 0)
   538                           activeHelpKey: labelFont
   539                           model: style
   540                           allowSymbolicFonts: true
   541                         )
   542                        (LabelSpec
   543                           label: 'Type:'
   544                           name: 'Type'
   545                           layout: (AlignmentOrigin 52 0 100 0 1 0.5)
   546                           translateLabel: true
   547                           resizeForLabel: true
   548                           adjust: right
   549                         )
   550                        (ComboListSpec
   551                           name: 'labelButtonType'
   552                           layout: (LayoutFrame 57 0 91 0 158 0 111 0)
   553                           tabable: true
   554                           model: labelButtonType
   555                           comboList: 
   556                          (Array
   557                             None Button
   558                             Group
   559                           )
   560                           useIndex: false
   561                           hidePullDownMenuButton: false
   562                         )
   563                        (LabelSpec
   564                           label: 'Align:'
   565                           name: 'JustificationLabel'
   566                           layout: (AlignmentOrigin 243 0 100 0 1 0.5)
   567                           translateLabel: true
   568                           resizeForLabel: true
   569                           adjust: right
   570                         )
   571                        (PopUpListSpec
   572                           label: 'Alignment'
   573                           name: 'Alignment'
   574                           layout: (LayoutFrame 248 0 91 0 2 1.0 113 0)
   575                           activeHelpKey: basicsJustification
   576                           tabable: true
   577                           model: labelAlignment
   578                           menu: 
   579                          (Array
   580                             left right
   581                             center
   582                           )
   583                         )
   584                        (CheckBoxSpec
   585                           label: 'Label Is Image'
   586                           name: 'labelIsImage'
   587                           layout: (LayoutOrigin -3 0 120 0)
   588                           activeHelpKey: basicsLabelIsImage
   589                           tabable: true
   590                           model: labelIsImage
   591                           translateLabel: true
   592                         )
   593                        (CheckBoxSpec
   594                           label: 'Translate Label'
   595                           name: 'CheckBox2'
   596                           layout: (LayoutOrigin 200 0 120 0)
   597                           activeHelpKey: basicsLabelTranslate
   598                           tabable: true
   599                           model: translateLabel
   600                           translateLabel: true
   601                         )
   602                        )
   603                      
   604                     )
   605                     extent: (Point 389 176)
   606                   )
   607                  (FramedBoxSpec
   608                     label: 'Cell Type:'
   609                     name: 'typesFrame'
   610                     labelPosition: topLeft
   611                     translateLabel: true
   612                     component: 
   613                    (SpecCollection
   614                       collection: (
   615                        (LabelSpec
   616                           label: 'Renderer:'
   617                           name: 'rendererLabel'
   618                           layout: (AlignmentOrigin 94 0 16 0 1 0.5)
   619                           translateLabel: true
   620                           resizeForLabel: true
   621                         )
   622                        (ComboListSpec
   623                           name: 'rendererField'
   624                           layout: (LayoutFrame 97 0 5 0 2 1.0 27 0)
   625                           activeHelpKey: basicsRenderer
   626                           tabable: true
   627                           model: rendererType
   628                           comboList: rendererTypeList
   629                           useIndex: false
   630                           hidePullDownMenuButton: false
   631                         )
   632                        (LabelSpec
   633                           label: 'Editor:'
   634                           name: 'editorLabel'
   635                           layout: (AlignmentOrigin 94 0 42 0 1 0.5)
   636                           translateLabel: true
   637                           resizeForLabel: true
   638                         )
   639                        (ComboBoxSpec
   640                           name: 'editorField'
   641                           layout: (LayoutFrame 97 0 31 0 2 1.0 53 0)
   642                           activeHelpKey: basicsEditor
   643                           tabable: true
   644                           model: editorType
   645                           type: symbolOrNil
   646                           acceptOnLostFocus: false
   647                           acceptChannel: acceptChannel
   648                           modifiedChannel: modifiedChannel
   649                           acceptOnPointerLeave: false
   650                           comboList: editorTypeList
   651                           useIndex: false
   652                           isFilenameBox: false
   653                         )
   654                        (LabelSpec
   655                           label: 'Align:'
   656                           name: 'JustificationC'
   657                           layout: (LayoutFrame -194 1 58 0 -114 1 79 0)
   658                           translateLabel: true
   659                           resizeForLabel: true
   660                           adjust: right
   661                         )
   662                        (PopUpListSpec
   663                           label: 'Alignment'
   664                           name: 'AlignmentC'
   665                           layout: (LayoutFrame -115 1 58 0 2 1.0 80 0)
   666                           activeHelpKey: basicsJustificationEditor
   667                           tabable: true
   668                           model: columnAlignment
   669                           menu: 
   670                          (Array
   671                             left right
   672                             center decimal decimalRight
   673                           )
   674                         )
   675                        (CheckBoxSpec
   676                           label: 'Compress Long Strings'
   677                           name: 'LongStringCompressionCheckBox'
   678                           layout: (LayoutFrame -3 0 58 0 188 0 79 0)
   679                           activeHelpKey: basicsLabelTranslate
   680                           tabable: true
   681                           model: longStringCompression
   682                           translateLabel: true
   683                         )
   684                        )
   685                      
   686                     )
   687                     extent: (Point 389 114)
   688                   )
   689                  (FramedBoxSpec
   690                     label: 'Active Help:'
   691                     name: 'activeHelpFrame'
   692                     labelPosition: topLeft
   693                     translateLabel: true
   694                     component: 
   695                    (SpecCollection
   696                       collection: (
   697                        (LabelSpec
   698                           label: 'Key:'
   699                           name: 'Label1'
   700                           layout: (AlignmentOrigin 94 0 14 0 1 0.5)
   701                           translateLabel: true
   702                           resizeForLabel: true
   703                         )
   704                        (InputFieldSpec
   705                           name: 'EntryField1'
   706                           layout: (LayoutFrame 97 0 0 0 2 1.0 22 0)
   707                           activeHelpKey: basicsLabelId
   708                           tabable: true
   709                           model: activeHelpKey
   710                           group: inputGroup
   711                           acceptOnLostFocus: false
   712                           acceptChannel: acceptChannel
   713                           modifiedChannel: modifiedChannel
   714                           acceptOnPointerLeave: false
   715                         )
   716                        (LabelSpec
   717                           label: 'Key for Label:'
   718                           name: 'Label2'
   719                           layout: (AlignmentOrigin 94 0 42 0 1 0.5)
   720                           translateLabel: true
   721                           resizeForLabel: true
   722                         )
   723                        (InputFieldSpec
   724                           name: 'EntryField2'
   725                           layout: (LayoutFrame 97 0 28 0 2 1.0 50 0)
   726                           activeHelpKey: basicsLabelId
   727                           tabable: true
   728                           model: activeHelpKeyForLabel
   729                           group: inputGroup
   730                           acceptOnLostFocus: false
   731                           acceptChannel: acceptChannel
   732                           modifiedChannel: modifiedChannel
   733                           acceptOnPointerLeave: false
   734                         )
   735                        )
   736                      
   737                     )
   738                     extent: (Point 389 81)
   739                   )
   740                  )
   741                
   742               )
   743             )
   744            )
   745          
   746         )
   747       )
   748 !
   749 
   750 colorsEditSpec
   751     "This resource specification was automatically generated
   752      by the UIPainter of ST/X."
   753 
   754     "Do not manually edit this!! If it is corrupted,
   755      the UIPainter may not be able to read the specification."
   756 
   757     "
   758      UIPainter new openOnClass:DataSetBuilder andSelector:#colorsEditSpec
   759      DataSetBuilder new openInterface:#colorsEditSpec
   760     "
   761 
   762     <resource: #canvas>
   763 
   764     ^ 
   765      #(FullSpec
   766         name: colorsEditSpec
   767         window: 
   768        (WindowSpec
   769           label: 'DataSet Misc'
   770           name: 'DataSet Misc'
   771           min: (Point 10 10)
   772           bounds: (Rectangle 0 0 369 451)
   773         )
   774         component: 
   775        (SpecCollection
   776           collection: (
   777            (FramedBoxSpec
   778               label: 'Label Colors:'
   779               name: 'ColorsBox'
   780               layout: (LayoutFrame 0 0.0 3 0 0 1.0 86 0)
   781               labelPosition: topLeft
   782               translateLabel: true
   783               component: 
   784              (SpecCollection
   785                 collection: (
   786                  (LabelSpec
   787                     label: 'Foreground:'
   788                     name: 'label1'
   789                     layout: (AlignmentOrigin 112 0 14 0 1 0.5)
   790                     translateLabel: true
   791                     resizeForLabel: true
   792                     adjust: right
   793                   )
   794                  (ColorMenuSpec
   795                     name: 'colorMenu1'
   796                     layout: (LayoutFrame 115 0 2 0 -3 1.0 24 0)
   797                     activeHelpKey: colorsForegroundLabelColor
   798                     model: labelForegroundColor
   799                     labelsAreColored: true
   800                   )
   801                  (LabelSpec
   802                     label: 'Background:'
   803                     name: 'label2'
   804                     layout: (AlignmentOrigin 112 0 42 0 1 0.5)
   805                     translateLabel: true
   806                     resizeForLabel: true
   807                     adjust: right
   808                   )
   809                  (ColorMenuSpec
   810                     name: 'colorMenu2'
   811                     layout: (LayoutFrame 115 0 30 0 -3 1.0 52 0)
   812                     activeHelpKey: colorsBackgroundLabelColor
   813                     model: labelBackgroundColor
   814                     labelsAreColored: false
   815                   )
   816                  )
   817                
   818               )
   819             )
   820            (FramedBoxSpec
   821               label: 'Cell Colors:'
   822               name: 'defaultColorsBox'
   823               layout: (LayoutFrame 0 0.0 91 0 0 1.0 232 0)
   824               labelPosition: topLeft
   825               translateLabel: true
   826               component: 
   827              (SpecCollection
   828                 collection: (
   829                  (LabelSpec
   830                     label: 'Foreground:'
   831                     name: 'fgLabel'
   832                     layout: (AlignmentOrigin 112 0 11 0 1 0.5)
   833                     translateLabel: true
   834                     resizeForLabel: true
   835                     adjust: right
   836                   )
   837                  (ColorMenuSpec
   838                     name: 'fgMenu'
   839                     layout: (LayoutFrame 115 0 -1 0 -3 1.0 21 0)
   840                     activeHelpKey: colorsForegroundCellColor
   841                     model: foregroundColor
   842                     labelsAreColored: true
   843                   )
   844                  (LabelSpec
   845                     label: 'Background:'
   846                     name: 'bgLabel'
   847                     layout: (AlignmentOrigin 112 0 39 0 1 0.5)
   848                     translateLabel: true
   849                     resizeForLabel: true
   850                     adjust: right
   851                   )
   852                  (ColorMenuSpec
   853                     name: 'bgMenu'
   854                     layout: (LayoutFrame 115 0 27 0 -3 1.0 49 0)
   855                     activeHelpKey: colorsBackgroundCellColor
   856                     model: backgroundColor
   857                     labelsAreColored: false
   858                   )
   859                  (LabelSpec
   860                     label: 'FG-Selector:'
   861                     name: 'fgSelLabel'
   862                     layout: (AlignmentOrigin 112 0 73 0 1 0.5)
   863                     translateLabel: true
   864                     resizeForLabel: true
   865                     adjust: right
   866                   )
   867                  (InputFieldSpec
   868                     name: 'fgSelField'
   869                     layout: (LayoutFrame 115 0 62 0 0 1.0 84 0)
   870                     activeHelpKey: colorsForegroundSelector
   871                     tabable: true
   872                     model: foregroundSelector
   873                     group: inputGroup
   874                     type: symbolOrNil
   875                     acceptOnLostFocus: false
   876                     acceptChannel: acceptChannel
   877                     modifiedChannel: modifiedChannel
   878                     acceptOnPointerLeave: false
   879                   )
   880                  (LabelSpec
   881                     label: 'BG-Selector:'
   882                     name: 'bgSelLabel'
   883                     layout: (AlignmentOrigin 112 0 98 0 1 0.5)
   884                     translateLabel: true
   885                     resizeForLabel: true
   886                     adjust: right
   887                   )
   888                  (InputFieldSpec
   889                     name: 'bgSelField'
   890                     layout: (LayoutFrame 115 0 87 0 0 1.0 109 0)
   891                     activeHelpKey: colorsBackgroundSelector
   892                     tabable: true
   893                     model: backgroundSelector
   894                     group: inputGroup
   895                     type: symbolOrNil
   896                     acceptOnLostFocus: false
   897                     acceptChannel: acceptChannel
   898                     modifiedChannel: modifiedChannel
   899                     acceptOnPointerLeave: false
   900                   )
   901                  )
   902                
   903               )
   904             )
   905            (FramedBoxSpec
   906               label: 'Selected Cell Colors:'
   907               name: 'selectedCellColorsBox'
   908               layout: (LayoutFrame 0 0.0 236 0 0 1.0 377 0)
   909               labelPosition: topLeft
   910               translateLabel: true
   911               component: 
   912              (SpecCollection
   913                 collection: (
   914                  (LabelSpec
   915                     label: 'Foreground:'
   916                     name: 'selFgLabel'
   917                     layout: (AlignmentOrigin 112 0 11 0 1 0.5)
   918                     translateLabel: true
   919                     resizeForLabel: true
   920                     adjust: right
   921                   )
   922                  (ColorMenuSpec
   923                     name: 'selFgMenu'
   924                     layout: (LayoutFrame 115 0 -1 0 -3 1.0 21 0)
   925                     activeHelpKey: selectedForegroundCellColor
   926                     model: selectedForegroundColor
   927                     labelsAreColored: true
   928                   )
   929                  (LabelSpec
   930                     label: 'Background:'
   931                     name: 'selBgLabel'
   932                     layout: (AlignmentOrigin 112 0 39 0 1 0.5)
   933                     translateLabel: true
   934                     resizeForLabel: true
   935                     adjust: right
   936                   )
   937                  (ColorMenuSpec
   938                     name: 'selBgMenu'
   939                     layout: (LayoutFrame 115 0 27 0 -3 1.0 49 0)
   940                     activeHelpKey: colorsBackgroundCellColor
   941                     model: selectedBackgroundColor
   942                     labelsAreColored: false
   943                   )
   944                  (LabelSpec
   945                     label: 'FG-Selector:'
   946                     name: 'Label3'
   947                     layout: (AlignmentOrigin 112 0 73 0 1 0.5)
   948                     translateLabel: true
   949                     resizeForLabel: true
   950                     adjust: right
   951                   )
   952                  (InputFieldSpec
   953                     name: 'EntryField1'
   954                     layout: (LayoutFrame 115 0 62 0 0 1.0 84 0)
   955                     activeHelpKey: colorsForegroundSelector
   956                     tabable: true
   957                     model: selectedForegroundSelector
   958                     group: inputGroup
   959                     type: symbolOrNil
   960                     acceptOnLostFocus: false
   961                     acceptChannel: acceptChannel
   962                     modifiedChannel: modifiedChannel
   963                     acceptOnPointerLeave: false
   964                   )
   965                  (LabelSpec
   966                     label: 'BG-Selector:'
   967                     name: 'Label4'
   968                     layout: (AlignmentOrigin 112 0 98 0 1 0.5)
   969                     translateLabel: true
   970                     resizeForLabel: true
   971                     adjust: right
   972                   )
   973                  (InputFieldSpec
   974                     name: 'EntryField2'
   975                     layout: (LayoutFrame 115 0 87 0 0 1.0 109 0)
   976                     activeHelpKey: colorsBackgroundSelector
   977                     tabable: true
   978                     model: selectedBackgroundSelector
   979                     group: inputGroup
   980                     type: symbolOrNil
   981                     acceptOnLostFocus: false
   982                     acceptChannel: acceptChannel
   983                     modifiedChannel: modifiedChannel
   984                     acceptOnPointerLeave: false
   985                   )
   986                  )
   987                
   988               )
   989             )
   990            )
   991          
   992         )
   993       )
   994 
   995     "Modified: / 01-04-2011 / 16:26:37 / cg"
   996 !
   997 
   998 defineClassNameSpec
   999     "This resource specification was automatically generated
  1000      by the UIPainter of ST/X."
  1001 
  1002     "Do not manually edit this!! If it is corrupted,
  1003      the UIPainter may not be able to read the specification."
  1004 
  1005     "
  1006      UIPainter new openOnClass:DataSetBuilder andSelector:#defineClassNameSpec
  1007      DataSetBuilder new openInterface:#defineClassNameSpec
  1008     "
  1009 
  1010     <resource: #canvas>
  1011 
  1012     ^ 
  1013      #(FullSpec
  1014         name: defineClassNameSpec
  1015         window: 
  1016        (WindowSpec
  1017           label: 'Data Set Builder'
  1018           name: 'Data Set Builder'
  1019           min: (Point 10 10)
  1020           bounds: (Rectangle 14 46 341 182)
  1021         )
  1022         component: 
  1023        (SpecCollection
  1024           collection: (
  1025            (FramedBoxSpec
  1026               label: 'Class for code'
  1027               name: 'framedBox1'
  1028               layout: (LayoutFrame 0 0.0 3 0.0 0 1.0 -34 1.0)
  1029               labelPosition: topLeft
  1030               translateLabel: true
  1031             )
  1032            (LabelSpec
  1033               label: 'Class:'
  1034               name: 'classLabel'
  1035               layout: (AlignmentOrigin 73 0.11 38 0 1 0.5)
  1036               translateLabel: true
  1037               resizeForLabel: true
  1038               adjust: right
  1039             )
  1040            (InputFieldSpec
  1041               name: 'classNameInputField'
  1042               layout: (LayoutFrame 77 0.11 27 0 -16 1.0 49 0)
  1043               tabable: true
  1044               model: classNameChannel
  1045               acceptOnPointerLeave: false
  1046             )
  1047            (LabelSpec
  1048               label: 'Superclass:'
  1049               name: 'superClassLabel'
  1050               layout: (AlignmentOrigin 73 0.11 65 0 1 0.5)
  1051               translateLabel: true
  1052               resizeForLabel: true
  1053               adjust: right
  1054             )
  1055            (InputFieldSpec
  1056               name: 'superclassNameInputField'
  1057               layout: (LayoutFrame 76 0.11 55 0 -16 1.0 77 0)
  1058               tabable: true
  1059               model: superclassNameChannel
  1060               acceptOnPointerLeave: false
  1061             )
  1062            (UISubSpecification
  1063               name: 'SubSpecification'
  1064               layout: (LayoutFrame 0 0.0 -29 1 0 1.0 -5 1.0)
  1065               majorKey: ToolApplicationModel
  1066               minorKey: windowSpecForCommitWithoutChannels
  1067             )
  1068            )
  1069          
  1070         )
  1071       )
  1072 !
  1073 
  1074 formatEditSpec
  1075     "This resource specification was automatically generated
  1076      by the UIPainter of ST/X."
  1077 
  1078     "Do not manually edit this!! If it is corrupted,
  1079      the UIPainter may not be able to read the specification."
  1080 
  1081     "
  1082      UIPainter new openOnClass:DataSetBuilder andSelector:#formatEditSpec
  1083      DataSetBuilder new openInterface:#formatEditSpec
  1084     "
  1085 
  1086     <resource: #canvas>
  1087 
  1088     ^ 
  1089      #(FullSpec
  1090         name: formatEditSpec
  1091         window: 
  1092        (WindowSpec
  1093           label: 'DataSet Details'
  1094           name: 'DataSet Details'
  1095           min: (Point 10 10)
  1096           bounds: (Rectangle 0 0 388 149)
  1097         )
  1098         component: 
  1099        (SpecCollection
  1100           collection: (
  1101            (FramedBoxSpec
  1102               label: 'Column Format'
  1103               name: 'framedBox1'
  1104               layout: (LayoutFrame 0 0.0 3 0 0 1.0 149 0)
  1105               labelPosition: topLeft
  1106               translateLabel: true
  1107               component: 
  1108              (SpecCollection
  1109                 collection: (
  1110                  (LabelSpec
  1111                     label: 'Type:'
  1112                     name: 'typeLabel'
  1113                     layout: (AlignmentOrigin 115 0 26 0 1 0.5)
  1114                     translateLabel: true
  1115                     resizeForLabel: true
  1116                     activeHelpKey: formatInputType
  1117                   )
  1118                  (ComboListSpec
  1119                     name: 'typeCombo'
  1120                     layout: (LayoutFrame 118 0 15 0 3 1.0 37 0)
  1121                     activeHelpKey: formatInputType
  1122                     tabable: true
  1123                     model: type
  1124                     comboList: possiblePrintConverterTypes
  1125                     useIndex: false
  1126                     hidePullDownMenuButton: false
  1127                   )
  1128                  (LabelSpec
  1129                     label: 'Max Size:'
  1130                     name: 'sizeLabel'
  1131                     layout: (AlignmentOrigin 115 0 52 0 1 0.5)
  1132                     translateLabel: true
  1133                     resizeForLabel: true
  1134                     activeHelpKey: formatMaxSize
  1135                   )
  1136                  (InputFieldSpec
  1137                     name: 'sizeField'
  1138                     layout: (LayoutFrame 118 0 41 0 3 1.0 63 0)
  1139                     activeHelpKey: formatMaxSize
  1140                     tabable: true
  1141                     model: size
  1142                     group: inputGroup
  1143                     type: numberOrNil
  1144                     acceptOnLostFocus: false
  1145                     acceptChannel: acceptChannel
  1146                     modifiedChannel: modifiedChannel
  1147                     acceptOnPointerLeave: false
  1148                   )
  1149                  (LabelSpec
  1150                     label: 'Text Format:'
  1151                     name: 'formatLabel'
  1152                     layout: (AlignmentOrigin 115 0 77 0 1 0.5)
  1153                     translateLabel: true
  1154                     resizeForLabel: true
  1155                     activeHelpKey: formatTextFormat
  1156                   )
  1157                  (InputFieldSpec
  1158                     name: 'formatField'
  1159                     layout: (LayoutFrame 118 0 66 0 3 1.0 88 0)
  1160                     activeHelpKey: formatTextFormat
  1161                     tabable: true
  1162                     model: formatString
  1163                     group: inputGroup
  1164                     acceptOnLostFocus: false
  1165                     acceptChannel: acceptChannel
  1166                     modifiedChannel: modifiedChannel
  1167                     acceptOnPointerLeave: false
  1168                   )
  1169                  (LabelSpec
  1170                     label: 'Format Selector:'
  1171                     name: 'formatSelectorLabel'
  1172                     layout: (AlignmentOrigin 115 0 103 0 1 0.5)
  1173                     translateLabel: true
  1174                     resizeForLabel: true
  1175                     activeHelpKey: formatFormatSelector
  1176                   )
  1177                  (InputFieldSpec
  1178                     name: 'formatSelector'
  1179                     layout: (LayoutFrame 118 0 92 0 3 1.0 114 0)
  1180                     activeHelpKey: formatFormatSelector
  1181                     tabable: true
  1182                     model: formatSelector
  1183                     group: inputGroup
  1184                     acceptOnLostFocus: false
  1185                     acceptChannel: acceptChannel
  1186                     modifiedChannel: modifiedChannel
  1187                     acceptOnPointerLeave: false
  1188                   )
  1189                  )
  1190                
  1191               )
  1192             )
  1193            )
  1194          
  1195         )
  1196       )
  1197 !
  1198 
  1199 frameEditSpec
  1200     "This resource specification was automatically generated
  1201      by the UIPainter of ST/X."
  1202 
  1203     "Do not manually edit this!! If it is corrupted,
  1204      the UIPainter may not be able to read the specification."
  1205 
  1206     "
  1207      UIPainter new openOnClass:DataSetBuilder andSelector:#frameEditSpec
  1208      DataSetBuilder new openInterface:#frameEditSpec
  1209     "
  1210 
  1211     <resource: #canvas>
  1212 
  1213     ^ 
  1214      #(FullSpec
  1215         name: frameEditSpec
  1216         window: 
  1217        (WindowSpec
  1218           label: 'DataSet Dimension'
  1219           name: 'DataSet Dimension'
  1220           min: (Point 10 10)
  1221           bounds: (Rectangle 0 0 396 313)
  1222         )
  1223         component: 
  1224        (SpecCollection
  1225           collection: (
  1226            (FramedBoxSpec
  1227               label: 'Separators'
  1228               name: 'separatorBox'
  1229               layout: (LayoutFrame 0 0.0 3 0 0 1.0 132 0)
  1230               labelPosition: topLeft
  1231                     translateLabel: true
  1232               component: 
  1233              (SpecCollection
  1234                 collection: (
  1235                  (CheckBoxSpec
  1236                     label: 'Show Row-Separator'
  1237                     name: 'showRowSeparator'
  1238                     layout: (LayoutFrame 5 0 15 0 293 0 38 0)
  1239                     activeHelpKey: frameShowRowSeparator
  1240                     tabable: true
  1241                     model: showRowSeparator
  1242                     translateLabel: true
  1243                   )
  1244                  (InputFieldSpec
  1245                     name: 'rowSeparatorSelector'
  1246                     layout: (LayoutFrame 142 0 41 0 2 1.0 63 0)
  1247                     activeHelpKey: frameShowRowSeparatorSelector
  1248                     tabable: true
  1249                     model: rowSeparatorSelector
  1250                     group: inputGroup
  1251                     type: symbolOrNil
  1252                     acceptOnLostFocus: false
  1253                     acceptChannel: acceptChannel
  1254                     modifiedChannel: modifiedChannel
  1255                     acceptOnPointerLeave: false
  1256                   )
  1257                  (CheckBoxSpec
  1258                     label: 'Show Column-Separator'
  1259                     name: 'showColSeparator'
  1260                     layout: (LayoutFrame 5 0 70 0 294 0 93 0)
  1261                     activeHelpKey: frameShowColumnSeparator
  1262                     tabable: true
  1263                     model: showColSeparator
  1264                     translateLabel: true
  1265                   )
  1266                  (LabelSpec
  1267                     label: 'Selector:'
  1268                     name: 'Label1'
  1269                     layout: (LayoutFrame 80 0.0 44 0 140 0.0 61 0)
  1270                     resizeForLabel: true
  1271                     adjust: right
  1272                     translateLabel: true
  1273                   )
  1274                  )
  1275                
  1276               )
  1277             )
  1278            (FramedBoxSpec
  1279               label: 'Dimensions:'
  1280               name: 'framedBox1'
  1281               layout: (LayoutFrame 0 0.0 133 0 0 1.0 305 0)
  1282               labelPosition: topLeft
  1283                     translateLabel: true
  1284               component: 
  1285              (SpecCollection
  1286                 collection: (
  1287                  (LabelSpec
  1288                     label: 'Column Width:'
  1289                     name: 'widthLabel'
  1290                     layout: (AlignmentOrigin 140 0.0 23 0 1 0.5)
  1291                     resizeForLabel: true
  1292                     adjust: right
  1293                     translateLabel: true
  1294                   )
  1295                  (InputFieldSpec
  1296                     name: 'widthField'
  1297                     layout: (LayoutFrame 142 0 12 0 2 1.0 34 0)
  1298                     activeHelpKey: frameColumnWidth
  1299                     tabable: true
  1300                     model: width
  1301                     group: inputGroup
  1302                     type: numberOrNil
  1303                     acceptOnLostFocus: false
  1304                     acceptChannel: acceptChannel
  1305                     modifiedChannel: modifiedChannel
  1306                     acceptOnPointerLeave: false
  1307                   )
  1308                  (LabelSpec
  1309                     label: 'Min. Width:'
  1310                     name: 'minWidthLabel'
  1311                     layout: (AlignmentOrigin 140 0.0 51 0 1 0.5)
  1312                     resizeForLabel: true
  1313                     adjust: right
  1314                     translateLabel: true
  1315                   )
  1316                  (InputFieldSpec
  1317                     name: 'minWidthField'
  1318                     layout: (LayoutFrame 142 0 40 0 2 1.0 62 0)
  1319                     activeHelpKey: frameMinWidth
  1320                     tabable: true
  1321                     model: minWidth
  1322                     group: inputGroup
  1323                     type: numberOrNil
  1324                     acceptOnLostFocus: false
  1325                     acceptChannel: acceptChannel
  1326                     modifiedChannel: modifiedChannel
  1327                     acceptOnPointerLeave: false
  1328                   )
  1329                  (LabelSpec
  1330                     label: 'Row Height:'
  1331                     name: 'heightLabel'
  1332                     layout: (AlignmentOrigin 140 0.0 79 0 1 0.5)
  1333                     resizeForLabel: true
  1334                     adjust: right
  1335                     translateLabel: true
  1336                   )
  1337                  (InputFieldSpec
  1338                     name: 'heightField'
  1339                     layout: (LayoutFrame 142 0 68 0 2 1.0 90 0)
  1340                     activeHelpKey: frameRowHeight
  1341                     tabable: true
  1342                     model: height
  1343                     group: inputGroup
  1344                     type: numberOrNil
  1345                     acceptOnLostFocus: false
  1346                     acceptChannel: acceptChannel
  1347                     modifiedChannel: modifiedChannel
  1348                     acceptOnPointerLeave: false
  1349                   )
  1350                  (CheckBoxSpec
  1351                     label: 'Compute Width from Items'
  1352                     name: 'usePreferredWidth'
  1353                     layout: (LayoutFrame 5 0 96 0 -5 1 118 0)
  1354                     activeHelpKey: usePreferredWidth
  1355                     tabable: true
  1356                     model: usePreferredWidth
  1357                     translateLabel: true
  1358                   )
  1359                  (CheckBoxSpec
  1360                     label: 'Is Resizeable'
  1361                     name: 'isResizeable'
  1362                     layout: (LayoutFrame 5 0 121 0 -5 1.0 144 0)
  1363                     activeHelpKey: isResizeable
  1364                     tabable: true
  1365                     model: isResizeable
  1366                     translateLabel: true
  1367                   )
  1368                  )
  1369                
  1370               )
  1371             )
  1372            )
  1373          
  1374         )
  1375       )
  1376 !
  1377 
  1378 selectionEditSpec
  1379     "This resource specification was automatically generated
  1380      by the UIPainter of ST/X."
  1381 
  1382     "Do not manually edit this!! If it is corrupted,
  1383      the UIPainter may not be able to read the specification."
  1384 
  1385     "
  1386      UIPainter new openOnClass:DataSetBuilder andSelector:#selectionEditSpec
  1387      DataSetBuilder new openInterface:#selectionEditSpec
  1388     "
  1389 
  1390     <resource: #canvas>
  1391 
  1392     ^ 
  1393      #(FullSpec
  1394         name: selectionEditSpec
  1395         window: 
  1396        (WindowSpec
  1397           label: 'DataSet Basic'
  1398           name: 'DataSet Basic'
  1399           min: (Point 10 10)
  1400           bounds: (Rectangle 0 0 331 328)
  1401         )
  1402         component: 
  1403        (SpecCollection
  1404           collection: (
  1405            (FramedBoxSpec
  1406               label: 'Label Select Action:'
  1407               name: 'LabelSelectAction'
  1408               layout: (LayoutFrame 0 0.0 3 0 0 1.0 97 0)
  1409               labelPosition: topLeft
  1410                     translateLabel: true
  1411               component: 
  1412              (SpecCollection
  1413                 collection: (
  1414                  (LabelSpec
  1415                     label: 'Selector:'
  1416                     name: 'ActionLabel'
  1417                     layout: (AlignmentOrigin 95 0 20 0 1 0.5)
  1418                     resizeForLabel: true
  1419                     adjust: left
  1420                     translateLabel: true
  1421                   )
  1422                  (InputFieldSpec
  1423                     name: 'ActionSelector'
  1424                     layout: (LayoutFrame 98 0 9 0 3 1.0 31 0)
  1425                     activeHelpKey: selectionLabelClickSelector
  1426                     tabable: true
  1427                     model: labelActionSelector
  1428                     group: inputGroup
  1429                     type: symbolOrNil
  1430                     acceptOnLostFocus: false
  1431                     acceptChannel: acceptChannel
  1432                     modifiedChannel: modifiedChannel
  1433                     acceptOnPointerLeave: false
  1434                   )
  1435                  (LabelSpec
  1436                     label: 'Argument:'
  1437                     name: 'ArgumentLabel'
  1438                     layout: (AlignmentOrigin 95 0 48 0 1 0.5)
  1439                     resizeForLabel: true
  1440                     adjust: left
  1441                     translateLabel: true
  1442                   )
  1443                  (InputFieldSpec
  1444                     name: 'ArgumentValue'
  1445                     layout: (LayoutFrame 98 0 37 0 3 1.0 59 0)
  1446                     activeHelpKey: selectionLabelSelectorArgument
  1447                     tabable: true
  1448                     model: labelActionArgument
  1449                     group: inputGroup
  1450                     type: string
  1451                     acceptOnLostFocus: false
  1452                     acceptChannel: acceptChannel
  1453                     modifiedChannel: modifiedChannel
  1454                     acceptOnPointerLeave: false
  1455                   )
  1456                  )
  1457                
  1458               )
  1459             )
  1460            (FramedBoxSpec
  1461               label: 'Cell Selection:'
  1462               name: 'CellSelection'
  1463               layout: (LayoutFrame 0 0.0 105 0 0 1.0 215 0)
  1464               labelPosition: topLeft
  1465                     translateLabel: true
  1466               component: 
  1467              (SpecCollection
  1468                 collection: (
  1469                  (CheckBoxSpec
  1470                     label: 'Is Selectable'
  1471                     name: 'canSelect'
  1472                     layout: (Point 95 -4)
  1473                     activeHelpKey: selectionIsSelectable
  1474                     tabable: true
  1475                     model: canSelect
  1476                     translateLabel: true
  1477                   )
  1478                  (LabelSpec
  1479                     label: 'Selector:'
  1480                     name: 'selectorLabel'
  1481                     layout: (AlignmentOrigin 95 0 37 0 1 0.5)
  1482                     resizeForLabel: true
  1483                     adjust: right
  1484                     translateLabel: true
  1485                     activeHelpKey: selectionCellClickSelector
  1486                   )
  1487                  (InputFieldSpec
  1488                     name: 'selectSelector'
  1489                     layout: (LayoutFrame 98 0 26 0 3 1.0 48 0)
  1490                     activeHelpKey: selectionCellClickSelector
  1491                     tabable: true
  1492                     model: selectSelector
  1493                     group: inputGroup
  1494                     type: symbolOrNil
  1495                     acceptOnLostFocus: false
  1496                     acceptChannel: acceptChannel
  1497                     modifiedChannel: modifiedChannel
  1498                     acceptOnPointerLeave: false
  1499                   )
  1500                  (CheckBoxSpec
  1501                     label: 'Show Selection HighLightened'
  1502                     name: 'showSelectionHighLightened'
  1503                     layout: (LayoutFrame 95 0 53 0 3 1.0 77 0)
  1504                     activeHelpKey: showSelectionHighLighted
  1505                     tabable: true
  1506                     model: showSelectionHighLighted
  1507                     translateLabel: true
  1508                   )
  1509                  )
  1510                
  1511               )
  1512             )
  1513            (FramedBoxSpec
  1514               label: 'Cell Double Click:'
  1515               name: 'CellDoubleClick'
  1516               layout: (LayoutFrame 0 0.0 227 0 0 1.0 293 0)
  1517               labelPosition: topLeft
  1518                     translateLabel: true
  1519               component: 
  1520              (SpecCollection
  1521                 collection: (
  1522                  (LabelSpec
  1523                     label: 'Selector:'
  1524                     name: 'doubleLabel'
  1525                     layout: (AlignmentOrigin 95 0 19 0 1 0.5)
  1526                     resizeForLabel: true
  1527                     adjust: right
  1528                     translateLabel: true
  1529                     activeHelpKey: selectionCellDoubleClickSelector
  1530                   )
  1531                  (InputFieldSpec
  1532                     name: 'doubleClicked'
  1533                     layout: (LayoutFrame 98 0 8 0 3 1.0 30 0)
  1534                     activeHelpKey: selectionCellDoubleClickSelector
  1535                     tabable: true
  1536                     model: doubleClickedSelector
  1537                     group: inputGroup
  1538                     type: symbolOrNil
  1539                     acceptOnLostFocus: false
  1540                     acceptChannel: acceptChannel
  1541                     modifiedChannel: modifiedChannel
  1542                     acceptOnPointerLeave: false
  1543                   )
  1544                  )
  1545                
  1546               )
  1547             )
  1548            )
  1549          
  1550         )
  1551       )
  1552 
  1553     "Modified: / 25-10-2010 / 10:29:42 / cg"
  1554 !
  1555 
  1556 slices
  1557     ^#(
  1558         (Basics         basicsEditSpec)
  1559         (Values         valuesEditSpec)
  1560         (Format         formatEditSpec)
  1561         (Sort           sortEditSpec)
  1562         (Selection      selectionEditSpec)
  1563         (Frame          frameEditSpec)
  1564         (Colors         colorsEditSpec)
  1565     )
  1566 !
  1567 
  1568 sortEditSpec
  1569     "This resource specification was automatically generated
  1570      by the UIPainter of ST/X."
  1571 
  1572     "Do not manually edit this!! If it is corrupted,
  1573      the UIPainter may not be able to read the specification."
  1574 
  1575     "
  1576      UIPainter new openOnClass:DataSetBuilder andSelector:#sortEditSpec
  1577      DataSetBuilder new openInterface:#sortEditSpec
  1578     "
  1579 
  1580     <resource: #canvas>
  1581 
  1582     ^ 
  1583      #(FullSpec
  1584         name: sortEditSpec
  1585         window: 
  1586        (WindowSpec
  1587           label: 'DataSet Basic'
  1588           name: 'DataSet Basic'
  1589           min: (Point 10 10)
  1590           bounds: (Rectangle 0 0 430 473)
  1591         )
  1592         component: 
  1593        (SpecCollection
  1594           collection: (
  1595            (VerticalPanelViewSpec
  1596               name: 'VerticalPanel1'
  1597               layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
  1598               horizontalLayout: fit
  1599               verticalLayout: top
  1600               horizontalSpace: 3
  1601               verticalSpace: 3
  1602               component: 
  1603              (SpecCollection
  1604                 collection: (
  1605                  (FramedBoxSpec
  1606                     label: 'Sorting:'
  1607                     name: 'sortFrame'
  1608                     labelPosition: topLeft
  1609                     translateLabel: true
  1610                     component: 
  1611                    (SpecCollection
  1612                       collection: (
  1613                        (CheckBoxSpec
  1614                           label: 'Sortable'
  1615                           name: 'isSortable'
  1616                           layout: (LayoutOrigin -3 0 0 0)
  1617                           activeHelpKey: isSortable
  1618                           tabable: true
  1619                           model: isSortable
  1620                           translateLabel: true
  1621                         )
  1622                        (LabelSpec
  1623                           label: 'Sort Selector:'
  1624                           name: 'sortSelector'
  1625                           layout: (LayoutFrame 35 0 33 0 107 0 51 0)
  1626                           activeHelpKey: sortSelector
  1627                           translateLabel: true
  1628                           resizeForLabel: true
  1629                           adjust: right
  1630                         )
  1631                        (InputFieldSpec
  1632                           name: 'EntryField3'
  1633                           layout: (LayoutFrame 110 0 30 0 2 1 56 0)
  1634                           activeHelpKey: sortSelector
  1635                           enableChannel: isSortable
  1636                           tabable: true
  1637                           model: sortSelector
  1638                           group: inputGroup
  1639                           type: symbolOrNil
  1640                           immediateAccept: false
  1641                           acceptOnLeave: false
  1642                           acceptOnLostFocus: false
  1643                           acceptChannel: acceptChannel
  1644                           modifiedChannel: modifiedChannel
  1645                           acceptOnPointerLeave: false
  1646                         )
  1647                        (LabelSpec
  1648                           label: 'Sort Block Selector:'
  1649                           name: 'Label1'
  1650                           layout: (LayoutFrame -5 0 66 0 107 0 84 0)
  1651                           activeHelpKey: sortBlockSelector
  1652                           translateLabel: true
  1653                           resizeForLabel: true
  1654                           adjust: right
  1655                         )
  1656                        (InputFieldSpec
  1657                           name: 'EntryField4'
  1658                           layout: (LayoutFrame 110 0 63 0 2 1 89 0)
  1659                           activeHelpKey: sortBlockSelector
  1660                           enableChannel: isSortable
  1661                           tabable: true
  1662                           model: sortBlockSelector
  1663                           group: inputGroup
  1664                           type: symbolOrNil
  1665                           immediateAccept: false
  1666                           acceptOnLeave: false
  1667                           acceptOnLostFocus: false
  1668                           acceptChannel: acceptChannel
  1669                           modifiedChannel: modifiedChannel
  1670                           acceptOnPointerLeave: false
  1671                         )
  1672                        )
  1673                      
  1674                     )
  1675                     extent: (Point 430 122)
  1676                   )
  1677                  )
  1678                
  1679               )
  1680             )
  1681            )
  1682          
  1683         )
  1684       )
  1685 !
  1686 
  1687 valuesEditSpec
  1688     "This resource specification was automatically generated
  1689      by the UIPainter of ST/X."
  1690 
  1691     "Do not manually edit this!! If it is corrupted,
  1692      the UIPainter may not be able to read the specification."
  1693 
  1694     "
  1695      UIPainter new openOnClass:DataSetBuilder andSelector:#valuesEditSpec
  1696      DataSetBuilder new openInterface:#valuesEditSpec
  1697     "
  1698 
  1699     <resource: #canvas>
  1700 
  1701     ^ 
  1702      #(FullSpec
  1703         name: valuesEditSpec
  1704         window: 
  1705        (WindowSpec
  1706           label: 'DataSet Basic'
  1707           name: 'DataSet Basic'
  1708           min: (Point 10 10)
  1709           bounds: (Rectangle 0 0 471 417)
  1710         )
  1711         component: 
  1712        (SpecCollection
  1713           collection: (
  1714            (VerticalPanelViewSpec
  1715               name: 'VerticalPanel1'
  1716               layout: (LayoutFrame 0 0 0 0 0 1 0 1)
  1717               horizontalLayout: fit
  1718               verticalLayout: top
  1719               horizontalSpace: 3
  1720               verticalSpace: 3
  1721               component: 
  1722              (SpecCollection
  1723                 collection: (
  1724                  (FramedBoxSpec
  1725                     label: 'Value Selectors:'
  1726                     name: 'valuesBox'
  1727                     labelPosition: topLeft
  1728                     translateLabel: true
  1729                     component: 
  1730                    (SpecCollection
  1731                       collection: (
  1732                        (LabelSpec
  1733                           label: 'Read:'
  1734                           name: 'readLabel'
  1735                           layout: (AlignmentOrigin 94 0 15 0 1 0.5)
  1736                           activeHelpKey: valuesReadSelector
  1737                           translateLabel: true
  1738                           resizeForLabel: true
  1739                           adjust: right
  1740                         )
  1741                        (InputFieldSpec
  1742                           name: 'readSelector'
  1743                           layout: (LayoutFrame 97 0 4 0 2 1.0 26 0)
  1744                           activeHelpKey: valuesReadSelector
  1745                           tabable: true
  1746                           model: readSelector
  1747                           group: inputGroup
  1748                           type: symbolOrNil
  1749                           acceptOnLostFocus: false
  1750                           acceptChannel: acceptChannel
  1751                           modifiedChannel: modifiedChannel
  1752                           acceptOnPointerLeave: false
  1753                         )
  1754                        (LabelSpec
  1755                           label: 'Write:'
  1756                           name: 'writeLabel'
  1757                           layout: (AlignmentOrigin 94 0 40 0 1 0.5)
  1758                           activeHelpKey: valuesWriteSelector
  1759                           translateLabel: true
  1760                           resizeForLabel: true
  1761                           adjust: right
  1762                         )
  1763                        (InputFieldSpec
  1764                           name: 'writeSelector'
  1765                           layout: (LayoutFrame 97 0 29 0 2 1.0 51 0)
  1766                           activeHelpKey: valuesWriteSelector
  1767                           tabable: true
  1768                           model: writeSelector
  1769                           group: inputGroup
  1770                           type: symbolOrNil
  1771                           acceptOnLostFocus: false
  1772                           acceptChannel: acceptChannel
  1773                           modifiedChannel: modifiedChannel
  1774                           acceptOnPointerLeave: false
  1775                         )
  1776                        (LabelSpec
  1777                           label: 'Converter:'
  1778                           name: 'converterLabel'
  1779                           layout: (AlignmentOrigin 94 0 65 0 1 0.5)
  1780                           activeHelpKey: converterSelector
  1781                           translateLabel: true
  1782                           resizeForLabel: true
  1783                           adjust: right
  1784                         )
  1785                        (InputFieldSpec
  1786                           name: 'converterField'
  1787                           layout: (LayoutFrame 97 0 54 0 2 1.0 76 0)
  1788                           activeHelpKey: converterSelector
  1789                           tabable: true
  1790                           model: converterSelector
  1791                           group: inputGroup
  1792                           type: symbolOrNil
  1793                           acceptOnLostFocus: false
  1794                           acceptChannel: acceptChannel
  1795                           modifiedChannel: modifiedChannel
  1796                           acceptOnPointerLeave: false
  1797                         )
  1798                        (LabelSpec
  1799                           label: 'Print:'
  1800                           name: 'printLabel'
  1801                           layout: (AlignmentOrigin 94 0 90 0 1 0.5)
  1802                           activeHelpKey: valuesPrintSelector
  1803                           translateLabel: true
  1804                           resizeForLabel: true
  1805                           adjust: right
  1806                         )
  1807                        (InputFieldSpec
  1808                           name: 'printSelector'
  1809                           layout: (LayoutFrame 97 0 79 0 2 1.0 101 0)
  1810                           activeHelpKey: valuesPrintSelector
  1811                           tabable: true
  1812                           model: printSelector
  1813                           group: inputGroup
  1814                           type: symbolOrNil
  1815                           acceptOnLostFocus: false
  1816                           acceptChannel: acceptChannel
  1817                           modifiedChannel: modifiedChannel
  1818                           acceptOnPointerLeave: false
  1819                         )
  1820                        (LabelSpec
  1821                           label: 'Visibility:'
  1822                           name: 'visibilityLabel'
  1823                           layout: (AlignmentOrigin 94 0 115 0 1 0.5)
  1824                           activeHelpKey: valuesVisibilitySelector
  1825                           translateLabel: true
  1826                           resizeForLabel: true
  1827                           adjust: right
  1828                         )
  1829                        (InputFieldSpec
  1830                           name: 'visibilitySelector'
  1831                           layout: (LayoutFrame 97 0 104 0 2 1.0 126 0)
  1832                           activeHelpKey: valuesVisibilitySelector
  1833                           tabable: true
  1834                           model: visibilitySelector
  1835                           group: inputGroup
  1836                           type: symbolOrNil
  1837                           acceptOnLostFocus: false
  1838                           acceptChannel: acceptChannel
  1839                           modifiedChannel: modifiedChannel
  1840                           acceptOnPointerLeave: false
  1841                         )
  1842                        )
  1843                      
  1844                     )
  1845                     extent: (Point 471 160)
  1846                   )
  1847                  (FramedBoxSpec
  1848                     label: 'Range:'
  1849                     name: 'rangeBox'
  1850                     labelPosition: topLeft
  1851                     translateLabel: true
  1852                     component: 
  1853                    (SpecCollection
  1854                       collection: (
  1855                        (LabelSpec
  1856                           label: 'Min:'
  1857                           name: 'Label1'
  1858                           layout: (LayoutFrame 11 0 3 0 94 0 20 0)
  1859                           activeHelpKey: minValue
  1860                           translateLabel: true
  1861                           resizeForLabel: true
  1862                           adjust: right
  1863                         )
  1864                        (InputFieldSpec
  1865                           name: 'EntryField1'
  1866                           layout: (LayoutFrame 97 0 1 0 20 0.5 23 0)
  1867                           activeHelpKey: minValue
  1868                           tabable: true
  1869                           model: minValue
  1870                           group: inputGroup
  1871                           type: numberOrNil
  1872                           acceptOnLeave: true
  1873                           acceptOnLostFocus: true
  1874                           acceptChannel: acceptChannel
  1875                           modifiedChannel: modifiedChannel
  1876                           acceptOnPointerLeave: true
  1877                         )
  1878                        (LabelSpec
  1879                           label: 'Max:'
  1880                           name: 'Label2'
  1881                           layout: (LayoutFrame 21 0.5 3 0 70 0.5 20 0)
  1882                           activeHelpKey: maxValue
  1883                           translateLabel: true
  1884                           resizeForLabel: true
  1885                           adjust: right
  1886                         )
  1887                        (InputFieldSpec
  1888                           name: 'EntryField2'
  1889                           layout: (LayoutFrame 70 0.5 1 0 -2 1.0 23 0)
  1890                           activeHelpKey: maxValue
  1891                           tabable: true
  1892                           model: maxValue
  1893                           group: inputGroup
  1894                           type: numberOrNil
  1895                           acceptOnLeave: true
  1896                           acceptOnLostFocus: true
  1897                           acceptChannel: acceptChannel
  1898                           modifiedChannel: modifiedChannel
  1899                           acceptOnPointerLeave: true
  1900                         )
  1901                        )
  1902                      
  1903                     )
  1904                     extent: (Point 471 56)
  1905                   )
  1906                  (FramedBoxSpec
  1907                     label: 'Popup Menu:'
  1908                     name: 'menusBox'
  1909                     labelPosition: topLeft
  1910                     translateLabel: true
  1911                     component: 
  1912                    (SpecCollection
  1913                       collection: (
  1914                        (LabelSpec
  1915                           label: 'Selector:'
  1916                           name: 'menuLabel'
  1917                           layout: (AlignmentOrigin 94 0 12 0 1 0.5)
  1918                           activeHelpKey: valuesMenuSelector
  1919                           translateLabel: true
  1920                           resizeForLabel: true
  1921                           adjust: right
  1922                         )
  1923                        (InputFieldSpec
  1924                           name: 'menuSelector'
  1925                           layout: (LayoutFrame 97 0 1 0 2 1.0 23 0)
  1926                           activeHelpKey: valuesMenuSelector
  1927                           tabable: true
  1928                           model: menu
  1929                           group: inputGroup
  1930                           type: symbolOrNil
  1931                           acceptOnLostFocus: false
  1932                           acceptChannel: acceptChannel
  1933                           modifiedChannel: modifiedChannel
  1934                           acceptOnPointerLeave: false
  1935                         )
  1936                        (CheckBoxSpec
  1937                           label: 'Fetch Menu from Application'
  1938                           name: 'CheckBox1'
  1939                           layout: (LayoutFrame 93 0 28 0 375 0 50 0)
  1940                           activeHelpKey: valuesMenuFromApplication
  1941                           model: menuFromApplication
  1942                           translateLabel: true
  1943                           valueChangeSelector: setModified
  1944                         )
  1945                        )
  1946                      
  1947                     )
  1948                     extent: (Point 471 80)
  1949                   )
  1950                  (FramedBoxSpec
  1951                     label: 'Combo List/Box Selectors:'
  1952                     name: 'comboSelectorsBox'
  1953                     labelPosition: topLeft
  1954                     translateLabel: true
  1955                     component: 
  1956                    (SpecCollection
  1957                       collection: (
  1958                        (LabelSpec
  1959                           label: 'Choices:'
  1960                           name: 'ChoicesLabel'
  1961                           layout: (AlignmentOrigin 94 0 15 0 1 0.5)
  1962                           activeHelpKey: valuesChoicesSelector
  1963                           translateLabel: true
  1964                           resizeForLabel: true
  1965                           adjust: right
  1966                         )
  1967                        (InputFieldSpec
  1968                           name: 'ChoicesField'
  1969                           layout: (LayoutFrame 97 0 4 0 2 1.0 26 0)
  1970                           activeHelpKey: valuesChoicesSelector
  1971                           tabable: true
  1972                           model: choices
  1973                           group: inputGroup
  1974                           type: symbolOrNil
  1975                           acceptOnLeave: false
  1976                           acceptOnLostFocus: false
  1977                           acceptChannel: acceptChannel
  1978                           modifiedChannel: modifiedChannel
  1979                           acceptOnPointerLeave: false
  1980                         )
  1981                        (LabelSpec
  1982                           label: 'Xlated Choices:'
  1983                           name: 'XChoicesLabel'
  1984                           layout: (AlignmentOrigin 94 0 40 0 1 0.5)
  1985                           activeHelpKey: valuesXChoicesSelector
  1986                           translateLabel: true
  1987                           resizeForLabel: true
  1988                           adjust: right
  1989                         )
  1990                        (InputFieldSpec
  1991                           name: 'XChoicesField'
  1992                           layout: (LayoutFrame 97 0 29 0 2 1.0 51 0)
  1993                           activeHelpKey: valuesXChoicesSelector
  1994                           tabable: true
  1995                           model: translatedChoices
  1996                           group: inputGroup
  1997                           type: symbolOrNil
  1998                           acceptOnLeave: false
  1999                           acceptOnLostFocus: false
  2000                           acceptChannel: acceptChannel
  2001                           modifiedChannel: modifiedChannel
  2002                           acceptOnPointerLeave: false
  2003                         )
  2004                        (LabelSpec
  2005                           label: 'Editable:'
  2006                           name: 'EditableLabel'
  2007                           layout: (AlignmentOrigin 94 0 65 0 1 0.5)
  2008                           activeHelpKey: showComboFieldSelector
  2009                           translateLabel: true
  2010                           resizeForLabel: true
  2011                           adjust: right
  2012                         )
  2013                        (InputFieldSpec
  2014                           name: 'EditableField'
  2015                           layout: (LayoutFrame 97 0 54 0 2 1.0 76 0)
  2016                           activeHelpKey: showComboFieldSelector
  2017                           tabable: true
  2018                           model: showComboFieldSelector
  2019                           group: inputGroup
  2020                           type: symbolOrNil
  2021                           acceptOnLeave: false
  2022                           acceptOnLostFocus: false
  2023                           acceptChannel: acceptChannel
  2024                           modifiedChannel: modifiedChannel
  2025                           acceptOnPointerLeave: false
  2026                         )
  2027                        )
  2028                      
  2029                     )
  2030                     extent: (Point 471 107)
  2031                   )
  2032                  )
  2033                
  2034               )
  2035             )
  2036            )
  2037          
  2038         )
  2039       )
  2040 !
  2041 
  2042 windowSpec
  2043     "This resource specification was automatically generated
  2044      by the UIPainter of ST/X."
  2045 
  2046     "Do not manually edit this!! If it is corrupted,
  2047      the UIPainter may not be able to read the specification."
  2048 
  2049     "
  2050      UIPainter new openOnClass:DataSetBuilder andSelector:#windowSpec
  2051      DataSetBuilder new openInterface:#windowSpec
  2052      DataSetBuilder open
  2053     "
  2054 
  2055     <resource: #canvas>
  2056 
  2057     ^ 
  2058      #(FullSpec
  2059         name: windowSpec
  2060         window: 
  2061        (WindowSpec
  2062           label: 'Data Set Builder'
  2063           name: 'Data Set Builder'
  2064           min: (Point 10 10)
  2065           bounds: (Rectangle 0 0 633 658)
  2066           menu: menu
  2067         )
  2068         component: 
  2069        (SpecCollection
  2070           collection: (
  2071            (MenuPanelSpec
  2072               name: 'menuToolbarView'
  2073               layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 32 0)
  2074               tabable: true
  2075               menu: menuToolbar
  2076             )
  2077            (VariableVerticalPanelSpec
  2078               name: 'mainPanel'
  2079               layout: (LayoutFrame 0 0.0 38 0.0 0 1.0 -26 1.0)
  2080               component: 
  2081              (SpecCollection
  2082                 collection: (
  2083                  (FramedBoxSpec
  2084                     label: 'Table Columns'
  2085                     name: 'FramedBox'
  2086                     labelPosition: topLeft
  2087                     translateLabel: true
  2088                     component: 
  2089                    (SpecCollection
  2090                       collection: (
  2091                        (DataSetSpec
  2092                           name: 'columnView'
  2093                           layout: (LayoutFrame 0 0.0 6 0.0 0 1.0 2 1.0)
  2094                           hasHorizontalScrollBar: true
  2095                           hasVerticalScrollBar: false
  2096                           miniScrollerHorizontal: true
  2097                           useIndex: false
  2098                           has3Dseparators: true
  2099                         )
  2100                        )
  2101                      
  2102                     )
  2103                   )
  2104                  (VariableHorizontalPanelSpec
  2105                     name: 'VariablePanel'
  2106                     level: -1
  2107                     component: 
  2108                    (SpecCollection
  2109                       collection: (
  2110                        (ViewSpec
  2111                           name: 'labelsView'
  2112                           component: 
  2113                          (SpecCollection
  2114                             collection: (
  2115                              (SequenceViewSpec
  2116                                 name: 'labelAndColumns'
  2117                                 layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
  2118                                 tabable: true
  2119                                 model: selectedColumnModel
  2120                                 menu: menuEdit
  2121                                 hasHorizontalScrollBar: true
  2122                                 hasVerticalScrollBar: true
  2123                                 miniScrollerHorizontal: true
  2124                                 isMultiSelect: true
  2125                                 useIndex: true
  2126                                 sequenceList: seqList
  2127                               )
  2128                              )
  2129                            
  2130                           )
  2131                           postBuildCallback: postBuildListOfItemsView:
  2132                         )
  2133                        (ViewSpec
  2134                           name: 'specView'
  2135                           level: -1
  2136                           component: 
  2137                          (SpecCollection
  2138                             collection: (
  2139                              (NoteBookViewSpec
  2140                                 name: 'NoteBook'
  2141                                 layout: (LayoutFrame 1 0.0 0 0.0 0 1.0 -30 1.0)
  2142                                 tabable: true
  2143                                 model: tabModel
  2144                                 menu: tabList
  2145                                 useIndex: true
  2146                                 canvas: canvasHolder
  2147                                 keepCanvasAlive: true
  2148                               )
  2149                              (UISubSpecification
  2150                                 name: 'SubSpecification'
  2151                                 layout: (LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0)
  2152                                 majorKey: ToolApplicationModel
  2153                                 minorKey: windowSpecForCommit
  2154                               )
  2155                              )
  2156                            
  2157                           )
  2158                           postBuildCallback: postBuildSpecView:
  2159                         )
  2160                        )
  2161                      
  2162                     )
  2163                     handles: (Any 0.235387 1.0)
  2164                   )
  2165                  )
  2166                
  2167               )
  2168               handles: (Any 0.208748 1.0)
  2169             )
  2170            (UISubSpecification
  2171               name: 'infoBarSubSpec'
  2172               layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
  2173               majorKey: ToolApplicationModel
  2174               minorKey: windowSpecForInfoBar
  2175             )
  2176            )
  2177          
  2178         )
  2179       )
  2180 ! !
  2181 
  2182 !DataSetBuilder class methodsFor:'menu specs'!
  2183 
  2184 fileMenu
  2185     "This resource specification was automatically generated
  2186      by the MenuEditor of ST/X."
  2187 
  2188     "Do not manually edit this!! If it is corrupted,
  2189      the MenuEditor may not be able to read the specification."
  2190 
  2191     "
  2192      MenuEditor new openOnClass:DataSetBuilder andSelector:#fileMenu
  2193      (Menu new fromLiteralArrayEncoding:(DataSetBuilder fileMenu)) startUp
  2194     "
  2195 
  2196     <resource: #menu>
  2197 
  2198     ^ 
  2199      #(Menu
  2200         (
  2201          (MenuItem
  2202             activeHelpKey: fileNew
  2203             label: 'New'
  2204             itemValue: doNew
  2205             translateLabel: true
  2206           )
  2207          (MenuItem
  2208             label: '-'
  2209             isVisible: notEditingSpecOnly
  2210           )
  2211          (MenuItem
  2212             activeHelpKey: fileLoad
  2213             label: 'Load...'
  2214             itemValue: doLoad
  2215             translateLabel: true
  2216             isVisible: notEditingSpecOnly
  2217           )
  2218          (MenuItem
  2219             label: '-'
  2220           )
  2221          (MenuItem
  2222             activeHelpKey: fileSave
  2223             label: 'Save'
  2224             itemValue: doSave
  2225             translateLabel: true
  2226             isVisible: editingSpecOnly
  2227           )
  2228          (MenuItem
  2229             activeHelpKey: fileSaveMethod
  2230             label: 'Save'
  2231             itemValue: doSave
  2232             translateLabel: true
  2233             isVisible: notEditingSpecOnly
  2234           )
  2235          (MenuItem
  2236             activeHelpKey: fileSaveAsMethod
  2237             label: 'Save As...'
  2238             itemValue: doSaveAs
  2239             translateLabel: true
  2240             isVisible: notEditingSpecOnly
  2241           )
  2242          (MenuItem
  2243             label: '-'
  2244           )
  2245          (MenuItem
  2246             activeHelpKey: pickColumns
  2247             label: 'Pick Columns...'
  2248             itemValue: doPickColumns
  2249             translateLabel: true
  2250           )
  2251          (MenuItem
  2252             label: '-'
  2253             isVisible: isStandAlone
  2254           )
  2255          (MenuItem
  2256             activeHelpKey: fileBrowseClass
  2257             label: 'Browse Class'
  2258             itemValue: doBrowseClass
  2259             translateLabel: true
  2260             isVisible: isStandAlone
  2261           )
  2262          (MenuItem
  2263             label: '-'
  2264             isVisible: isStandAlone
  2265           )
  2266          (MenuItem
  2267             activeHelpKey: fileExit
  2268             label: 'Exit'
  2269             itemValue: closeRequest
  2270             translateLabel: true
  2271             isVisible: isStandAlone
  2272           )
  2273          )
  2274         nil
  2275         nil
  2276       )
  2277 !
  2278 
  2279 menu
  2280     "This resource specification was automatically generated
  2281      by the MenuEditor of ST/X."
  2282 
  2283     "Do not manually edit this!! If it is corrupted,
  2284      the MenuEditor may not be able to read the specification."
  2285 
  2286     "
  2287      MenuEditor new openOnClass:DataSetBuilder andSelector:#menu
  2288      (Menu new fromLiteralArrayEncoding:(DataSetBuilder menu)) startUp
  2289     "
  2290 
  2291     <resource: #menu>
  2292 
  2293     ^ 
  2294      #(Menu
  2295         (
  2296          (MenuItem
  2297             label: 'File'
  2298             translateLabel: true
  2299             submenuChannel: fileMenu
  2300           )
  2301          (MenuItem
  2302             label: 'Edit'
  2303             translateLabel: true
  2304             submenuChannel: menuEditWithoutAccelerators
  2305           )
  2306          (MenuItem
  2307             label: 'Add'
  2308             translateLabel: true
  2309             submenu: 
  2310            (Menu
  2311               (
  2312                (MenuItem
  2313                   activeHelpKey: addColumn
  2314                   enabled: columnIsNotEditing
  2315                   label: 'Column'
  2316                   itemValue: doCreateColumn
  2317                   translateLabel: true
  2318                   labelImage: (ResourceRetriever nil newColumnIcon 'Column')
  2319                 )
  2320                (MenuItem
  2321                   activeHelpKey: addNonSelectableColumn
  2322                   enabled: columnIsNotEditing
  2323                   label: 'Column (Non-Selectable)'
  2324                   itemValue: doCreateNonSelectableColumn
  2325                   translateLabel: true
  2326                   labelImage: (ResourceRetriever DataSetBuilder newColumnNonSelectableIcon 'Column (Non-Selectable)')
  2327                 )
  2328                )
  2329               nil
  2330               nil
  2331             )
  2332           )
  2333          (MenuItem
  2334             label: 'Generate'
  2335             translateLabel: true
  2336             isVisible: notEditingSpecOnly
  2337             submenu: 
  2338            (Menu
  2339               (
  2340                (MenuItem
  2341                   activeHelpKey: fileDefineClass
  2342                   label: 'Define Row Class...'
  2343                   itemValue: doDefineRowClass
  2344                   translateLabel: true
  2345                 )
  2346                (MenuItem
  2347                   activeHelpKey: browseRowClass
  2348                   label: 'Browse Row Class'
  2349                   itemValue: doBrowseRowClass
  2350                   translateLabel: true
  2351                 )
  2352                (MenuItem
  2353                   label: '-'
  2354                 )
  2355                (MenuItem
  2356                   activeHelpKey: generateCode
  2357                   label: 'Generate Code'
  2358                   itemValue: doGenerateCode
  2359                   translateLabel: true
  2360                 )
  2361                )
  2362               nil
  2363               nil
  2364             )
  2365           )
  2366          (MenuItem
  2367             label: 'History'
  2368             translateLabel: true
  2369             isVisible: isStandAlone
  2370             submenuChannel: menuHistory
  2371           )
  2372          (MenuItem
  2373             label: 'MENU_Help'
  2374             translateLabel: true
  2375             startGroup: conditionalRight
  2376             submenuChannel: menuHelp
  2377           )
  2378          )
  2379         nil
  2380         nil
  2381       )
  2382 !
  2383 
  2384 menuEdit
  2385     "This resource specification was automatically generated
  2386      by the MenuEditor of ST/X."
  2387 
  2388     "Do not manually edit this!! If it is corrupted,
  2389      the MenuEditor may not be able to read the specification."
  2390 
  2391     "
  2392      MenuEditor new openOnClass:DataSetBuilder andSelector:#menuEdit
  2393      (Menu new fromLiteralArrayEncoding:(DataSetBuilder menuEdit)) startUp
  2394     "
  2395 
  2396     <resource: #menu>
  2397 
  2398     ^ 
  2399      #(Menu
  2400         (
  2401          (MenuItem
  2402             activeHelpKey: editCut
  2403             enabled: isColumnSelected
  2404             label: 'Cut'
  2405             itemValue: doCut
  2406             translateLabel: true
  2407             shortcutKey: Cut
  2408           )
  2409          (MenuItem
  2410             activeHelpKey: editCopy
  2411             enabled: isColumnSelected
  2412             label: 'Copy'
  2413             itemValue: doCopy
  2414             translateLabel: true
  2415             shortcutKey: Copy
  2416           )
  2417          (MenuItem
  2418             activeHelpKey: editPaste
  2419             enabled: valueOfHavingClipboard
  2420             label: 'Paste'
  2421             itemValue: doPaste
  2422             translateLabel: true
  2423             shortcutKey: Paste
  2424           )
  2425          (MenuItem
  2426             label: '-'
  2427           )
  2428          (MenuItem
  2429             activeHelpKey: editMoveUp
  2430             enabled: isColumnSelected
  2431             label: 'Move Up'
  2432             itemValue: doMoveColumn:
  2433             translateLabel: true
  2434             shortcutKey: CtrlCursorUp
  2435             labelImage: (ResourceRetriever Icon upIcon 'Move Up')
  2436             argument: up
  2437           )
  2438          (MenuItem
  2439             activeHelpKey: editMoveDown
  2440             enabled: isColumnSelected
  2441             label: 'Move Down'
  2442             itemValue: doMoveColumn:
  2443             translateLabel: true
  2444             shortcutKey: CtrlCursorDown
  2445             labelImage: (ResourceRetriever Icon downIcon 'Move Down')
  2446             argument: down
  2447           )
  2448          (MenuItem
  2449             label: '-'
  2450           )
  2451          (MenuItem
  2452             label: 'Separators'
  2453             translateLabel: true
  2454             submenu: 
  2455            (Menu
  2456               (
  2457                (MenuItem
  2458                   label: 'Label Columns'
  2459                   translateLabel: true
  2460                   submenu: 
  2461                  (Menu
  2462                     (
  2463                      (MenuItem
  2464                         enabled: hasSelection
  2465                         label: 'Add Separators'
  2466                         itemValue: addLabelColumnSeparators
  2467                         translateLabel: true
  2468                       )
  2469                      (MenuItem
  2470                         enabled: hasSelection
  2471                         label: 'Remove Separators'
  2472                         itemValue: removeLabelColumnSeparators
  2473                         translateLabel: true
  2474                       )
  2475                      )
  2476                     nil
  2477                     nil
  2478                   )
  2479                 )
  2480                (MenuItem
  2481                   label: 'Label Row && Columns'
  2482                   translateLabel: true
  2483                   submenu: 
  2484                  (Menu
  2485                     (
  2486                      (MenuItem
  2487                         enabled: hasSelection
  2488                         label: 'Add Separators'
  2489                         itemValue: addLabelSeparators
  2490                         translateLabel: true
  2491                       )
  2492                      (MenuItem
  2493                         enabled: hasSelection
  2494                         label: 'Remove Separators'
  2495                         itemValue: removeLabelSeparators
  2496                         translateLabel: true
  2497                       )
  2498                      )
  2499                     nil
  2500                     nil
  2501                   )
  2502                 )
  2503                (MenuItem
  2504                   label: '-'
  2505                 )
  2506                (MenuItem
  2507                   label: 'Cell Rows'
  2508                   translateLabel: true
  2509                   submenu: 
  2510                  (Menu
  2511                     (
  2512                      (MenuItem
  2513                         enabled: hasSelection
  2514                         label: 'Add Separators'
  2515                         itemValue: addRowSeparators
  2516                         translateLabel: true
  2517                       )
  2518                      (MenuItem
  2519                         enabled: hasSelection
  2520                         label: 'Remove Separators'
  2521                         itemValue: removeRowSeparators
  2522                         translateLabel: true
  2523                       )
  2524                      )
  2525                     nil
  2526                     nil
  2527                   )
  2528                 )
  2529                (MenuItem
  2530                   label: 'Cell Columns'
  2531                   translateLabel: true
  2532                   submenu: 
  2533                  (Menu
  2534                     (
  2535                      (MenuItem
  2536                         enabled: hasSelection
  2537                         label: 'Add Separators'
  2538                         itemValue: addLabelColumnSeparators
  2539                         translateLabel: true
  2540                       )
  2541                      (MenuItem
  2542                         enabled: hasSelection
  2543                         label: 'Remove'
  2544                         itemValue: removeLabelColumnSeparators
  2545                         translateLabel: true
  2546                       )
  2547                      )
  2548                     nil
  2549                     nil
  2550                   )
  2551                 )
  2552                (MenuItem
  2553                   label: 'Cell Rows && Columns'
  2554                   translateLabel: true
  2555                   submenu: 
  2556                  (Menu
  2557                     (
  2558                      (MenuItem
  2559                         enabled: hasSelection
  2560                         label: 'Add Separators'
  2561                         itemValue: addCellSeparators
  2562                         translateLabel: true
  2563                       )
  2564                      (MenuItem
  2565                         enabled: hasSelection
  2566                         label: 'Remove Separators'
  2567                         itemValue: removeCellSeparators
  2568                         translateLabel: true
  2569                       )
  2570                      )
  2571                     nil
  2572                     nil
  2573                   )
  2574                 )
  2575                )
  2576               nil
  2577               nil
  2578             )
  2579           )
  2580          (MenuItem
  2581             label: 'Alignment'
  2582             translateLabel: true
  2583             submenu: 
  2584            (Menu
  2585               (
  2586                (MenuItem
  2587                   enabled: hasSelection
  2588                   label: 'Make Labels Left Aligned'
  2589                   itemValue: alignLabelsLeft
  2590                   translateLabel: true
  2591                 )
  2592                (MenuItem
  2593                   enabled: hasSelection
  2594                   label: 'Make Labels Centered'
  2595                   itemValue: alignLabelsCentered
  2596                   translateLabel: true
  2597                 )
  2598                (MenuItem
  2599                   enabled: hasSelection
  2600                   label: 'Make Labels Right Aligned'
  2601                   itemValue: alignLabelsRight
  2602                   translateLabel: true
  2603                 )
  2604                (MenuItem
  2605                   label: '-'
  2606                 )
  2607                (MenuItem
  2608                   enabled: hasSelection
  2609                   label: 'Make Cell Left Aligned'
  2610                   itemValue: alignColumnsLeft
  2611                   translateLabel: true
  2612                 )
  2613                (MenuItem
  2614                   enabled: hasSelection
  2615                   label: 'Make Cell Centered'
  2616                   itemValue: alignColumnsCentered
  2617                   translateLabel: true
  2618                 )
  2619                (MenuItem
  2620                   enabled: hasSelection
  2621                   label: 'Make Cell Right Aligned'
  2622                   itemValue: alignColumnsRight
  2623                   translateLabel: true
  2624                 )
  2625                )
  2626               nil
  2627               nil
  2628             )
  2629           )
  2630          (MenuItem
  2631             label: 'Colors'
  2632             translateLabel: true
  2633             submenu: 
  2634            (Menu
  2635               (
  2636                (MenuItem
  2637                   enabled: hasSelection
  2638                   label: 'Set Cell Color Selectors'
  2639                   itemValue: setCellColorSelectors
  2640                   translateLabel: true
  2641                 )
  2642                (MenuItem
  2643                   enabled: hasSelection
  2644                   label: 'Set Selected Cell Color Selectors'
  2645                   itemValue: setSelectedCellColorSelectors
  2646                   translateLabel: true
  2647                 )
  2648                )
  2649               nil
  2650               nil
  2651             )
  2652           )
  2653          (MenuItem
  2654             label: 'Behavior'
  2655             translateLabel: true
  2656             submenu: 
  2657            (Menu
  2658               (
  2659                (MenuItem
  2660                   enabled: hasSelection
  2661                   label: 'Make Selected Cells Unselectable'
  2662                   itemValue: makeSelectedCellsUnselectable
  2663                   translateLabel: true
  2664                 )
  2665                (MenuItem
  2666                   enabled: hasSelection
  2667                   label: 'Make Selected Cells Selectable'
  2668                   itemValue: makeSelectedCellsSelectable
  2669                   translateLabel: true
  2670                 )
  2671                )
  2672               nil
  2673               nil
  2674             )
  2675           )
  2676          (MenuItem
  2677             label: '-'
  2678           )
  2679          (MenuItem
  2680             enabled: hasSelection
  2681             label: 'Make Selectable'
  2682             itemValue: makeColumnsSelectable
  2683             translateLabel: true
  2684           )
  2685          (MenuItem
  2686             enabled: hasSelection
  2687             label: 'Make Unselectable'
  2688             itemValue: makeColumnsUnselectable
  2689             translateLabel: true
  2690           )
  2691          )
  2692         nil
  2693         nil
  2694       )
  2695 !
  2696 
  2697 menuEditWithoutAccelerators
  2698     ^ self menuEdit decodeAsLiteralArray removeAllAccelerators
  2699 !
  2700 
  2701 menuToolbar
  2702     "This resource specification was automatically generated
  2703      by the MenuEditor of ST/X."
  2704 
  2705     "Do not manually edit this!! If it is corrupted,
  2706      the MenuEditor may not be able to read the specification."
  2707 
  2708     "
  2709      MenuEditor new openOnClass:DataSetBuilder andSelector:#menuToolbar
  2710      (Menu new fromLiteralArrayEncoding:(DataSetBuilder menuToolbar)) startUp
  2711     "
  2712 
  2713     <resource: #menu>
  2714 
  2715     ^ 
  2716      #(Menu
  2717         (
  2718          (MenuItem
  2719             activeHelpKey: fileNew
  2720             label: 'New'
  2721             itemValue: doNew
  2722             translateLabel: true
  2723             isButton: true
  2724             labelImage: (ResourceRetriever ToolbarIconLibrary newDataSetIcon)
  2725           )
  2726          (MenuItem
  2727             label: '-'
  2728           )
  2729          (MenuItem
  2730             activeHelpKey: fileLoad
  2731             label: 'Load'
  2732             itemValue: doLoad
  2733             translateLabel: true
  2734             isButton: true
  2735             submenuChannel: menuHistory
  2736             labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethodIcon)
  2737           )
  2738          (MenuItem
  2739             activeHelpKey: fileSaveMethod
  2740             label: 'Save'
  2741             itemValue: doSave
  2742             translateLabel: true
  2743             isButton: true
  2744             isVisible: notEditingSpecOnly
  2745             labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethodIcon)
  2746           )
  2747          (MenuItem
  2748             activeHelpKey: fileSave
  2749             label: 'Save'
  2750             itemValue: doSave
  2751             translateLabel: true
  2752             isButton: true
  2753             isVisible: editingSpecOnly
  2754             labelImage: (ResourceRetriever ToolbarIconLibrary saveToFileIcon)
  2755           )
  2756          (MenuItem
  2757             label: '-'
  2758           )
  2759          (MenuItem
  2760             activeHelpKey: editCut
  2761             enabled: isColumnSelected
  2762             label: 'Cut'
  2763             itemValue: doCut
  2764             translateLabel: true
  2765             isButton: true
  2766             labelImage: (ResourceRetriever ToolbarIconLibrary cutWidgetIcon)
  2767           )
  2768          (MenuItem
  2769             activeHelpKey: editCopy
  2770             enabled: isColumnSelected
  2771             label: 'Copy'
  2772             itemValue: doCopy
  2773             translateLabel: true
  2774             isButton: true
  2775             labelImage: (ResourceRetriever ToolbarIconLibrary copyWidgetIcon)
  2776           )
  2777          (MenuItem
  2778             activeHelpKey: editPaste
  2779             enabled: canPasteHolder
  2780             label: 'Paste'
  2781             itemValue: doPaste
  2782             translateLabel: true
  2783             isButton: true
  2784             labelImage: (ResourceRetriever ToolbarIconLibrary pasteWidgetIcon)
  2785           )
  2786          (MenuItem
  2787             activeHelpKey: editDelete
  2788             enabled: isColumnSelected
  2789             label: 'Delete'
  2790             itemValue: doDelete
  2791             translateLabel: true
  2792             isButton: true
  2793             isVisible: false
  2794             labelImage: (ResourceRetriever ToolbarIconLibrary deleteWidgetIcon)
  2795           )
  2796          (MenuItem
  2797             label: '-'
  2798           )
  2799          (MenuItem
  2800             activeHelpKey: addColumn
  2801             enabled: columnIsNotEditing
  2802             label: 'Add Column'
  2803             itemValue: doCreateColumn
  2804             translateLabel: true
  2805             isButton: true
  2806             labelImage: (ResourceRetriever nil newColumnIcon)
  2807           )
  2808          (MenuItem
  2809             activeHelpKey: addNonSelectableColumn
  2810             enabled: columnIsNotEditing
  2811             label: 'Add Column (Non Selectable)'
  2812             itemValue: doCreateNonSelectableColumn
  2813             translateLabel: true
  2814             isButton: true
  2815             labelImage: (ResourceRetriever DataSetBuilder newColumnNonSelectableIcon)
  2816           )
  2817          (MenuItem
  2818             label: ''
  2819           )
  2820          (MenuItem
  2821             activeHelpKey: editMoveUp
  2822             enabled: isColumnSelected
  2823             label: 'Move Up'
  2824             itemValue: doMoveColumn:
  2825             translateLabel: true
  2826             isButton: true
  2827             startGroup: right
  2828             labelImage: (ResourceRetriever Icon upIcon)
  2829             argument: up
  2830           )
  2831          (MenuItem
  2832             activeHelpKey: editMoveDown
  2833             enabled: isColumnSelected
  2834             label: 'Move Down'
  2835             itemValue: doMoveColumn:
  2836             translateLabel: true
  2837             isButton: true
  2838             startGroup: right
  2839             labelImage: (ResourceRetriever Icon downIcon)
  2840             argument: down
  2841           )
  2842          )
  2843         nil
  2844         nil
  2845       )
  2846 ! !
  2847 
  2848 !DataSetBuilder methodsFor:'accessing'!
  2849 
  2850 acceptedColumns
  2851     "returns the last saved columns (internal, for specOnly edit mode)"
  2852 
  2853     ^ acceptedColumns
  2854 !
  2855 
  2856 columns
  2857     "returns list of columns"
  2858 
  2859     ^ columns
  2860 !
  2861 
  2862 columns:aListOfColumns
  2863     "setup columns from a column view"
  2864 
  2865     |list newColumns|
  2866 
  2867     newColumns := OrderedCollection new.
  2868     list := self seqList.
  2869     list removeAll.
  2870 
  2871     aListOfColumns size ~~ 0 ifTrue:[
  2872         aListOfColumns do:[:aColumn||column|
  2873             (column := aColumn) isSequenceable ifTrue:[
  2874                 column := DataSetColumnSpec decodeFromLiteralArray:aColumn
  2875             ] ifFalse:[
  2876                 column := aColumn copy
  2877             ].
  2878             newColumns add:column.
  2879             list add:(self labelFromColumn:column).  
  2880         ]
  2881     ].
  2882     columns := newColumns.
  2883     self updateColumnView.
  2884 
  2885     "Modified: / 27-03-2007 / 08:46:39 / cg"
  2886 !
  2887 
  2888 editingSpecOnly
  2889     ^ editingSpecOnly ? false
  2890 !
  2891 
  2892 editingSpecOnly:something
  2893     editingSpecOnly := something.
  2894 !
  2895 
  2896 notEditingSpecOnly
  2897     ^ self editingSpecOnly not
  2898 !
  2899 
  2900 resolveRowClass
  2901     "returns the resolved row class
  2902     "
  2903     ^ Smalltalk resolveName:rowClass inClass:self class
  2904 !
  2905 
  2906 rowClassName
  2907 
  2908     ^ self resolveRowClass notNil ifTrue:[rowClass] ifFalse:[nil]
  2909 !
  2910 
  2911 rowClassName:aClassName
  2912 
  2913     |cls|
  2914 
  2915     rowSuperClass := nil.
  2916 
  2917     (rowClass := aClassName) notNil ifTrue:[
  2918         (cls := self resolveRowClass) notNil 
  2919             ifTrue: [rowSuperClass := cls superclass name asString] 
  2920             ifFalse:[rowSuperClass := 'Object']
  2921     ]
  2922 
  2923 ! !
  2924 
  2925 !DataSetBuilder methodsFor:'aspects'!
  2926 
  2927 canvasHolder
  2928     "returns a value holder which keeps selected column"
  2929 
  2930     |holder|
  2931 
  2932     (holder := builder bindingAt:#canvasHolder) isNil ifTrue:[
  2933         builder aspectAt:#canvasHolder put:(holder := ValueHolder new).
  2934     ].
  2935     ^ holder
  2936 !
  2937 
  2938 columnIsNotEditing
  2939     "returns a boolean value holder which returns true if a columns attributes have not
  2940      been modified (notebook fields)"
  2941 
  2942     |holder|
  2943 
  2944     (holder := builder bindingAt:#columnIsNotEditing) isNil ifTrue:[
  2945         holder := BlockValue forLogicalNot:(self modifiedChannel).
  2946         builder aspectAt:#columnIsNotEditing put:holder.
  2947     ].
  2948     ^ holder
  2949 !
  2950 
  2951 editorTypeList
  2952     "generate list of supported editor types"
  2953 
  2954     |list|
  2955 
  2956     (list := builder bindingAt:#editorTypeList) isNil ifTrue:[
  2957         list := (DataSetColumnSpec slices collect:[:eachSlice | eachSlice at:1]) asSet.
  2958         list := list asOrderedCollection sort.
  2959         builder aspectAt:#editorTypeList put:list
  2960     ].
  2961     ^list
  2962 !
  2963 
  2964 hasColumns
  2965     "returns a boolean value holder which is set to true if there are any columns"
  2966 
  2967     ^ BlockValue
  2968         with:[:m | m notEmptyOrNil]
  2969         argument:(self seqList)
  2970 !
  2971 
  2972 hasSelection
  2973     ^ (selectedColumnIndex isCollection not and:[ selectedColumnIndex ~~ 0 ])
  2974     or:[ selectedColumnIndex size > 0 ]
  2975 !
  2976 
  2977 isColumnSelected
  2978     "returns a boolean value holder which is set to true if some col is selected"
  2979 
  2980     ^builder valueAspectFor:#isColumnSelected initialValue: false
  2981 !
  2982 
  2983 menuEdit
  2984     "redefined to access my menu and not the one of the UIPainter"
  2985 
  2986     ^ [self class menuEdit]
  2987 !
  2988 
  2989 possiblePrintConverterTypes
  2990     ^ UISpecification possiblePrintConverterTypes
  2991 !
  2992 
  2993 rendererTypeList
  2994     "generate list of supported renderer types"
  2995 
  2996     |list|
  2997 
  2998     (list := builder bindingAt:#rendererTypeList) isNil ifTrue:[
  2999         list := (DataSetColumnSpec slices collect:[:eachSlice | eachSlice at:2]) asSet.
  3000         list := list asOrderedCollection sort.
  3001         builder aspectAt:#rendererTypeList put:list
  3002     ].
  3003     ^list
  3004 !
  3005 
  3006 selectedColumnModel
  3007     "returns a value holder which keeps selected column"
  3008 
  3009     |holder|
  3010 
  3011     (holder := builder bindingAt:#selectedColumnModel) isNil ifTrue:[
  3012         holder := AspectAdaptor new subject:self; forAspect:#selectedColumnIndex.
  3013         builder aspectAt:#selectedColumnModel put:holder.
  3014     ].
  3015     ^ holder
  3016 !
  3017 
  3018 seqList
  3019     ^ builder listAspectFor:#seqList
  3020 !
  3021 
  3022 style
  3023 
  3024     ^self aspectFor:#labelFont
  3025 !
  3026 
  3027 tabList
  3028 
  3029     ^self class slices collect:[:aSlice|aSlice first]
  3030 
  3031 ! !
  3032 
  3033 !DataSetBuilder methodsFor:'building'!
  3034 
  3035 buildFromResourceSpec:aResourceSpec
  3036 
  3037     self columns:aResourceSpec.
  3038 
  3039 "/    columns notEmpty ifTrue: [
  3040 "/        self tabModel value: 1. 
  3041 "/        self selectedColumnModel value:nil; value:1.    "/ toggle to force change
  3042 "/        self updateInputFields.
  3043 "/        self updateInfoLabel.
  3044 "/        self updateHistory
  3045 "/    ].
  3046 
  3047 !
  3048 
  3049 loadFromClass:aClass andSelector:aSelector
  3050     |cls list|
  3051 
  3052     self assert:(aClass isNil or:[aClass isClass]).
  3053 
  3054     selectedColumnIndex := 0.
  3055 
  3056     "if opened on table columns"  
  3057 
  3058     aClass isNil ifTrue: [ 
  3059         self tabModel value: 0. 
  3060     "/    self columns removeAll.
  3061     "/    self seqList removeAll.
  3062         self updateColumnView.
  3063         self updateInfoLabel.
  3064         self isColumnSelected value: false.
  3065         ^ self.
  3066     ].
  3067 
  3068     specSelector isNil ifTrue: [
  3069         self updateAfterColumnChange. 
  3070         ^ self
  3071     ].
  3072 
  3073     list := nil.
  3074 
  3075     (aClass notNil or:[self isStandAlone or:[self window shown]]) ifTrue:[
  3076         (aClass notNil and:[aSelector notNil]) ifTrue:[
  3077             cls := aClass isBehavior ifTrue:[ aClass ] ifFalse:[ self resolveName:aClass].
  3078 
  3079             (cls respondsTo: aSelector) ifTrue:[ 
  3080                 list := cls perform: aSelector.
  3081             ].
  3082         ]
  3083     ] ifFalse:[
  3084         list := columns
  3085     ].
  3086     self columns:list.
  3087     self updateAfterColumnChange.
  3088 !
  3089 
  3090 updateAfterColumnChange
  3091     self tabModel changed "value:0; value:1".                 "/ toggle to force change
  3092     self selectedColumnModel changed "value:nil; value:1".    "/ toggle to force change
  3093     self updateColumnView.
  3094     self updateInputFields.
  3095     self updateInfoLabel.
  3096     self updateHistory.
  3097     self clearModifiedFlag.
  3098     self enablingCommitButtonsHolder value:false.
  3099 ! !
  3100 
  3101 !DataSetBuilder methodsFor:'code generation'!
  3102 
  3103 compile:aCode forClass:aClass inCategory:aCategory
  3104     "compile method for class in a category"
  3105 
  3106     aClass 
  3107         compile:(aCode withCRs) 
  3108         classified:aCategory
  3109 !
  3110 
  3111 generateBackgroundSelectorIn:aClass
  3112     "generate code for #backgroundSelector"
  3113 
  3114     |sel catg code bCode|
  3115 
  3116     catg := #'accessing look'.
  3117     code :=   '\'
  3118             , '    "automatically generated by DataSetBuilder ..."\'
  3119             , '\'
  3120             , '    "specific background color for a cell"\'
  3121             , '\'
  3122             .
  3123 
  3124     columns do:
  3125     [:aColumn|
  3126         ((sel := aColumn backgroundSelector) notNil and:[(aClass includesSelector:sel) not]) 
  3127         ifTrue:
  3128         [
  3129             bCode := sel asString, code, '    ^nil'.
  3130             self compile:bCode forClass:aClass inCategory:catg
  3131         ]
  3132     ]
  3133 !
  3134 
  3135 generateChoicesIn:aClass
  3136     "generate code for #choices"
  3137 
  3138     |sel catg code edt|
  3139 
  3140     catg := #'accessing menu'.
  3141     code :=   '\'
  3142             , '    "automatically generated by DataSetBuilder ..."\'
  3143             , '\'
  3144             , '    "get choices for visual editor; (a list of labels)..."\'
  3145             , '\'
  3146             , '    ^ #( foo bar baz )'
  3147             .
  3148 
  3149     columns do:[:aColumn|
  3150         edt := aColumn editorType.
  3151 
  3152         (      aColumn canSelect
  3153           and:[(sel := aColumn choices) notNil
  3154           and:[(edt == #ComboBox or:[edt == #ComboList])
  3155           and:[(aClass includesSelector:sel) not]]]
  3156         ) ifTrue:[
  3157             self compile:(sel asString, code) forClass:aClass inCategory:catg
  3158         ]
  3159     ]
  3160 !
  3161 
  3162 generateDoubleClickSelectorIn:aClass
  3163     "generate code for #foregroundSelector"
  3164 
  3165     |sel catg code bCode|
  3166 
  3167     catg := #'accessing-action'.
  3168     code :=   '\'
  3169             , '    "automatically generated by DataSetBuilder ..."\'
  3170             , '\'
  3171             , '    "specific selector to be called on double click"\'
  3172             , '\'
  3173             .
  3174 
  3175     columns do:
  3176     [:aColumn|
  3177         ((sel := aColumn doubleClickedSelector) notNil 
  3178         and:[(aClass includesSelector:sel) not]) 
  3179         ifTrue:
  3180         [
  3181             bCode := sel asString, code.
  3182             self compile:bCode forClass:aClass inCategory:catg
  3183         ]
  3184     ]
  3185 !
  3186 
  3187 generateForegroundSelectorIn:aClass
  3188     "generate code for #foregroundSelector
  3189     "
  3190     |sel catg code bCode|
  3191 
  3192     catg := #'accessing-look'.
  3193     code :=   '\'
  3194             , '    "automatically generated by DataSetBuilder ..."\'
  3195             , '\'
  3196             , '    "specific foreground color for a cell"\'
  3197             , '\'
  3198             .
  3199 
  3200     columns do:
  3201     [:aColumn|
  3202         ((sel := aColumn foregroundSelector) notNil 
  3203         and:[(aClass includesSelector:sel) not]) 
  3204         ifTrue:
  3205         [
  3206             bCode := sel asString, code, '    ^ nil'.
  3207             self compile:bCode forClass:aClass inCategory:catg
  3208         ]
  3209     ]
  3210 !
  3211 
  3212 generateMenuIn:aClass
  3213     "generate code for #menu"
  3214 
  3215     |sel catg code|
  3216 
  3217     catg := #'accessing menu'.
  3218     code :=   '\'
  3219             , '    "automatically generated by DataSetBuilder ..."\'
  3220             , '\'
  3221             , '    "get middleButton menu for selected cell in column"\'
  3222             , '\'
  3223             , '    ^nil'
  3224             .
  3225 
  3226     columns do:
  3227     [:aColumn|
  3228         (aColumn canSelect
  3229         and:[(sel := aColumn menu) notNil
  3230         and:[(aClass includesSelector:sel) not]]) 
  3231         ifTrue:
  3232         [
  3233             self compile:(sel asString, code) forClass:aClass inCategory:catg
  3234         ]
  3235     ]
  3236 !
  3237 
  3238 generatePrintSelectorIn:aClass
  3239     "generate code for #printSelector"
  3240 
  3241     |sel catg code|
  3242 
  3243     catg := #'accessing'.
  3244     code :=   '\'
  3245             , '    "automatically generated by DataSetBuilder ..."\'
  3246             , '\'
  3247             , '    "get drawable image or text on a gc"\'
  3248             , '\'
  3249             , '    ^ '
  3250             .
  3251 
  3252     columns do:[:aColumn|
  3253         (     aColumn rendererType ~~ #rowSelector
  3254          and:[(sel := aColumn printSelector) notNil
  3255          and:[(aClass includesSelector:sel) not]]
  3256         ) ifTrue:[
  3257             |numArgs bcode keys|
  3258             bcode   := sel asString.
  3259             numArgs    := sel numArgs.
  3260 
  3261             numArgs ~~ 0 ifTrue:[
  3262                 numArgs == 1 ifTrue:[
  3263                     bcode := bcode, 'aGC'
  3264                 ] ifFalse:[
  3265                     keys := sel keywords.
  3266                     bcode := (keys at:1), 'aGC ', (keys at:2), 'aColNr'.
  3267                 ]
  3268             ].
  3269             self compile:(bcode, code, '''', bcode, '''') forClass:aClass inCategory:catg
  3270         ]
  3271     ]
  3272 !
  3273 
  3274 generateReadSelectorIn:aClass
  3275     "generate code for #readSelector"
  3276 
  3277     |sel catg code bCode|
  3278 
  3279     catg := #'accessing'.
  3280     code :=   '\'
  3281             , '    "automatically generated by DataSetBuilder ..."\'
  3282             , '\'
  3283             , '    "get value"\'
  3284             , '\'
  3285             .
  3286 
  3287     columns do:
  3288     [:aColumn|
  3289         (aColumn rendererType ~~ #rowSelector 
  3290         and:[(sel := aColumn readSelector) notNil
  3291         and:[(aClass includesSelector:sel) not]]) 
  3292         ifTrue:
  3293         [
  3294             (aColumn printSelector isNil or:[aColumn canSelect]) 
  3295             ifTrue:
  3296             [
  3297                 |selName|
  3298                 selName := sel asString.
  3299 
  3300                 sel numArgs == 0 
  3301                     ifTrue: [bCode := selName, code] 
  3302                     ifFalse:[bCode := selName, 'anIndex\', code].
  3303                 aColumn rendererType == #CheckToggle 
  3304                     ifFalse:[bCode := bCode, '    ^ ''', selName, ''''] 
  3305                     ifTrue: [bCode := bCode, '    ^true']. 
  3306                 self compile:bCode forClass:aClass inCategory:catg
  3307             ]
  3308         ]
  3309     ]
  3310 !
  3311 
  3312 generateRowSeparatorSelectorIn:aClass
  3313     "generate code for #rowSeparatorSelector"
  3314 
  3315     |sel catg code bCode|
  3316 
  3317     catg := #'accessing look'.
  3318     code :=   '\'
  3319             , '    "automatically generated by DataSetBuilder ..."\'
  3320             , '\'
  3321             , '    "specific row separator visibility for a cell"\'
  3322             , '\'
  3323             .
  3324 
  3325     columns do:
  3326     [:aColumn|
  3327         ((sel := aColumn rowSeparatorSelector) notNil and:[(aClass includesSelector:sel) not]) 
  3328         ifTrue:
  3329         [
  3330             bCode := sel asString, code, '    ^true'.
  3331             self compile:bCode forClass:aClass inCategory:catg
  3332         ]
  3333     ]
  3334 !
  3335 
  3336 generateSelectSelectorIn:aClass
  3337     "generate code for #selectSelector
  3338     "
  3339     |sel catg code bCode|
  3340 
  3341     catg := #'accessing selection'.
  3342     code :=   '\'
  3343             , '    "automatically generated by DataSetBuilder ..."\'
  3344             , '\'
  3345             , '    "can select cell in column"\'
  3346             , '\'
  3347             .
  3348 
  3349     columns do:
  3350     [:aColumn|
  3351         (aColumn rendererType ~~ #rowSelector 
  3352          and:[(sel := aColumn selectSelector) notNil
  3353          and:[(aClass includesSelector:sel) not]]) 
  3354          ifTrue:
  3355          [
  3356             aColumn canSelect 
  3357             ifTrue:
  3358             [
  3359                 bCode := sel asString, code, '    ^true'.
  3360                 self compile:bCode forClass:aClass inCategory:catg
  3361             ]
  3362         ]
  3363     ]
  3364 !
  3365 
  3366 generateShowComboFieldSelectorIn:aClass
  3367     "generate code for #showComboFieldSelector
  3368     "
  3369     |sel catg code bCode edt state|
  3370 
  3371     catg := #'accessing menu'.
  3372     code :=   '\'
  3373             , '    "automatically generated by DataSetBuilder ..."\'
  3374             , '\'
  3375             , '    "open an editField on a combo list or box"\'
  3376             , '\'
  3377             .
  3378 
  3379     columns do:[:aColumn|
  3380         edt := aColumn editorType.
  3381 
  3382         (      aColumn canSelect
  3383           and:[(sel := aColumn showComboFieldSelector) notNil
  3384           and:[(edt == #ComboBox or:[edt == #ComboList])
  3385           and:[(aClass includesSelector:sel) not]]]
  3386         ) ifTrue:[
  3387             state := edt == #ComboBoxView.
  3388 
  3389             bCode := sel asString, code, '    ^ ', state printString.
  3390             self compile:bCode forClass:aClass inCategory:catg
  3391         ]
  3392     ]
  3393 !
  3394 
  3395 generateWriteSelectorIn:aClass
  3396     "generate code for #writeSelector"
  3397 
  3398     |sel catg code bCode sz|
  3399 
  3400     catg := #'accessing'.
  3401     code :=   'aValue\'
  3402             , '    "automatically generated by DataSetBuilder ..."\'
  3403             , '\'
  3404             , '    "set value"\'
  3405             .
  3406 
  3407     columns do:
  3408     [:aColumn|
  3409         ((sel := aColumn writeSelector) notNil
  3410          and:[aColumn editorType ~~ #None
  3411          and:[aColumn canSelect
  3412          and:[(aClass includesSelector:sel) not]]]) 
  3413         ifTrue:
  3414         [
  3415             sel numArgs == 1 
  3416             ifTrue:
  3417             [
  3418                 bCode := sel asString
  3419             ] 
  3420             ifFalse:
  3421             [
  3422                 sz := sel indexOf:$:.
  3423                 bCode := sel copyTo:sz.
  3424                 bCode := bCode, 'anIndex ', (sel copyFrom:sz + 1)
  3425             ].
  3426             self compile:(bCode, code) forClass:aClass inCategory:catg
  3427         ]
  3428     ]
  3429 ! !
  3430 
  3431 !DataSetBuilder methodsFor:'event handling'!
  3432 
  3433 processEvent:anEvent
  3434     "filter keyboard edit-events typed into the listOfItemsView.
  3435      Return true, if I have eaten the event"
  3436 
  3437     |evView inView rawKey key|
  3438 
  3439     anEvent isKeyPressEvent ifFalse:[^ false].
  3440 
  3441     evView := anEvent targetView.
  3442     evView isNil ifTrue:[ ^ false ].
  3443 
  3444     inView := evView isSameOrComponentOf:listOfItemsView.
  3445     inView ifTrue:[^ false].
  3446 
  3447     key    := anEvent key.
  3448     rawKey := anEvent rawKey.
  3449 
  3450     (    key == #Delete
  3451      or:[key == #BackSpace
  3452      or:[key == #Cut]]
  3453     ) ifTrue:[
  3454         self doCut.
  3455         ^ true.
  3456     ].
  3457 
  3458     key == #Copy  ifTrue:[ self doCopy.  ^ true ].
  3459     key == #Paste ifTrue:[ self doPaste. ^ true ].
  3460 
  3461     (rawKey == #CtrlCursorUp) ifTrue:[
  3462         self doMoveUp.
  3463         ^ true.
  3464     ].
  3465     (rawKey == #CtrlCursorDown) ifTrue:[
  3466         self doMoveDown.
  3467         ^ true.
  3468     ].
  3469 
  3470     ^ false.
  3471 ! !
  3472 
  3473 !DataSetBuilder methodsFor:'initialization'!
  3474 
  3475 initialize
  3476     "initializes"
  3477 
  3478     super initialize.
  3479 
  3480     selectedColumnIndex := 0.
  3481     columns     := OrderedCollection new.
  3482     modalOpened := false.
  3483     listOfSpecViews := Array new:(self class slices size).
  3484     editingSpecOnly := false.
  3485 !
  3486 
  3487 loadFromResourceSpec: aResourceSpec
  3488     self columns:aResourceSpec copy.
  3489     modified := false.
  3490     hasSaved := false.
  3491     self updateAfterColumnChange.
  3492 !
  3493 
  3494 setDefaultValuesInNewColumn:aDataSetColumnSpec
  3495 "/    aDataSetColumnSpec readSelector: #'valueAtColumnIndex:'.
  3496 "/    aDataSetColumnSpec writeSelector: #'valueAtColumnIndex:put:'.
  3497 "/    aDataSetColumnSpec backgroundSelector: #'bgAtRowIndex:columnIndex:'.
  3498 "/    aDataSetColumnSpec foregroundSelector: #'fgAtRowIndex:columnIndex:'.
  3499 "/    aDataSetColumnSpec selectSelector: #'selectAtColumnIndex:'.
  3500 "/    aDataSetColumnSpec editorType: #InputField.
  3501 ! !
  3502 
  3503 !DataSetBuilder methodsFor:'operations'!
  3504 
  3505 addCellSeparators
  3506     self addRowSeparators.
  3507     self addColumnSeparators.
  3508 !
  3509 
  3510 addColumnSeparators
  3511     self selectedColumnsDo:[:eachColDescr |
  3512         eachColDescr showColSeparator:true
  3513     ].
  3514     self updateAfterOperation.
  3515 !
  3516 
  3517 addLabelColumnSeparators
  3518     self selectedColumnsDo:[:eachColDescr |
  3519         eachColDescr labelButtonType:#Button
  3520     ].
  3521     self updateAfterOperation.
  3522 !
  3523 
  3524 addLabelSeparators
  3525     self selectedColumnsDo:[:eachColDescr |
  3526         eachColDescr labelButtonType:#Button
  3527     ].
  3528     self updateAfterOperation.
  3529 !
  3530 
  3531 addRowSeparators
  3532     self selectedColumnsDo:[:eachColDescr |
  3533         eachColDescr showRowSeparator:true
  3534     ].
  3535     self updateAfterOperation.
  3536 !
  3537 
  3538 alignColumns:how
  3539     self selectedColumnsDo:[:eachColDescr |
  3540         eachColDescr columnAlignment:how
  3541     ].
  3542     self updateAfterOperation.
  3543 !
  3544 
  3545 alignColumnsCentered
  3546     self alignColumns:#centered
  3547 !
  3548 
  3549 alignColumnsLeft
  3550     self alignColumns:#left
  3551 !
  3552 
  3553 alignColumnsRight
  3554     self alignColumns:#right
  3555 !
  3556 
  3557 alignLabels:how
  3558     self selectedColumnsDo:[:eachColDescr |
  3559         eachColDescr labelAlignment:how
  3560     ].
  3561     self updateAfterOperation.
  3562 !
  3563 
  3564 alignLabelsCentered
  3565     self alignLabels:#centered
  3566 !
  3567 
  3568 alignLabelsLeft
  3569     self alignLabels:#left
  3570 !
  3571 
  3572 alignLabelsRight
  3573     self alignLabels:#right
  3574 !
  3575 
  3576 makeColumnsSelectable
  3577     self makeColumnsSelectable:true
  3578 !
  3579 
  3580 makeColumnsSelectable:aBoolean
  3581     self selectedColumnsDo:[:eachColDescr |
  3582         eachColDescr canSelect:aBoolean
  3583     ].
  3584     self updateAfterOperation.
  3585 !
  3586 
  3587 makeColumnsUnselectable
  3588     self makeColumnsSelectable:false
  3589 !
  3590 
  3591 makeSelectedCellsSelectable
  3592     self selectedColumnsDo:[:eachColDescr |
  3593         eachColDescr canSelect:true
  3594     ].
  3595     self updateAfterOperation.
  3596 !
  3597 
  3598 makeSelectedCellsUnselectable
  3599     self selectedColumnsDo:[:eachColDescr |
  3600         eachColDescr canSelect:false
  3601     ].
  3602     self updateAfterOperation.
  3603 !
  3604 
  3605 removeCellSeparators
  3606     self removeRowSeparators.
  3607     self removeColumnSeparators.
  3608 !
  3609 
  3610 removeColumnSeparators
  3611     self selectedColumnsDo:[:eachColDescr |
  3612         eachColDescr showColSeparator:false
  3613     ].
  3614     self updateAfterOperation.
  3615 !
  3616 
  3617 removeLabelColumnSeparators
  3618     self selectedColumnsDo:[:eachColDescr |
  3619         eachColDescr labelButtonType:#Group
  3620     ].
  3621     self updateAfterOperation.
  3622 !
  3623 
  3624 removeLabelSeparators
  3625     self selectedColumnsDo:[:eachColDescr |
  3626         eachColDescr labelButtonType:#None
  3627     ].
  3628     self updateAfterOperation.
  3629 !
  3630 
  3631 removeRowSeparators
  3632     self selectedColumnsDo:[:eachColDescr |
  3633         eachColDescr showRowSeparator:false
  3634     ].
  3635     self updateAfterOperation.
  3636 !
  3637 
  3638 selectedColumnsDo:aBlock
  3639     selectedColumnIndex isCollection ifTrue:[
  3640         selectedColumnIndex do:[:idx | aBlock value:(columns at:idx)].
  3641     ] ifFalse:[
  3642         selectedColumnIndex ~~ 0 ifTrue:[
  3643             selectedColumnIndex notNil ifTrue:[
  3644                 aBlock value:(columns at:selectedColumnIndex)
  3645             ]
  3646         ].  
  3647     ].
  3648 !
  3649 
  3650 setCellColorSelectors
  3651     |fgSelector bgSelector|
  3652 
  3653     fgSelector := Dialog request:'FG-Selector for all selected Columns (accept empty for none):'.
  3654     fgSelector isNil ifTrue:[^ self].
  3655 
  3656     bgSelector := Dialog request:'BG-Selector for all selected Columns (accept empty for none):'.
  3657     bgSelector isNil ifTrue:[^ self].
  3658 
  3659     self selectedColumnsDo:[:eachColDescr |
  3660         bgSelector notEmpty ifTrue:[
  3661             eachColDescr backgroundSelector:bgSelector
  3662         ].
  3663         fgSelector notEmpty ifTrue:[
  3664             eachColDescr foregroundSelector:fgSelector
  3665         ].
  3666     ].
  3667     self updateAfterOperation.
  3668 !
  3669 
  3670 setSelectedCellColorSelectors
  3671     |fgSelector bgSelector|
  3672 
  3673     fgSelector := Dialog request:'Selected FG-Selector for all selected Columns (accept empty for none):'.
  3674     fgSelector isNil ifTrue:[^ self].
  3675 
  3676     bgSelector := Dialog request:'Selected BG-Selector for all selected Columns (accept empty for none):'.
  3677     bgSelector isNil ifTrue:[^ self].
  3678 
  3679     self selectedColumnsDo:[:eachColDescr |
  3680         bgSelector notEmpty ifTrue:[
  3681             eachColDescr selectedBackgroundSelector:bgSelector
  3682         ].
  3683         fgSelector notEmpty ifTrue:[
  3684             eachColDescr selectedForegroundSelector:fgSelector
  3685         ].
  3686     ].
  3687     self updateAfterOperation.
  3688 !
  3689 
  3690 updateAfterOperation
  3691     self updateColumnView.
  3692     self updateInputFields.
  3693     self setModified.
  3694 ! !
  3695 
  3696 !DataSetBuilder methodsFor:'private'!
  3697 
  3698 labelFromColumn:aColumn
  3699     |label|
  3700 
  3701     aColumn rendererType == #rowSelector ifTrue:[
  3702         ^ 'Row Selector'
  3703     ].
  3704     label := aColumn label.
  3705     label isNil ifTrue:[^ nil].
  3706 
  3707     label isString ifTrue:[^ label].
  3708 
  3709     label size > 0 ifTrue:[
  3710          label := label at:1.
  3711     ].
  3712     ^ label printString
  3713 !
  3714 
  3715 labelInPreviewPressed:anIndex
  3716    (self componentAt:#labelAndColumns) selection:anIndex
  3717 !
  3718 
  3719 updateColumnView
  3720     "updates the column view from column descriptions"
  3721 
  3722     |size previewColumns columnList|
  3723 
  3724     columnView notNil ifTrue:[
  3725         columnList     := List new.
  3726         previewColumns := OrderedCollection new.
  3727 
  3728         (size := columns size) ~~ 0 ifTrue:[
  3729             columns do:[:aCol|
  3730                 previewColumns add:(aCol copy)
  3731             ].
  3732             previewColumns keysAndValuesDo:[:anIndex :column| 
  3733                 column 
  3734                     readSelector:  #at:;
  3735                     writeSelector: #at:put:;
  3736                     backgroundSelector:nil;
  3737                     foregroundSelector:nil;
  3738                     rowSeparatorSelector:nil;
  3739                     selectSelector: nil;
  3740                     showComboFieldSelector: nil;
  3741                     selectSelector: nil;
  3742                     doubleClickedSelector: nil;
  3743                     printSelector: nil;
  3744                     visibilitySelector: nil;
  3745                     menu: nil;
  3746                     labelActionSelector:#labelInPreviewPressed:;
  3747                     labelActionArgument:anIndex;
  3748                     choices:#choices;
  3749                     sortSelector: nil;
  3750                     isSortable: false
  3751             ].
  3752             #(' 1' ' 2' ' x') do:[:suffix|
  3753                 |oneRow|
  3754 
  3755                 oneRow := Row new:size.
  3756                 1 to:size do:[:i | oneRow at: i put: ('Cell%1-%2' bindWith:suffix with:i)].
  3757                 columnList add: oneRow.
  3758             ]
  3759         ].
  3760 
  3761         columnView list: #().
  3762         columnView columnDescriptors: previewColumns.
  3763         columnView list: columnList.
  3764     ].
  3765 
  3766     "Modified: / 27.10.1998 / 14:41:16 / cg"
  3767 !
  3768 
  3769 updateInputFields
  3770     "reloads item value into input fields"
  3771 
  3772     |column notifyValue|
  3773 
  3774     (column := self selectedColumn) isNil ifTrue:[
  3775         self tabModel value:0.
  3776     ] ifFalse:[
  3777         notifyValue := nil.     "/ old: '' -> problems with Toggles (asBoolean)
  3778 
  3779         aspects do:[:anAspect| anAspect value:notifyValue ].
  3780         aspects keysAndValuesDo:[:aKey :aModel |
  3781             aModel value:(column perform:aKey) withoutNotifying: self
  3782         ].
  3783 
  3784 "/ REPALCE nil by empty string for specific inputFields without an adapter
  3785         #( #labelActionArgument #formatString #id ) do:[:aKey| |model|
  3786             model := aspects at:aKey.
  3787             model value isNil ifTrue:[model value:notifyValue withoutNotifying: self]
  3788         ].
  3789 
  3790         tabSelection == 0 ifTrue:[self tabModel value:1].
  3791     ].
  3792 ! !
  3793 
  3794 !DataSetBuilder methodsFor:'selection'!
  3795 
  3796 selectedColumn
  3797     "returns selected column or nil"
  3798 
  3799     selectedColumnIndex isCollection ifTrue:[
  3800         ^ selectedColumnIndex size == 1 
  3801             ifTrue:[ columns at:selectedColumnIndex first ]
  3802             ifFalse:[ nil ] 
  3803     ].
  3804 
  3805     ^selectedColumnIndex == 0 
  3806         ifFalse:[columns at:selectedColumnIndex ifAbsent: nil]
  3807         ifTrue: [nil]
  3808 !
  3809 
  3810 selectedColumnIndex
  3811     "returns selected column index or 0"
  3812 
  3813     ^selectedColumnIndex
  3814 !
  3815 
  3816 selectedColumnIndex:something
  3817     "changes selected column and updates specifications"
  3818 
  3819     something == selectedColumnIndex ifFalse:[
  3820         selectedColumnIndex := something ? 0.
  3821         "/ self assert:( selectedColumnIndex <= columns size ).
  3822         "/ self assert:( selectedColumnIndex <= self seqList size ).
  3823         self isColumnSelected value: true
  3824     ].
  3825 !
  3826 
  3827 selectedColumnIndices
  3828     "returns selected column indices or #()"
  3829 
  3830     selectedColumnIndex == 0 ifTrue:[ ^ #() ].
  3831     selectedColumnIndex isNumber ifTrue:[ ^ Array with:selectedColumnIndex ].
  3832     ^selectedColumnIndex
  3833 !
  3834 
  3835 selectedColumns
  3836     selectedColumnIndex isCollection ifTrue:[
  3837         ^ selectedColumnIndex collect:[:idx | columns at:idx] 
  3838     ].
  3839 
  3840     ^ selectedColumnIndex == 0 
  3841         ifFalse:[ Array with:(columns at:selectedColumnIndex) ]
  3842         ifTrue: [ #() ]
  3843 !
  3844 
  3845 singleSelectedColumnIndex
  3846     selectedColumnIndex isCollection ifTrue:[
  3847         ^ selectedColumnIndex size == 1 
  3848             ifTrue:[ selectedColumnIndex first ]
  3849             ifFalse:[ 0 ] 
  3850     ].
  3851 
  3852     ^ selectedColumnIndex
  3853 !
  3854 
  3855 tabSelection:something
  3856     "changes selected tab and set corresponding specification"
  3857 
  3858     |view spec|
  3859 
  3860     something == tabSelection ifTrue:[^self].
  3861 
  3862     (tabSelection := something) isNil ifTrue:[
  3863         tabSelection == 0 ifTrue:[^ self].
  3864         tabSelection := 0.
  3865     ].
  3866 
  3867     self selectedColumn isNil ifTrue:[
  3868         tabSelection ~~ 0 ifTrue:[
  3869             self tabModel value:0
  3870         ] ifFalse:[
  3871             self canvasHolder value:nil
  3872         ].
  3873         ^ self
  3874     ].
  3875 
  3876     tabSelection == 0 ifTrue:[
  3877         ^ self tabModel value:1.
  3878     ].
  3879 
  3880     (view := listOfSpecViews at:tabSelection) isNil ifTrue:[
  3881         view := SimpleView new.
  3882         spec := (self class slices at:tabSelection) last.
  3883 
  3884 "/        view client:nil spec:(self class interfaceSpecFor:spec) builder:(self builder).
  3885         view client:self spec:spec builder:(self builder).
  3886         listOfSpecViews at:tabSelection put:view.
  3887     ].
  3888     self canvasHolder value:view
  3889 ! !
  3890 
  3891 !DataSetBuilder methodsFor:'startup & release'!
  3892 
  3893 commonPostBuild
  3894     columnView := self componentAt:#columnView.
  3895 
  3896     columns notEmpty ifTrue: [
  3897         self tabModel value: 1. 
  3898         self selectedColumnModel value:nil; value:1.    "/ toggle to force change
  3899         self updateInputFields.
  3900         self updateInfoLabel.
  3901         self updateHistory
  3902     ].
  3903 
  3904     (self componentAt: #labelAndColumns) 
  3905         selectConditionBlock: [:i|self askForItemModification];
  3906         action: [:i|self cancel];
  3907         selection: 1.
  3908 
  3909     "/ using masters infoHolder ?
  3910     (builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[
  3911         (builder componentAt:#mainPanel) layout bottomOffset:0.
  3912         (builder componentAt:#infoBarSubSpec) beInvisible
  3913     ]                         
  3914 !
  3915 
  3916 openModal
  3917     "sets the modalOpened flag, so later, 
  3918      there is no need to ask for saving into a class"
  3919 
  3920     modalOpened := true.
  3921     super openModal
  3922 !
  3923 
  3924 openModalOnResourceSpec: aListSpec
  3925     "sets the modalOpened flag, so later, 
  3926      there is no need to ask for saving into a class"
  3927 
  3928     modalOpened := true.
  3929     super openModalOnResourceSpec: aListSpec
  3930 
  3931 
  3932 !
  3933 
  3934 postBuildListOfItemsView:aView
  3935     listOfItemsView := aView
  3936 !
  3937 
  3938 postBuildSpecView:aView
  3939     listOfItemsView := aView
  3940 !
  3941 
  3942 postOpenWith:aBuilder
  3943     "reset keyboardProcessor for menuBar"
  3944 
  3945     super postOpenWith:aBuilder.
  3946     aBuilder keyboardProcessor menuBar:nil.
  3947     self windowGroup addPreEventHook:self.
  3948 ! !
  3949 
  3950 !DataSetBuilder methodsFor:'user actions'!
  3951 
  3952 accept
  3953     "accept changes made"
  3954 
  3955     |column type|
  3956 
  3957     super accept.
  3958 
  3959     (column := self selectedColumn) isNil ifTrue: [^self cancel].
  3960 
  3961     type := (aspects at:#rendererType) value.
  3962 
  3963     type == #rowSelector ifTrue:[
  3964         #(label 
  3965           width minWidth usePreferredWidth editorType choices translatedChoices
  3966           readSelector writeSelector printSelector visibilitySelector
  3967           formatString formatSelector type converterSelector size height 
  3968           canSelect selectSelector showComboFieldSelector
  3969           minValue maxValue
  3970          ) do:[:aKey|
  3971             (aspects at:aKey) value:nil
  3972         ]
  3973     ].
  3974     aspects keysAndValuesDo:[:aKey :aModel| 
  3975         column perform:(aKey , ':') asSymbol with: aModel value
  3976     ].
  3977     self seqList at:self singleSelectedColumnIndex put:(self labelFromColumn:column).
  3978     self updateColumnView.
  3979     self cancel.
  3980     self clearModified.
  3981 
  3982     "Modified: / 25-10-2010 / 10:41:55 / cg"
  3983 !
  3984 
  3985 cancel
  3986     "remove all changes and reload selected column values"
  3987 
  3988     self updateInputFields.
  3989     self enablingCommitButtonsHolder value:false.
  3990     self clearModifiedFlag.
  3991     self enablingCommitButtonsHolder value:false.
  3992 
  3993     "Modified: / 27.10.1998 / 14:41:41 / cg"
  3994 !
  3995 
  3996 cutOrDelete:isCut
  3997     "remove selected column and optionally put it to the clipboard"
  3998 
  3999     |indices selectionModel|
  4000 
  4001     ((indices := self selectedColumnIndices) notEmpty and:[self askForItemModification]) ifFalse:[
  4002         ^ self
  4003     ].
  4004     isCut ifTrue:[
  4005         self clipboard: (self selectedColumns)
  4006     ].
  4007 
  4008     selectionModel := self selectedColumnModel.
  4009     selectionModel value:0.
  4010 
  4011     indices sort reverseDo:[:idx |
  4012         columns removeIndex:idx.
  4013         self seqList removeIndex:idx.
  4014     ].
  4015 
  4016     selectionModel value:((indices max) min:(columns size)).
  4017     self updateColumnView.
  4018     self updateInputFields.
  4019 
  4020     columns isEmpty ifTrue:[
  4021         self isColumnSelected value: false
  4022     ].
  4023     self cancel.
  4024     self setModified.
  4025 !
  4026 
  4027 doAddColumn:descr
  4028     "adds a new column after the selected column or at the left (if nothing is selected)"
  4029 
  4030     columns add:descr afterIndex:(self singleSelectedColumnIndex min:columns size).
  4031     self setDefaultValuesInNewColumn:descr.
  4032     self seqList add:(descr label) afterIndex:self singleSelectedColumnIndex.
  4033     self enablingCommitButtonsHolder value ifFalse:[
  4034         self selectedColumnModel value:self singleSelectedColumnIndex + 1
  4035     ].
  4036     self cancel.
  4037     self updateColumnView.
  4038     self setModified.
  4039 !
  4040 
  4041 doBrowseRowClass
  4042     "browse class of columns spec"
  4043 
  4044     |cls|
  4045 
  4046     (cls := self resolveRowClass) notNil 
  4047         ifTrue: [Smalltalk browseInClass:cls] 
  4048         ifFalse:[self information:'No class defined !!']
  4049 
  4050     "Modified: / 20.5.1998 / 03:48:04 / cg"
  4051 !
  4052 
  4053 doCopy
  4054     "copy selected columns to the clipboard"
  4055 
  4056     |cols|
  4057 
  4058     cols := self selectedColumns.
  4059     cols notEmptyOrNil ifTrue:[
  4060         self clipboard:(cols deepCopy)
  4061     ]
  4062 !
  4063 
  4064 doCreateColumn
  4065     "create a new column after selected column or at left (nothing selected)"
  4066 
  4067     |label list dscs descr|
  4068 
  4069 "/    list := self seqList.
  4070 "/    label := 'Column ', (list size + 1) printString.
  4071 "/    columns add:(dscs := DataSetColumnSpec label:label selector:nil) afterIndex:selectedColumnIndex.
  4072 "/    self setDefaultValuesInNewColumn:dscs.
  4073 "/    self seqList add:label afterIndex:selectedColumnIndex.
  4074 "/    self enablingCommitButtonsHolder value ifFalse:[
  4075 "/        self selectedColumnModel value:selectedColumnIndex + 1
  4076 "/    ].
  4077 "/    self cancel.
  4078 "/    self updateColumnView.
  4079 "/    self setModified.
  4080 "/
  4081 
  4082     label := 'Column ', (self seqList size + 1) printString.
  4083     descr := DataSetColumnSpec label:label selector:nil.
  4084     self doAddColumn:descr
  4085 !
  4086 
  4087 doCreateNonSelectableColumn
  4088     "create a new column after selected column or at left (nothing selected)"
  4089 
  4090     |label list dscs descr|
  4091 
  4092 "/    list := self seqList.
  4093 "/    label := 'Column ', (list size + 1) printString.
  4094 "/    columns add:(dscs := DataSetColumnSpec label:label selector:nil) afterIndex:selectedColumnIndex.
  4095 "/    self setDefaultValuesInNewColumn:dscs.
  4096 "/    self seqList add:label afterIndex:selectedColumnIndex.
  4097 "/    self enablingCommitButtonsHolder value ifFalse:[
  4098 "/        self selectedColumnModel value:selectedColumnIndex + 1
  4099 "/    ].
  4100 "/    self cancel.
  4101 "/    self updateColumnView.
  4102 "/    self setModified.
  4103 "/
  4104 
  4105     label := 'Column ', (self seqList size + 1) printString.
  4106     descr := DataSetColumnSpec label:label selector:nil.
  4107     descr canSelect:false.
  4108     self doAddColumn:descr
  4109 !
  4110 
  4111 doCut
  4112     "remove selected column and put it to the clipboard"
  4113 
  4114     self cutOrDelete:true
  4115 !
  4116 
  4117 doDefineRowClass
  4118     "launch a dialog to define class and superclass"
  4119 
  4120     |aspects cls oldClass oldSuper val classNameChannel superclassNameChannel|
  4121 
  4122     aspects  := IdentityDictionary new.
  4123     oldClass := rowClass.
  4124     oldSuper := rowSuperClass.
  4125 
  4126     [true] 
  4127     whileTrue:
  4128     [
  4129         rowClass notNil ifTrue:[
  4130             (cls := self resolveRowClass) notNil ifTrue:[
  4131                 rowSuperClass := cls superclass name asString
  4132             ].
  4133             val := rowClass
  4134         ] ifFalse:[
  4135             val := 'DSVRow'
  4136         ].
  4137         aspects at:#classNameChannel put:(classNameChannel := ValueHolder with:val).
  4138 
  4139         rowSuperClass notNil 
  4140             ifTrue: [val := rowSuperClass] 
  4141             ifFalse:[val := 'Object'].
  4142         aspects at:#superclassNameChannel put:(superclassNameChannel := ValueHolder with:val).
  4143 
  4144         (self openDialogInterface:#defineClassNameSpec withBindings:aspects) 
  4145         ifFalse:
  4146         [
  4147             rowClass := oldClass.
  4148             rowSuperClass := oldSuper.
  4149             ^self
  4150         ].
  4151         rowClass      := (classNameChannel value)      withoutSeparators.
  4152         rowSuperClass := (superclassNameChannel value) withoutSeparators.
  4153 
  4154         rowClass size == 0 
  4155         ifTrue:
  4156         [
  4157             rowClass := nil.
  4158             self information:'no valid className'
  4159         ] 
  4160         ifFalse: 
  4161         [
  4162             cls := self resolveRowClass.
  4163 
  4164             cls notNil ifTrue:[cls := cls superclass name asString].
  4165 
  4166             rowSuperClass size == 0 
  4167             ifTrue:
  4168             [        
  4169                 cls notNil ifTrue:[
  4170                     rowSuperClass := cls
  4171                 ] ifFalse:[
  4172                     rowSuperClass := 'Object'
  4173                 ].
  4174                 self information: 'set superclassName'
  4175             ] 
  4176             ifFalse:
  4177             [
  4178                 (cls isNil or:[rowSuperClass = cls]) ifTrue:[^self].
  4179                 self information:('A global named ' , rowClass , ' exists,\' ,
  4180                                   'but is not a subclass of ' , rowSuperClass, '.\\' ,
  4181                                   'Check and try again if that is not what you want.') withCRs.
  4182 
  4183                 rowSuperClass := cls
  4184             ]
  4185         ]
  4186     ]
  4187 
  4188     "Modified: / 21.5.1998 / 03:08:42 / cg"
  4189 !
  4190 
  4191 doDelete
  4192     "remove selected column and put it to the clipboard"
  4193 
  4194     self cutOrDelete:false
  4195 
  4196 !
  4197 
  4198 doGenerateCode
  4199     "generate code for column values"
  4200 
  4201     |cls superclass|
  4202 
  4203     rowClass isNil ifTrue:[^self information:'No class defined!!'].
  4204     cls := self resolveRowClass.
  4205 
  4206     cls isNil 
  4207     ifTrue:
  4208     [
  4209         superclass := Smalltalk resolveName:rowSuperClass inClass:self class.
  4210 
  4211         superclass isNil ifTrue:[^self information:'No superclass defined!!'].
  4212         (self confirm:'create ' , rowClass , ' ?') ifFalse:[^self].
  4213         cls := superclass subclass:rowClass asSymbol
  4214                      instanceVariableNames:''
  4215                      classVariableNames:''
  4216                      poolDictionaries:''
  4217                      category:'Applications'.
  4218     ].
  4219 
  4220     self generateChoicesIn:cls.
  4221     self generateMenuIn:cls.
  4222     self generatePrintSelectorIn:cls.
  4223     self generateReadSelectorIn:cls.
  4224     self generateBackgroundSelectorIn:cls.
  4225     self generateForegroundSelectorIn:cls.
  4226     self generateSelectSelectorIn:cls.
  4227     self generateWriteSelectorIn:cls.
  4228     self generateDoubleClickSelectorIn:cls.
  4229     self generateRowSeparatorSelectorIn:cls.
  4230     self generateShowComboFieldSelectorIn:cls.
  4231 
  4232 !
  4233 
  4234 doMoveColumn:upOrDown
  4235     "move selected column up or down"
  4236 
  4237     |idx list label col size tabIndex|
  4238 
  4239     (idx := self singleSelectedColumnIndex) == 0 ifTrue:[^self].
  4240     list := self seqList.
  4241     size := list size.
  4242 
  4243     size > 1 ifFalse:[ ^ self ].
  4244 
  4245     selectedColumnIndex := 0.
  4246     tabIndex := self tabModel value.
  4247 
  4248     label := list at:idx.
  4249     col   := columns at:idx.
  4250     list    removeIndex:idx.
  4251     columns removeIndex:idx.
  4252 
  4253     upOrDown == #up ifTrue:[
  4254         idx == 1 ifTrue:[idx := size]
  4255                 ifFalse:[idx := idx - 1]
  4256     ] ifFalse:[
  4257         idx == size ifTrue:[idx := 1]
  4258                    ifFalse:[idx := idx + 1]
  4259     ].
  4260     columns add:col   beforeIndex:idx.
  4261     list    add:label beforeIndex:idx.
  4262 
  4263     self selectedColumnModel value:idx.
  4264     self updateColumnView.
  4265     self tabModel value:tabIndex.
  4266 
  4267     self setModified.
  4268 !
  4269 
  4270 doMoveDown
  4271     self doMoveColumn:#down
  4272 !
  4273 
  4274 doMoveUp
  4275     self doMoveColumn:#up
  4276 !
  4277 
  4278 doPaste
  4279     "paste clipboard copy column after selected column or at left (nothing selected)"
  4280 
  4281     |cols idx newSel|
  4282 
  4283     self askForItemModification ifFalse: [^ self].
  4284 
  4285     cols := self class clipboard.
  4286     cols isEmptyOrNil ifTrue:[^ self].
  4287 
  4288     idx := (self selectedColumnIndices) isEmpty 
  4289                 ifTrue:[ columns size ]
  4290                 ifFalse:[ self selectedColumnIndices max ].
  4291 
  4292     newSel := OrderedCollection new.
  4293     cols do:[:col |
  4294         | lbl|
  4295 
  4296         lbl := self labelFromColumn:col.
  4297 
  4298         columns add:(col deepCopy) afterIndex:idx.
  4299         self seqList add:lbl afterIndex:idx.
  4300         idx := idx + 1.
  4301         newSel add:idx.
  4302     ].
  4303 
  4304     self enablingCommitButtonsHolder value ifFalse:[
  4305         self selectedColumnModel value:newSel "/idx
  4306     ].
  4307     self updateColumnView.
  4308     self updateInputFields.
  4309     self setModified.
  4310 !
  4311 
  4312 doPickColumns
  4313 
  4314     |view cls|
  4315 
  4316     view := Screen current viewFromUser.
  4317     cls  := view class.
  4318 
  4319     (cls == DSVColumnView or:[cls == DataSetView or:[cls == DSVLabelView]]) ifTrue:[
  4320         self columns:(view columnView columnDescriptors)
  4321     ]
  4322 !
  4323 
  4324 doSave
  4325     |cls dst spc category mthd excla code resourceType|
  4326 
  4327     editingSpecOnly == true ifTrue:[
  4328         acceptedColumns := columns.
  4329         hasSaved := true.
  4330         self clearModified.
  4331         ^ self.
  4332     ].
  4333 
  4334     (columns size ~~ 0 and:[super doSave]) ifFalse:[
  4335         ^ nil
  4336     ].
  4337 
  4338     cls := self resolveName:specClass.
  4339     dst := columns collect:[:aCol| aCol literalArrayEncoding ].
  4340     spc := WriteStream on:String new.
  4341     spc nextPutAll:'    ^'.
  4342     UISpecification prettyPrintSpecArray:dst asArray on:spc indent:4.
  4343     spc := spc contents.
  4344 
  4345     "/ if that method already exists, do not overwrite the category
  4346 
  4347     resourceType := self class resourceType.
  4348     category     := resourceType, ' specs'.
  4349 
  4350     (mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[
  4351         category := mthd category.
  4352     ].
  4353 
  4354     excla := Character excla asString.
  4355 
  4356     code := excla
  4357             , (cls name , ' class methodsFor:' , category storeString)
  4358             , excla , '\\'
  4359 
  4360             , specSelector , '\'
  4361             , (self class codeGenerationComment replChar:$!! withString:'!!!!')
  4362             , '\\    "\'
  4363             , ('     DataSetBuilder new openOnClass:' , cls name , ' andSelector:#' , specSelector , '\')
  4364             , '    "\'.
  4365 
  4366     code := code 
  4367             , '\'
  4368             , '    <resource: #', resourceType, '>\\'
  4369             , spc
  4370             , '\'
  4371             , (excla , ' ' , excla)
  4372             , '\\'.
  4373 
  4374     code := code withCRs.
  4375     (ReadStream on:code) fileIn.
  4376 
  4377 "/    self isStandAlone ifTrue: [self helpTool installHelpSpecsOnClass:self specClass].
  4378 
  4379     self updateHistory.
  4380     self updateInfoLabel.
  4381 
  4382     hasSaved := true.
  4383     self clearModified.
  4384 !
  4385 
  4386 openDocumentation
  4387    self openHTMLDocument:'tools/uipainter/DataSetBuilder.html'.
  4388 ! !
  4389 
  4390 !DataSetBuilder::Row methodsFor:'accessing'!
  4391 
  4392 choices
  4393     ^ #( 'foo' 'bar' 'baz' )
  4394 
  4395 
  4396 ! !
  4397 
  4398 !DataSetBuilder::Row methodsFor:'message handling'!
  4399 
  4400 doesNotUnderstand:aMessage
  4401     "does not understand message; delegate to column view
  4402     "
  4403     ^ nil
  4404 
  4405 ! !
  4406 
  4407 !DataSetBuilder class methodsFor:'documentation'!
  4408 
  4409 version
  4410     ^ '$Header$'
  4411 !
  4412 
  4413 version_CVS
  4414     ^ '$Header$'
  4415 ! !