DataSetBuilder.st
changeset 1731 d76ed66a63ed
parent 1716 5ae373f6fef0
child 1737 de6abd3c55d2
equal deleted inserted replaced
1730:96674f49b8d7 1731:d76ed66a63ed
   109         converterSelector
   109         converterSelector
   110         showComboFieldSelector
   110         showComboFieldSelector
   111         printSelector
   111         printSelector
   112         readSelector
   112         readSelector
   113         writeSelector
   113         writeSelector
       
   114         visibilitySelector
   114         rendererType
   115         rendererType
   115         showColSeparator
   116         showColSeparator
   116         showSelectionHighLighted
   117         showSelectionHighLighted
   117         showRowSeparator
   118         showRowSeparator
   118         backgroundColor
   119         backgroundColor
   142      UIHelpTool openOnClass:DataSetBuilder    
   143      UIHelpTool openOnClass:DataSetBuilder    
   143     "
   144     "
   144 
   145 
   145     <resource: #help>
   146     <resource: #help>
   146 
   147 
   147     ^super helpSpec addPairsFrom:#(
   148     ^ super helpSpec addPairsFrom:#(
   148 
   149 
   149 #addColumn
   150 #addColumn
   150 'Adds a new column.'
   151 'Adds a new column.'
   151 
   152 
   152 #basicsEditor
   153 #basicsEditor
   283 
   284 
   284 #valuesPrintSelector
   285 #valuesPrintSelector
   285 'Selector used to register images on a DSVColumnView (the arg). For more detailed info see #register... methods in DSVColumnView.'
   286 'Selector used to register images on a DSVColumnView (the arg). For more detailed info see #register... methods in DSVColumnView.'
   286 
   287 
   287 #valuesReadSelector
   288 #valuesReadSelector
   288 'Selector returning the label to be displayed(string, bitmap or a collection).'
   289 'Selector returning the label to be displayed (string, bitmap or a collection).'
       
   290 
       
   291 #valuesVisibilitySelector
       
   292 'Boolean message selector controlling the columns visibility.'
   289 
   293 
   290 #valuesWriteSelector
   294 #valuesWriteSelector
   291 'Selector used to set the value derived from the editor.'
   295 'Selector used to set the value derived from the editor.'
   292 
   296 
   293 )
   297 )
  1256        #(#WindowSpec
  1260        #(#WindowSpec
  1257           #label: 'DataSet Basic'
  1261           #label: 'DataSet Basic'
  1258           #name: 'DataSet Basic'
  1262           #name: 'DataSet Basic'
  1259           #min: #(#Point 10 10)
  1263           #min: #(#Point 10 10)
  1260           #max: #(#Point 1280 1024)
  1264           #max: #(#Point 1280 1024)
  1261           #bounds: #(#Rectangle 13 23 309 329)
  1265           #bounds: #(#Rectangle 16 42 312 356)
  1262         )
  1266         )
  1263         #component: 
  1267         #component: 
  1264        #(#SpecCollection
  1268        #(#SpecCollection
  1265           #collection: #(
  1269           #collection: #(
  1266            #(#FramedBoxSpec
  1270            #(#FramedBoxSpec
  1267               #label: 'Value Selectors:'
  1271               #label: 'Value Selectors:'
  1268               #name: 'valuesBox'
  1272               #name: 'valuesBox'
  1269               #layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 138 0)
  1273               #layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 160 0)
  1270               #labelPosition: #topLeft
  1274               #labelPosition: #topLeft
  1271               #component: 
  1275               #component: 
  1272              #(#SpecCollection
  1276              #(#SpecCollection
  1273                 #collection: #(
  1277                 #collection: #(
  1274                  #(#LabelSpec
  1278                  #(#LabelSpec
  1277                     #layout: #(#AlignmentOrigin 94 0 15 0 1 0.5)
  1281                     #layout: #(#AlignmentOrigin 94 0 15 0 1 0.5)
  1278                     #resizeForLabel: true
  1282                     #resizeForLabel: true
  1279                     #adjust: #right
  1283                     #adjust: #right
  1280                   )
  1284                   )
  1281                  #(#InputFieldSpec
  1285                  #(#InputFieldSpec
  1282                     #attributes: 
       
  1283                    #(#tabable
       
  1284                       true
       
  1285                     )
       
  1286                     #name: 'readSelector'
  1286                     #name: 'readSelector'
  1287                     #layout: #(#LayoutFrame 97 0 4 0 2 1.0 26 0)
  1287                     #layout: #(#LayoutFrame 97 0 4 0 2 1.0 26 0)
  1288                     #activeHelpKey: #valuesReadSelector
  1288                     #activeHelpKey: #valuesReadSelector
  1289                     #tabable: true
  1289                     #tabable: true
  1290                     #model: #readSelector
  1290                     #model: #readSelector
  1301                     #layout: #(#AlignmentOrigin 94 0 40 0 1 0.5)
  1301                     #layout: #(#AlignmentOrigin 94 0 40 0 1 0.5)
  1302                     #resizeForLabel: true
  1302                     #resizeForLabel: true
  1303                     #adjust: #right
  1303                     #adjust: #right
  1304                   )
  1304                   )
  1305                  #(#InputFieldSpec
  1305                  #(#InputFieldSpec
  1306                     #attributes: 
       
  1307                    #(#tabable
       
  1308                       true
       
  1309                     )
       
  1310                     #name: 'writeSelector'
  1306                     #name: 'writeSelector'
  1311                     #layout: #(#LayoutFrame 97 0 29 0 2 1.0 51 0)
  1307                     #layout: #(#LayoutFrame 97 0 29 0 2 1.0 51 0)
  1312                     #activeHelpKey: #valuesWriteSelector
  1308                     #activeHelpKey: #valuesWriteSelector
  1313                     #tabable: true
  1309                     #tabable: true
  1314                     #model: #writeSelector
  1310                     #model: #writeSelector
  1325                     #layout: #(#AlignmentOrigin 94 0 65 0 1 0.5)
  1321                     #layout: #(#AlignmentOrigin 94 0 65 0 1 0.5)
  1326                     #resizeForLabel: true
  1322                     #resizeForLabel: true
  1327                     #adjust: #right
  1323                     #adjust: #right
  1328                   )
  1324                   )
  1329                  #(#InputFieldSpec
  1325                  #(#InputFieldSpec
  1330                     #attributes: 
       
  1331                    #(#tabable
       
  1332                       true
       
  1333                     )
       
  1334                     #name: 'converterField'
  1326                     #name: 'converterField'
  1335                     #layout: #(#LayoutFrame 97 0 54 0 2 1.0 76 0)
  1327                     #layout: #(#LayoutFrame 97 0 54 0 2 1.0 76 0)
  1336                     #activeHelpKey: #converterSelector
  1328                     #activeHelpKey: #converterSelector
  1337                     #tabable: true
  1329                     #tabable: true
  1338                     #model: #converterSelector
  1330                     #model: #converterSelector
  1349                     #layout: #(#AlignmentOrigin 94 0 90 0 1 0.5)
  1341                     #layout: #(#AlignmentOrigin 94 0 90 0 1 0.5)
  1350                     #resizeForLabel: true
  1342                     #resizeForLabel: true
  1351                     #adjust: #right
  1343                     #adjust: #right
  1352                   )
  1344                   )
  1353                  #(#InputFieldSpec
  1345                  #(#InputFieldSpec
  1354                     #attributes: 
       
  1355                    #(#tabable
       
  1356                       true
       
  1357                     )
       
  1358                     #name: 'printSelector'
  1346                     #name: 'printSelector'
  1359                     #layout: #(#LayoutFrame 97 0 79 0 2 1.0 101 0)
  1347                     #layout: #(#LayoutFrame 97 0 79 0 2 1.0 101 0)
  1360                     #activeHelpKey: #valuesPrintSelector
  1348                     #activeHelpKey: #valuesPrintSelector
  1361                     #tabable: true
  1349                     #tabable: true
  1362                     #model: #printSelector
  1350                     #model: #printSelector
  1365                     #acceptOnLostFocus: false
  1353                     #acceptOnLostFocus: false
  1366                     #acceptChannel: #acceptChannel
  1354                     #acceptChannel: #acceptChannel
  1367                     #modifiedChannel: #modifiedChannel
  1355                     #modifiedChannel: #modifiedChannel
  1368                     #acceptOnPointerLeave: false
  1356                     #acceptOnPointerLeave: false
  1369                   )
  1357                   )
       
  1358                  #(#LabelSpec
       
  1359                     #label: 'Visibility:'
       
  1360                     #name: 'visibilityLabel'
       
  1361                     #layout: #(#AlignmentOrigin 94 0 115 0 1 0.5)
       
  1362                     #resizeForLabel: true
       
  1363                     #adjust: #right
       
  1364                   )
       
  1365                  #(#InputFieldSpec
       
  1366                     #name: 'visibilitySelector'
       
  1367                     #layout: #(#LayoutFrame 97 0 104 0 2 1.0 126 0)
       
  1368                     #activeHelpKey: #valuesVisibilitySelector
       
  1369                     #tabable: true
       
  1370                     #model: #visibilitySelector
       
  1371                     #group: #inputGroup
       
  1372                     #type: #symbolOrNil
       
  1373                     #acceptOnLostFocus: false
       
  1374                     #acceptChannel: #acceptChannel
       
  1375                     #modifiedChannel: #modifiedChannel
       
  1376                     #acceptOnPointerLeave: false
       
  1377                   )
  1370                  )
  1378                  )
  1371                
  1379                
  1372               )
  1380               )
  1373             )
  1381             )
  1374            #(#FramedBoxSpec
  1382            #(#FramedBoxSpec
  1375               #label: 'Menu:'
  1383               #label: 'Menu:'
  1376               #name: 'menusBox'
  1384               #name: 'menusBox'
  1377               #layout: #(#LayoutFrame 0 0.0 143 0 0 1.0 200 0)
  1385               #layout: #(#LayoutFrame 0 0.0 161 0 0 1.0 218 0)
  1378               #labelPosition: #topLeft
  1386               #labelPosition: #topLeft
  1379               #component: 
  1387               #component: 
  1380              #(#SpecCollection
  1388              #(#SpecCollection
  1381                 #collection: #(
  1389                 #collection: #(
  1382                  #(#LabelSpec
  1390                  #(#LabelSpec
  1385                     #layout: #(#AlignmentOrigin 94 0 12 0 1 0.5)
  1393                     #layout: #(#AlignmentOrigin 94 0 12 0 1 0.5)
  1386                     #resizeForLabel: true
  1394                     #resizeForLabel: true
  1387                     #adjust: #right
  1395                     #adjust: #right
  1388                   )
  1396                   )
  1389                  #(#InputFieldSpec
  1397                  #(#InputFieldSpec
  1390                     #attributes: 
       
  1391                    #(#tabable
       
  1392                       true
       
  1393                     )
       
  1394                     #name: 'menuSelector'
  1398                     #name: 'menuSelector'
  1395                     #layout: #(#LayoutFrame 97 0 1 0 2 1.0 23 0)
  1399                     #layout: #(#LayoutFrame 97 0 1 0 2 1.0 23 0)
  1396                     #activeHelpKey: #valuesMenuSelector
  1400                     #activeHelpKey: #valuesMenuSelector
  1397                     #tabable: true
  1401                     #tabable: true
  1398                     #model: #menu
  1402                     #model: #menu
  1408               )
  1412               )
  1409             )
  1413             )
  1410            #(#FramedBoxSpec
  1414            #(#FramedBoxSpec
  1411               #label: 'Combo List/Box Selectors:'
  1415               #label: 'Combo List/Box Selectors:'
  1412               #name: 'framedBox1'
  1416               #name: 'framedBox1'
  1413               #layout: #(#LayoutFrame 1 0.0 205 0 1 1.0 293 0)
  1417               #layout: #(#LayoutFrame 1 0.0 223 0 1 1.0 311 0)
  1414               #labelPosition: #topLeft
  1418               #labelPosition: #topLeft
  1415               #component: 
  1419               #component: 
  1416              #(#SpecCollection
  1420              #(#SpecCollection
  1417                 #collection: #(
  1421                 #collection: #(
  1418                  #(#LabelSpec
  1422                  #(#LabelSpec
  1422                     #activeHelpKey: #valuesChoiceSelector
  1426                     #activeHelpKey: #valuesChoiceSelector
  1423                     #resizeForLabel: true
  1427                     #resizeForLabel: true
  1424                     #adjust: #right
  1428                     #adjust: #right
  1425                   )
  1429                   )
  1426                  #(#InputFieldSpec
  1430                  #(#InputFieldSpec
  1427                     #attributes: 
       
  1428                    #(#tabable
       
  1429                       true
       
  1430                     )
       
  1431                     #name: 'ChoicesField'
  1431                     #name: 'ChoicesField'
  1432                     #layout: #(#LayoutFrame 97 0 4 0 2 1.0 26 0)
  1432                     #layout: #(#LayoutFrame 97 0 4 0 2 1.0 26 0)
  1433                     #activeHelpKey: #valuesChoiceSelector
  1433                     #activeHelpKey: #valuesChoiceSelector
  1434                     #tabable: true
  1434                     #tabable: true
  1435                     #model: #choices
  1435                     #model: #choices
  1448                     #activeHelpKey: #showComboFieldSelector
  1448                     #activeHelpKey: #showComboFieldSelector
  1449                     #resizeForLabel: true
  1449                     #resizeForLabel: true
  1450                     #adjust: #right
  1450                     #adjust: #right
  1451                   )
  1451                   )
  1452                  #(#InputFieldSpec
  1452                  #(#InputFieldSpec
  1453                     #attributes: 
       
  1454                    #(#tabable
       
  1455                       true
       
  1456                     )
       
  1457                     #name: 'ShowInputFieldField'
  1453                     #name: 'ShowInputFieldField'
  1458                     #layout: #(#LayoutFrame 97 0 30 0 2 1.0 52 0)
  1454                     #layout: #(#LayoutFrame 97 0 30 0 2 1.0 52 0)
  1459                     #activeHelpKey: #showComboFieldSelector
  1455                     #activeHelpKey: #showComboFieldSelector
  1460                     #tabable: true
  1456                     #tabable: true
  1461                     #model: #showComboFieldSelector
  1457                     #model: #showComboFieldSelector
  1473             )
  1469             )
  1474            )
  1470            )
  1475          
  1471          
  1476         )
  1472         )
  1477       )
  1473       )
  1478 
       
  1479     "Modified: / 30.1.2000 / 02:39:03 / cg"
       
  1480 !
  1474 !
  1481 
  1475 
  1482 windowSpec
  1476 windowSpec
  1483     "This resource specification was automatically generated
  1477     "This resource specification was automatically generated
  1484      by the UIPainter of ST/X."
  1478      by the UIPainter of ST/X."
  2598         (size := columns size) ~~ 0 ifTrue:[
  2592         (size := columns size) ~~ 0 ifTrue:[
  2599             columns do:[:aCol|
  2593             columns do:[:aCol|
  2600                 previewColumns add:(aCol copy)
  2594                 previewColumns add:(aCol copy)
  2601             ].
  2595             ].
  2602             previewColumns keysAndValuesDo:[:anIndex :column| 
  2596             previewColumns keysAndValuesDo:[:anIndex :column| 
  2603                 column readSelector:  #at:;
  2597                 column 
       
  2598                     readSelector:  #at:;
  2604                     writeSelector: #at:put:;
  2599                     writeSelector: #at:put:;
  2605                     backgroundSelector:nil;
  2600                     backgroundSelector:nil;
  2606                     foregroundSelector:nil;
  2601                     foregroundSelector:nil;
  2607                     rowSeparatorSelector:nil;
  2602                     rowSeparatorSelector:nil;
  2608                     selectSelector: nil;
  2603                     selectSelector: nil;
  2609                     showComboFieldSelector: nil;
  2604                     showComboFieldSelector: nil;
  2610                     selectSelector: nil;
  2605                     selectSelector: nil;
  2611                     doubleClickedSelector: nil;
  2606                     doubleClickedSelector: nil;
  2612                     printSelector: nil;
  2607                     printSelector: nil;
       
  2608                     visibilitySelector: nil;
  2613                     menu: nil;
  2609                     menu: nil;
  2614                     labelActionSelector:#labelInPreviewPressed:;
  2610                     labelActionSelector:#labelInPreviewPressed:;
  2615                     labelActionArgument:anIndex;
  2611                     labelActionArgument:anIndex;
  2616                     choices:#choices
  2612                     choices:#choices
  2617             ].
  2613             ].
  2777     (column := self selectedColumn) isNil ifTrue: [^self cancel].
  2773     (column := self selectedColumn) isNil ifTrue: [^self cancel].
  2778 
  2774 
  2779     type := (aspects at:#rendererType) value.
  2775     type := (aspects at:#rendererType) value.
  2780 
  2776 
  2781     type == #rowSelector ifTrue:[
  2777     type == #rowSelector ifTrue:[
  2782         #(label width minWidth usePreferredWidth editorType choices readSelector writeSelector printSelector
  2778         #(label 
       
  2779           width minWidth usePreferredWidth editorType choices 
       
  2780           readSelector writeSelector printSelector visibilitySelector
  2783           formatString type converterSelector size height canSelect selectSelector showComboFieldSelector
  2781           formatString type converterSelector size height canSelect selectSelector showComboFieldSelector
  2784          ) do:[:aKey|
  2782          ) do:[:aKey|
  2785             (aspects at:aKey) value:nil
  2783             (aspects at:aKey) value:nil
  2786         ]
  2784         ]
  2787     ].
  2785     ].
  2790     ].
  2788     ].
  2791     self seqList at:selectedColumnIndex put:(self labelFromColumn:column).
  2789     self seqList at:selectedColumnIndex put:(self labelFromColumn:column).
  2792     self updateColumnView.
  2790     self updateColumnView.
  2793     self cancel.
  2791     self cancel.
  2794     modified := true.
  2792     modified := true.
  2795 
       
  2796 !
  2793 !
  2797 
  2794 
  2798 cancel
  2795 cancel
  2799     "remove all changes and reload selected column values"
  2796     "remove all changes and reload selected column values"
  2800 
  2797