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