DataSetBuilder.st
author Patrik Svestka <patrik.svestka@gmail.com>
Wed, 14 Nov 2018 12:07:51 +0100
branchjv
changeset 3630 5e718e0a754e
parent 3329 a5fcdace63ba
permissions -rw-r--r--
Issue #239: Fix all Smalltak/X source files to be in unicode (UTF8 without BOM) and prefixed by "{ Encoding: utf8 }" when any unicode character is present

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