ca@332: " tz@825: COPYRIGHT (c) 1997 by eXept Software AG ca@332: All Rights Reserved ca@332: ca@332: This software is furnished under a license and may be used ca@332: only in accordance with the terms of that license and with the ca@332: inclusion of the above copyright notice. This software may not ca@332: be provided or otherwise made available to, or used by, any ca@332: other person. No title to or ownership of the software is ca@332: hereby transferred. ca@332: " cg@1382: "{ Package: 'stx:libtool2' }" cg@1382: ca@818: ResourceSpecEditor subclass:#DataSetBuilder tz@825: instanceVariableNames:'rowClass rowSuperClass columnView columns selectedColumnIndex cg@2549: modalOpened listOfSpecViews listOfItemsView editingSpecOnly cg@2549: acceptedColumns' cg@816: classVariableNames:'' ca@332: poolDictionaries:'' ca@332: category:'Interface-UIPainter' ca@332: ! ca@332: cg@1033: Array variableSubclass:#Row cg@1004: instanceVariableNames:'' cg@1004: classVariableNames:'' cg@1004: poolDictionaries:'' cg@1004: privateIn:DataSetBuilder cg@1004: ! cg@1004: ca@332: !DataSetBuilder class methodsFor:'documentation'! ca@332: ca@332: copyright ca@332: " tz@825: COPYRIGHT (c) 1997 by eXept Software AG ca@332: All Rights Reserved ca@332: ca@332: This software is furnished under a license and may be used ca@332: only in accordance with the terms of that license and with the ca@332: inclusion of the above copyright notice. This software may not ca@332: be provided or otherwise made available to, or used by, any ca@332: other person. No title to or ownership of the software is ca@332: hereby transferred. ca@332: " ca@332: ca@332: ca@332: ca@332: ca@332: ! ca@332: ca@332: documentation ca@332: " ca@332: create and modify or inspect dataset columns; used by UIPainter (DataSetColumnSpec) ca@332: ca@332: [see also:] ca@332: DataSetColumnSpec ca@332: DataSetSpec ca@332: DataSetView ca@332: DataSetColumn ca@332: ca@332: [author:] tz@545: Claus Atzkern, eXept Software AG ca@332: " ca@332: ca@332: ! ! ca@332: tz@825: !DataSetBuilder class methodsFor:'accessing'! cg@799: ca@818: resourceType ca@818: "get the type of resource of the method generated by the MenuEditor" ca@818: tz@825: ^#tableColumns tz@825: tz@825: tz@825: ! ! tz@825: tz@825: !DataSetBuilder class methodsFor:'aspects'! tz@825: tz@825: aspects tz@825: "get the aspects for the attributes of the table columns" tz@825: tz@825: ^#( cg@829: id cg@2166: activeHelpKey cg@2385: activeHelpKeyForLabel tz@825: label tz@825: canSelect tz@825: choices cg@1944: translatedChoices tz@825: editorType tz@825: formatString cg@2475: formatSelector tz@825: labelIsImage ca@1262: labelButtonType cg@829: translateLabel cg@1666: longStringCompression tz@825: size tz@825: type tz@825: width tz@825: minWidth cg@1216: usePreferredWidth ca@1452: isResizeable tz@825: height tz@825: menu tz@825: foregroundSelector tz@825: backgroundSelector cg@1841: selectedForegroundSelector cg@1841: selectedBackgroundSelector tz@825: doubleClickedSelector ca@983: rowSeparatorSelector tz@825: selectSelector ca@1261: converterSelector cg@1009: showComboFieldSelector tz@825: printSelector tz@825: readSelector tz@825: writeSelector penk@1731: visibilitySelector tz@825: rendererType tz@825: showColSeparator ca@983: showSelectionHighLighted tz@825: showRowSeparator tz@825: backgroundColor tz@825: foregroundColor cg@1841: selectedBackgroundColor cg@1841: selectedForegroundColor tz@825: labelForegroundColor tz@825: labelBackgroundColor tz@825: labelFont tz@825: labelActionSelector tz@825: labelActionArgument tz@825: labelAlignment tz@825: columnAlignment werner@1822: minValue werner@1822: maxValue cg@2475: isSortable tz@825: ) tz@825: cg@2166: "Modified: / 26-03-2007 / 14:05:10 / cg" cg@799: ! ! cg@799: tz@528: !DataSetBuilder class methodsFor:'help specs'! tz@528: cg@1887: flyByHelpSpec cg@1887: "This resource specification was automatically generated cg@1887: by the UIHelpTool of ST/X." cg@1887: cg@1887: "Do not manually edit this!! If it is corrupted, cg@1887: the UIHelpTool may not be able to read the specification." cg@1887: cg@1887: " cg@1887: UIHelpTool openOnClass:DataSetBuilder cg@1887: " cg@1887: cg@1887: cg@1887: cg@1887: ^ super flyByHelpSpec addPairsFrom:#( cg@1887: cg@1887: #addColumn cg@1887: 'Add a Column' cg@1887: cg@2262: #addNonSelectableColumn cg@2262: 'Add a Non-Selectable Column' cg@2262: cg@1887: #fileLoad cg@1887: 'Load Column Description from Method' cg@1887: cg@1887: #fileNew cg@1887: 'New Column Description' cg@1887: cg@1887: #fileSave cg@2549: 'Save the Column Description' cg@2549: cg@2549: #fileSaveMethod cg@1887: 'Save Column Description as Method' cg@1887: cg@2549: #fileSaveAsMethod cg@2549: 'Save Column Description as Method (ask for Class/Selector)' cg@1887: cg@1887: #editCut cg@1887: 'Cut Column' cg@1887: cg@1887: #editCopy cg@1887: 'Copy Column' cg@1887: cg@1887: #editPaste cg@1887: 'Paste Column' cg@1887: cg@1887: ) cg@1887: ! cg@1887: tz@528: helpSpec ca@818: "This resource specification was automatically generated ca@818: by the UIHelpTool of ST/X." ca@818: ca@818: "Do not manually edit this!! If it is corrupted, ca@818: the UIHelpTool may not be able to read the specification." tz@528: tz@528: " ca@818: UIHelpTool openOnClass:DataSetBuilder tz@528: " tz@528: ca@818: ca@818: penk@1731: ^ super helpSpec addPairsFrom:#( tz@528: tz@550: #addColumn tz@550: 'Adds a new column.' tz@550: cg@2262: #addNonSelectableColumn cg@2262: 'Adds a new non-selectable column.' cg@2262: tz@597: #basicsEditor cg@829: 'Default widget type or a selector returning an instance of a user defined widget opened in the cell.' tz@528: tz@597: #basicsFont cg@1004: 'Sets the font of the labeled text.' tz@528: cg@2475: #isSortable cg@2475: 'Adds indicator to allow user to sort rows based on this column.' cg@2475: cg@2475: #sortSelector cg@2475: 'Sent to the row to extract the column-value used for sorting' cg@2475: tz@597: #basicsJustification cg@1004: 'Aligns the label to the left, right, or center in the cell.' tz@528: cg@1064: #basicsJustificationEditor cg@1064: 'Aligns the column editor to the left, right, or center in the cell.' cg@1064: tz@597: #basicsLabel ca@1818: 'The label of the column, a String or an array of Strings.' cg@1004: cg@1004: #basicsLabelId cg@1004: 'Unique identifier of the column (optional).' tz@597: tz@597: #basicsLabelIsImage cg@1064: 'Label is actually the selector of a message providing an image-label.' cg@1004: cg@1004: #basicsLabelTranslate cg@1004: 'Translate the label via the resource mechanism to a national language string.' tz@528: tz@597: #basicsRenderer tz@597: 'Specifies displaying cell as Text, CheckToggle, ComboBox, ComboList or as a RowSelector.' tz@528: cg@829: #browseRowClass cg@829: 'Open a browser on the row class' cg@829: tz@597: #colorsBackgroundCellColor cg@1841: 'The background color of the cell.' tz@597: tz@597: #colorsBackgroundLabelColor cg@1841: 'The background color of the label.' tz@528: tz@597: #colorsBackgroundSelector cg@1841: 'Optional selector returning the background color for the cell.' tz@528: tz@597: #colorsForegroundCellColor cg@1841: 'The foreground color of the cell.' tz@597: tz@597: #colorsForegroundLabelColor cg@1841: 'The foreground color of the label.' tz@528: tz@597: #colorsForegroundSelector cg@1841: 'Optional selector returning the foreground color for a cell.' tz@528: ca@1261: #converterSelector ca@1261: 'Selector returning a TypeConverter on the model the argument or nil.' cg@829: cg@829: #fileLoad cg@829: 'Specify class/selector and edit that column description' cg@829: ca@1261: #fileNew ca@1261: 'Discard changes and continue with a new, empty column description' ca@1261: cg@829: #fileSave cg@829: 'Install the column description' cg@829: cg@829: #fileSaveAs cg@829: 'Specify class/selector and install the column description' cg@829: werner@1824: #formatFormatSelector cg@2475: 'Selector sent to the row to get the format string.' werner@1824: tz@597: #formatInputType tz@597: 'A type converter symbol used by the input field.' tz@528: tz@597: #formatMaxSize tz@597: 'Maximum size of the string which can be typed in. 0 or nil means unlimited.' tz@528: tz@597: #formatTextFormat cg@2475: 'Format string specifying the output format of the cell text. (printf-format - for example: %5.4f gives 0.0000).' tz@597: tz@597: #frameColumnWidth cg@1202: 'Width (fixed or relative) of a column (optional).' tz@528: tz@597: #frameMinWidth tz@597: 'Minimum width of the column (optional).' tz@528: tz@597: #frameRowHeight tz@597: 'Height of the row (optional).' tz@597: tz@597: #frameShowColumnSeparator tz@597: 'Turns on/off displaying column separators.' tz@528: tz@597: #frameShowRowSeparator tz@597: 'Turns on/off displaying row separators.' tz@528: ca@983: #frameShowRowSeparatorSelector penk@1580: 'Message selector to test if the bottom separator is shown.' ca@983: cg@829: #generateCode cg@829: 'Generate code and install in the selected class/selector.' cg@829: penk@1580: #isResizable penk@1580: 'Column can be resized by user.' penk@1580: cg@829: #pickColumns cg@829: 'Select an open view and readOut the column specification from it.' cg@829: cg@1841: #selectedBackgroundCellColor cg@1841: 'Optional background color of a selected cell.' cg@1841: cg@1841: #selectedBackgroundCellColorSelector cg@1841: 'Optional selector returning the background color for a selected cell.' cg@1841: cg@1841: #selectedForegroundCellColor cg@1841: 'Optional foreground color of a selected cell.' cg@1841: cg@1841: #selectedForegroundCellColorSelector cg@1841: 'Optional selector returning the foreground color for a selected cell.' cg@1841: tz@597: #selectionCellClickSelector cg@1753: 'Message sent if cell is about to be selected - return boolean to en/disable editing' tz@528: tz@597: #selectionCellDoubleClickSelector cg@1753: 'Message sent if cell is double clicked' tz@528: tz@597: #selectionCellSelector cg@1004: 'Name of the message sent to the row to validate a selection.' tz@528: tz@597: #selectionIsSelectable tz@597: 'Turns on/off selection behavior of a column.' tz@597: tz@597: #selectionLabelClickSelector cg@1754: 'Message sent if a columns label was clicked on' tz@528: tz@597: #selectionLabelSelectorArgument cg@1064: 'An optional argument passed with the message above.' tz@528: cg@1009: #showComboFieldSelector cg@1009: 'Selector which returns true if the editor on the ComboBox/List has an input field.' cg@1009: ca@983: #showSelectionHighLighted ca@983: 'Show selected cell highligthened (change fg/bg color).' ca@983: penk@1580: #usePreferredWidth penk@1580: 'Compute width from first 10 row items.' penk@1580: cg@1944: #valuesChoicesSelector cg@1004: 'Selector to get a collection of choices for a cell having a ComboBox or a ComboList widget.' tz@528: tz@597: #valuesMenuSelector cg@1004: 'Selector to retrive the middle button menu.' tz@597: tz@597: #valuesPrintSelector cg@1004: 'Selector used to register images on a DSVColumnView (the arg). For more detailed info see #register... methods in DSVColumnView.' tz@528: tz@597: #valuesReadSelector penk@1731: 'Selector returning the label to be displayed (string, bitmap or a collection).' penk@1731: penk@1731: #valuesVisibilitySelector penk@1731: 'Boolean message selector controlling the columns visibility.' tz@528: tz@597: #valuesWriteSelector cg@1004: 'Selector used to set the value derived from the editor.' tz@528: cg@1944: #valuesXChoicesSelector cg@1944: 'Selector to get a collection of translated choices for a cell having a ComboBox or a ComboList widget.' cg@1944: tz@528: ) tz@528: ! ! tz@528: tz@881: !DataSetBuilder class methodsFor:'image specs'! tz@881: tz@881: newColumnIcon tz@881: "This resource specification was automatically generated tz@881: by the ImageEditor of ST/X." tz@881: tz@881: "Do not manually edit this!! If it is corrupted, tz@881: the ImageEditor may not be able to read the specification." tz@881: tz@881: " tz@881: self newColumnIcon inspect tz@881: ImageEditor openOnClass:self andSelector:#newColumnIcon cg@2262: Icon flushCachedIcons tz@881: " tz@881: tz@881: tz@881: tz@881: ^Icon cg@2262: constantNamed:#'DataSetBuilder class newColumnIcon' cg@2262: ifAbsentPut:[(Depth2Image new) width: 19; height: 22; photometric:(#palette); bitsPerSample:(#[2]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' cg@2262: U@@@@EQTUUUXUEQ***1TUF (+EQTX*H,UEQ"("1TUF (+EQTZ**,UEQ"("1TUFJ"KEQTX*H,UEQ HB1TUF**+EQTZ**,UEQ"H"1TUF@ KEQTX"@,UEQ"H"1T cg@2262: UF**+EQTZ**,UER???1TU@@@@EPb') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 19; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@') ; yourself); yourself] cg@2262: ! cg@2262: cg@2262: newColumnNonSelectableIcon cg@2262: "This resource specification was automatically generated cg@2262: by the ImageEditor of ST/X." cg@2262: cg@2262: "Do not manually edit this!! If it is corrupted, cg@2262: the ImageEditor may not be able to read the specification." cg@2262: cg@2262: " cg@2262: self newColumnNonSelectableIcon inspect cg@2262: ImageEditor openOnClass:self andSelector:#newColumnNonSelectableIcon cg@2262: Icon flushCachedIcons cg@2262: " cg@2262: cg@2262: cg@2262: cg@2262: ^Icon cg@2262: constantNamed:#'DataSetBuilder class newColumnNonSelectableIcon' cg@2262: ifAbsentPut:[(Depth2Image new) width: 19; height: 22; photometric:(#palette); bitsPerSample:(#[2]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' cg@2262: U@@@@EQTUUUXUEQ***1TUF**+EQTX*(,UEQ"*"1TUFB(KEQTZJ",UEQ(HJ1TUF("+EQTZ J,UEQ*@*1TUF("+EQTZBB,UEQ(*J1TUFB(KEQTX*(,UEQ"*"1T cg@2262: UF**+EQTZ**,UER???1TU@@@@EPb') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 19; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@G?<@') ; yourself); yourself] ca@1452: ! ! tz@881: tz@528: !DataSetBuilder class methodsFor:'interface specs'! ca@332: ca@332: basicsEditSpec ca@817: "This resource specification was automatically generated ca@817: by the UIPainter of ST/X." ca@332: ca@817: "Do not manually edit this!! If it is corrupted, ca@817: the UIPainter may not be able to read the specification." ca@332: ca@332: " ca@332: UIPainter new openOnClass:DataSetBuilder andSelector:#basicsEditSpec ca@332: DataSetBuilder new openInterface:#basicsEditSpec ca@332: " ca@332: ca@332: ca@332: cg@1156: ^ sv@1737: #(FullSpec sv@1737: name: basicsEditSpec sv@1737: window: sv@1737: (WindowSpec sv@1737: label: 'DataSet Basic' sv@1737: name: 'DataSet Basic' sv@1737: min: (Point 10 10) cg@2475: bounds: (Rectangle 0 0 389 473) cg@1156: ) sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( cg@2475: (VerticalPanelViewSpec cg@2475: name: 'VerticalPanel1' cg@2475: layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) cg@2475: horizontalLayout: fit cg@2475: verticalLayout: top cg@2475: horizontalSpace: 3 cg@2475: verticalSpace: 3 sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( cg@2475: (FramedBoxSpec cg@2475: label: 'Header:' cg@2475: name: 'headerFrame' cg@2475: labelPosition: topLeft cg@2166: translateLabel: true cg@2475: component: cg@2475: (SpecCollection cg@2475: collection: ( cg@2475: (LabelSpec cg@2475: label: 'ID:' cg@2475: name: 'idLabel' cg@2475: layout: (AlignmentOrigin 94 0 14 0 1 0.5) cg@2475: translateLabel: true cg@2475: resizeForLabel: true cg@2475: ) cg@2475: (InputFieldSpec cg@2475: name: 'idField' cg@2475: layout: (LayoutFrame 97 0 0 0 2 1.0 22 0) cg@2475: activeHelpKey: basicsLabelId cg@2475: tabable: true cg@2475: model: id cg@2475: group: inputGroup cg@2475: acceptOnLostFocus: false cg@2475: acceptChannel: acceptChannel cg@2475: modifiedChannel: modifiedChannel cg@2475: acceptOnPointerLeave: false cg@2475: ) cg@2475: (LabelSpec cg@2475: label: 'Label:' cg@2475: name: 'label1' cg@2475: layout: (AlignmentOrigin 94 0 39 0 1 0.5) cg@2475: translateLabel: true cg@2475: resizeForLabel: true cg@2475: ) cg@2475: (InputFieldSpec cg@2475: name: 'labelField' cg@2475: layout: (LayoutFrame 97 0 28 0 2 1.0 50 0) cg@2475: activeHelpKey: basicsLabel cg@2475: tabable: true cg@2475: model: label cg@2475: group: inputGroup cg@2475: type: smalltalkObject cg@2475: immediateAccept: false cg@2475: acceptOnLeave: false cg@2475: acceptOnLostFocus: false cg@2475: acceptChannel: acceptChannel cg@2475: modifiedChannel: modifiedChannel cg@2475: acceptOnPointerLeave: false cg@2475: ) cg@2475: (LabelSpec cg@2475: label: 'Font:' cg@2475: name: 'LabelFont' cg@2475: layout: (AlignmentOrigin 94 0 68 0 1 0.5) cg@2475: translateLabel: true cg@2475: resizeForLabel: true cg@2475: adjust: left cg@2475: ) cg@2475: (FontMenuSpec cg@2475: name: 'fontMenu' cg@2475: layout: (LayoutFrame 97 0 56 0 0 1.0 78 0) cg@2475: activeHelpKey: labelFont cg@2475: model: style cg@2475: allowSymbolicFonts: true cg@2475: ) cg@2475: (LabelSpec cg@2475: label: 'Type:' cg@2475: name: 'Type' cg@2475: layout: (AlignmentOrigin 52 0 100 0 1 0.5) cg@2475: translateLabel: true cg@2475: resizeForLabel: true cg@2475: adjust: right cg@2475: ) cg@2475: (ComboListSpec cg@2475: name: 'labelButtonType' cg@2475: layout: (LayoutFrame 57 0 91 0 158 0 111 0) cg@2475: tabable: true cg@2475: model: labelButtonType cg@2475: comboList: cg@2475: (Array cg@2475: None Button cg@2475: Group cg@2475: ) cg@2475: useIndex: false cg@2475: hidePullDownMenuButton: false cg@2475: ) cg@2475: (LabelSpec cg@2475: label: 'Align:' cg@2475: name: 'JustificationLabel' cg@2475: layout: (AlignmentOrigin 243 0 100 0 1 0.5) cg@2475: translateLabel: true cg@2475: resizeForLabel: true cg@2475: adjust: right cg@2475: ) cg@2475: (PopUpListSpec cg@2475: label: 'Alignment' cg@2475: name: 'Alignment' cg@2475: layout: (LayoutFrame 248 0 91 0 2 1.0 113 0) cg@2475: activeHelpKey: basicsJustification cg@2475: tabable: true cg@2475: model: labelAlignment cg@2475: menu: cg@2475: (Array cg@2475: left right cg@2475: center cg@2475: ) cg@2475: ) cg@2475: (CheckBoxSpec cg@2475: label: 'Label Is Image' cg@2475: name: 'labelIsImage' cg@2475: layout: (LayoutOrigin -3 0 120 0) cg@2475: activeHelpKey: basicsLabelIsImage cg@2475: tabable: true cg@2475: model: labelIsImage cg@2475: translateLabel: true cg@2475: ) cg@2475: (CheckBoxSpec cg@2475: label: 'Translate Label' cg@2475: name: 'CheckBox2' cg@2475: layout: (LayoutOrigin 200 0 120 0) cg@2475: activeHelpKey: basicsLabelTranslate cg@2475: tabable: true cg@2475: model: translateLabel cg@2475: translateLabel: true cg@2475: ) cg@2475: ) cg@2475: tz@408: ) cg@2475: extent: (Point 389 176) cg@1156: ) cg@2475: (FramedBoxSpec cg@2475: label: 'Cell Type:' cg@2475: name: 'typesFrame' cg@2475: labelPosition: topLeft cg@2166: translateLabel: true cg@2475: component: cg@2475: (SpecCollection cg@2475: collection: ( cg@2475: (LabelSpec cg@2475: label: 'Renderer:' cg@2475: name: 'rendererLabel' cg@2475: layout: (AlignmentOrigin 94 0 16 0 1 0.5) cg@2475: translateLabel: true cg@2475: resizeForLabel: true cg@2475: ) cg@2475: (ComboListSpec cg@2475: name: 'rendererField' cg@2475: layout: (LayoutFrame 97 0 5 0 2 1.0 27 0) cg@2475: activeHelpKey: basicsRenderer cg@2475: tabable: true cg@2475: model: rendererType cg@2475: comboList: rendererTypeList cg@2475: useIndex: false cg@2475: hidePullDownMenuButton: false cg@2475: ) cg@2475: (LabelSpec cg@2475: label: 'Editor:' cg@2475: name: 'editorLabel' cg@2475: layout: (AlignmentOrigin 94 0 42 0 1 0.5) cg@2475: translateLabel: true cg@2475: resizeForLabel: true cg@2475: ) cg@2475: (ComboBoxSpec cg@2475: name: 'editorField' cg@2475: layout: (LayoutFrame 97 0 31 0 2 1.0 53 0) cg@2475: activeHelpKey: basicsEditor cg@2475: tabable: true cg@2475: model: editorType cg@2475: type: symbolOrNil cg@2475: acceptOnLostFocus: false cg@2475: acceptChannel: acceptChannel cg@2475: modifiedChannel: modifiedChannel cg@2475: acceptOnPointerLeave: false cg@2475: comboList: editorTypeList cg@2475: useIndex: false cg@2475: isFilenameBox: false cg@2475: ) cg@2475: (LabelSpec cg@2475: label: 'Align:' cg@2475: name: 'JustificationC' cg@2475: layout: (LayoutFrame -194 1 58 0 -114 1 79 0) cg@2475: translateLabel: true cg@2475: resizeForLabel: true cg@2475: adjust: right cg@2475: ) cg@2475: (PopUpListSpec cg@2475: label: 'Alignment' cg@2475: name: 'AlignmentC' cg@2475: layout: (LayoutFrame -115 1 58 0 2 1.0 80 0) cg@2475: activeHelpKey: basicsJustificationEditor cg@2475: tabable: true cg@2475: model: columnAlignment cg@2475: menu: cg@2475: (Array cg@2475: left right cg@2484: center decimal decimalRight cg@2475: ) cg@2475: ) cg@2475: (CheckBoxSpec cg@2475: label: 'Compress Long Strings' cg@2475: name: 'LongStringCompressionCheckBox' cg@2475: layout: (LayoutFrame -3 0 58 0 188 0 79 0) cg@2475: activeHelpKey: basicsLabelTranslate cg@2475: tabable: true cg@2475: model: longStringCompression cg@2475: translateLabel: true cg@2475: ) cg@2475: ) cg@2475: cg@2475: ) cg@2475: extent: (Point 389 114) cg@1156: ) cg@2475: (FramedBoxSpec cg@2475: label: 'Active Help:' cg@2475: name: 'activeHelpFrame' cg@2475: labelPosition: topLeft sv@1737: translateLabel: true cg@2475: component: cg@2475: (SpecCollection cg@2475: collection: ( cg@2475: (LabelSpec cg@2475: label: 'Key:' cg@2475: name: 'Label1' cg@2475: layout: (AlignmentOrigin 94 0 14 0 1 0.5) cg@2475: translateLabel: true cg@2475: resizeForLabel: true cg@2475: ) cg@2475: (InputFieldSpec cg@2475: name: 'EntryField1' cg@2475: layout: (LayoutFrame 97 0 0 0 2 1.0 22 0) cg@2475: activeHelpKey: basicsLabelId cg@2475: tabable: true cg@2475: model: activeHelpKey cg@2475: group: inputGroup cg@2475: acceptOnLostFocus: false cg@2475: acceptChannel: acceptChannel cg@2475: modifiedChannel: modifiedChannel cg@2475: acceptOnPointerLeave: false cg@2475: ) cg@2475: (LabelSpec cg@2475: label: 'Key for Label:' cg@2475: name: 'Label2' cg@2475: layout: (AlignmentOrigin 94 0 42 0 1 0.5) cg@2475: translateLabel: true cg@2475: resizeForLabel: true cg@2475: ) cg@2475: (InputFieldSpec cg@2475: name: 'EntryField2' cg@2475: layout: (LayoutFrame 97 0 28 0 2 1.0 50 0) cg@2475: activeHelpKey: basicsLabelId cg@2475: tabable: true cg@2475: model: activeHelpKeyForLabel cg@2475: group: inputGroup cg@2475: acceptOnLostFocus: false cg@2475: acceptChannel: acceptChannel cg@2475: modifiedChannel: modifiedChannel cg@2475: acceptOnPointerLeave: false cg@2475: ) cg@2475: ) cg@2475: cg@2475: ) cg@2475: extent: (Point 389 81) cg@2385: ) cg@2166: ) cg@2166: cg@2166: ) cg@2166: ) cg@1156: ) cg@1156: cg@1156: ) ca@391: ) ca@391: ! ca@391: tz@408: colorsEditSpec tz@825: "This resource specification was automatically generated tz@825: by the UIPainter of ST/X." ca@332: tz@825: "Do not manually edit this!! If it is corrupted, tz@825: the UIPainter may not be able to read the specification." ca@332: ca@332: " tz@408: UIPainter new openOnClass:DataSetBuilder andSelector:#colorsEditSpec tz@408: DataSetBuilder new openInterface:#colorsEditSpec ca@332: " ca@332: ca@332: ca@332: cg@1156: ^ sv@1737: #(FullSpec sv@1737: name: colorsEditSpec sv@1737: window: sv@1737: (WindowSpec sv@1737: label: 'DataSet Misc' sv@1737: name: 'DataSet Misc' sv@1737: min: (Point 10 10) cg@1841: bounds: (Rectangle 0 0 369 451) cg@1156: ) sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (FramedBoxSpec sv@1737: label: 'Label Colors:' sv@1737: name: 'ColorsBox' cg@1841: layout: (LayoutFrame 0 0.0 3 0 0 1.0 86 0) sv@1737: labelPosition: topLeft cg@1841: translateLabel: true sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (LabelSpec sv@1737: label: 'Foreground:' sv@1737: name: 'label1' cg@1841: layout: (AlignmentOrigin 112 0 14 0 1 0.5) cg@1841: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1156: ) sv@1737: (ColorMenuSpec sv@1737: name: 'colorMenu1' cg@1841: layout: (LayoutFrame 115 0 2 0 -3 1.0 24 0) sv@1737: activeHelpKey: colorsForegroundLabelColor sv@1737: model: labelForegroundColor sv@1737: labelsAreColored: true cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'Background:' sv@1737: name: 'label2' cg@1841: layout: (AlignmentOrigin 112 0 42 0 1 0.5) cg@1841: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1156: ) sv@1737: (ColorMenuSpec sv@1737: name: 'colorMenu2' cg@1841: layout: (LayoutFrame 115 0 30 0 -3 1.0 52 0) sv@1737: activeHelpKey: colorsBackgroundLabelColor sv@1737: model: labelBackgroundColor sv@1737: labelsAreColored: false cg@1156: ) cg@1156: ) cg@1156: ca@332: ) cg@1156: ) sv@1737: (FramedBoxSpec sv@1737: label: 'Cell Colors:' sv@1737: name: 'defaultColorsBox' cg@1841: layout: (LayoutFrame 0 0.0 91 0 0 1.0 232 0) sv@1737: labelPosition: topLeft cg@1841: translateLabel: true sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (LabelSpec sv@1737: label: 'Foreground:' sv@1737: name: 'fgLabel' cg@1841: layout: (AlignmentOrigin 112 0 11 0 1 0.5) cg@1841: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1156: ) sv@1737: (ColorMenuSpec sv@1737: name: 'fgMenu' cg@1841: layout: (LayoutFrame 115 0 -1 0 -3 1.0 21 0) sv@1737: activeHelpKey: colorsForegroundCellColor sv@1737: model: foregroundColor sv@1737: labelsAreColored: true cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'Background:' sv@1737: name: 'bgLabel' cg@1841: layout: (AlignmentOrigin 112 0 39 0 1 0.5) cg@1841: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1156: ) sv@1737: (ColorMenuSpec sv@1737: name: 'bgMenu' cg@1841: layout: (LayoutFrame 115 0 27 0 -3 1.0 49 0) sv@1737: activeHelpKey: colorsBackgroundCellColor sv@1737: model: backgroundColor sv@1737: labelsAreColored: false cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'FG-Selector:' sv@1737: name: 'fgSelLabel' cg@1841: layout: (AlignmentOrigin 112 0 73 0 1 0.5) cg@1841: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'fgSelField' cg@1841: layout: (LayoutFrame 115 0 62 0 0 1.0 84 0) sv@1737: activeHelpKey: colorsForegroundSelector sv@1737: tabable: true sv@1737: model: foregroundSelector sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'BG-Selector:' sv@1737: name: 'bgSelLabel' cg@1841: layout: (AlignmentOrigin 112 0 98 0 1 0.5) cg@1841: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'bgSelField' cg@1841: layout: (LayoutFrame 115 0 87 0 0 1.0 109 0) sv@1737: activeHelpKey: colorsBackgroundSelector sv@1737: tabable: true sv@1737: model: backgroundSelector sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) cg@1156: ) cg@1156: cg@1156: ) cg@1156: ) cg@1841: (FramedBoxSpec cg@1841: label: 'Selected Cell Colors:' cg@1841: name: 'selectedCellColorsBox' cg@1841: layout: (LayoutFrame 0 0.0 236 0 0 1.0 377 0) cg@1841: labelPosition: topLeft cg@1841: translateLabel: true cg@1841: component: cg@1841: (SpecCollection cg@1841: collection: ( cg@1841: (LabelSpec cg@1841: label: 'Foreground:' cg@1841: name: 'selFgLabel' cg@1841: layout: (AlignmentOrigin 112 0 11 0 1 0.5) cg@1841: translateLabel: true cg@1841: resizeForLabel: true cg@1841: adjust: right cg@1841: ) cg@1841: (ColorMenuSpec cg@1841: name: 'selFgMenu' cg@1841: layout: (LayoutFrame 115 0 -1 0 -3 1.0 21 0) cg@1841: activeHelpKey: selectedForegroundCellColorSelector cg@1841: model: selectedForegroundColor cg@1841: labelsAreColored: true cg@1841: ) cg@1841: (LabelSpec cg@1841: label: 'Background:' cg@1841: name: 'selBgLabel' cg@1841: layout: (AlignmentOrigin 112 0 39 0 1 0.5) cg@1841: translateLabel: true cg@1841: resizeForLabel: true cg@1841: adjust: right cg@1841: ) cg@1841: (ColorMenuSpec cg@1841: name: 'selBgMenu' cg@1841: layout: (LayoutFrame 115 0 27 0 -3 1.0 49 0) cg@1841: activeHelpKey: colorsBackgroundCellColor cg@1841: model: selectedBackgroundColor cg@1841: labelsAreColored: false cg@1841: ) cg@1841: (LabelSpec cg@1841: label: 'FG-Selector:' cg@1841: name: 'Label3' cg@1841: layout: (AlignmentOrigin 112 0 73 0 1 0.5) cg@1841: translateLabel: true cg@1841: resizeForLabel: true cg@1841: adjust: right cg@1841: ) cg@1841: (InputFieldSpec cg@1841: name: 'EntryField1' cg@1841: layout: (LayoutFrame 115 0 62 0 0 1.0 84 0) cg@1841: activeHelpKey: colorsForegroundSelector cg@1841: tabable: true cg@1841: model: selectedForegroundSelector cg@1841: group: inputGroup cg@1841: type: symbolOrNil cg@1841: acceptOnLostFocus: false cg@1841: acceptChannel: acceptChannel cg@1841: modifiedChannel: modifiedChannel cg@1841: acceptOnPointerLeave: false cg@1841: ) cg@1841: (LabelSpec cg@1841: label: 'BG-Selector:' cg@1841: name: 'Label4' cg@1841: layout: (AlignmentOrigin 112 0 98 0 1 0.5) cg@1841: translateLabel: true cg@1841: resizeForLabel: true cg@1841: adjust: right cg@1841: ) cg@1841: (InputFieldSpec cg@1841: name: 'EntryField2' cg@1841: layout: (LayoutFrame 115 0 87 0 0 1.0 109 0) cg@1841: activeHelpKey: colorsBackgroundSelector cg@1841: tabable: true cg@1841: model: selectedBackgroundSelector cg@1841: group: inputGroup cg@1841: type: symbolOrNil cg@1841: acceptOnLostFocus: false cg@1841: acceptChannel: acceptChannel cg@1841: modifiedChannel: modifiedChannel cg@1841: acceptOnPointerLeave: false cg@1841: ) cg@1841: ) cg@1841: cg@1841: ) cg@1841: ) cg@1156: ) cg@1156: cg@1156: ) ca@332: ) ca@332: ! ca@332: tz@528: defineClassNameSpec tz@825: "This resource specification was automatically generated tz@825: by the UIPainter of ST/X." tz@528: tz@825: "Do not manually edit this!! If it is corrupted, tz@825: the UIPainter may not be able to read the specification." tz@528: tz@528: " tz@528: UIPainter new openOnClass:DataSetBuilder andSelector:#defineClassNameSpec tz@528: DataSetBuilder new openInterface:#defineClassNameSpec tz@528: " tz@528: tz@528: tz@528: sv@1737: ^ sv@1737: #(FullSpec sv@1737: name: defineClassNameSpec sv@1737: window: sv@1737: (WindowSpec sv@1737: label: 'Data Set Builder' sv@1737: name: 'Data Set Builder' sv@1737: min: (Point 10 10) sv@1737: bounds: (Rectangle 14 46 341 182) sv@1737: ) sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (FramedBoxSpec sv@1737: label: 'Class for code' sv@1737: name: 'framedBox1' sv@1737: layout: (LayoutFrame 0 0.0 3 0.0 0 1.0 -34 1.0) sv@1737: labelPosition: topLeft sv@1737: translateLabel: true sv@1737: ) sv@1737: (LabelSpec sv@1737: label: 'Class:' sv@1737: name: 'classLabel' sv@1737: layout: (AlignmentOrigin 73 0.11 38 0 1 0.5) sv@1737: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right sv@1737: ) sv@1737: (InputFieldSpec sv@1737: name: 'classNameInputField' sv@1737: layout: (LayoutFrame 77 0.11 27 0 -16 1.0 49 0) sv@1737: tabable: true sv@1737: model: classNameChannel sv@1737: acceptOnPointerLeave: false sv@1737: ) sv@1737: (LabelSpec sv@1737: label: 'Superclass:' sv@1737: name: 'superClassLabel' sv@1737: layout: (AlignmentOrigin 73 0.11 65 0 1 0.5) sv@1737: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right sv@1737: ) sv@1737: (InputFieldSpec sv@1737: name: 'superclassNameInputField' sv@1737: layout: (LayoutFrame 76 0.11 55 0 -16 1.0 77 0) sv@1737: tabable: true sv@1737: model: superclassNameChannel sv@1737: acceptOnPointerLeave: false sv@1737: ) sv@1737: (UISubSpecification sv@1737: name: 'SubSpecification' sv@1737: layout: (LayoutFrame 0 0.0 -29 1 0 1.0 -5 1.0) sv@1737: majorKey: ToolApplicationModel sv@1737: minorKey: windowSpecForCommitWithoutChannels sv@1737: ) sv@1737: ) sv@1737: sv@1737: ) tz@528: ) tz@528: ! tz@528: ca@370: formatEditSpec tz@825: "This resource specification was automatically generated tz@825: by the UIPainter of ST/X." ca@332: tz@825: "Do not manually edit this!! If it is corrupted, tz@825: the UIPainter may not be able to read the specification." ca@332: ca@332: " ca@370: UIPainter new openOnClass:DataSetBuilder andSelector:#formatEditSpec ca@370: DataSetBuilder new openInterface:#formatEditSpec ca@370: " ca@370: ca@370: ca@370: cg@1156: ^ sv@1737: #(FullSpec sv@1737: name: formatEditSpec sv@1737: window: sv@1737: (WindowSpec sv@1737: label: 'DataSet Details' sv@1737: name: 'DataSet Details' sv@1737: min: (Point 10 10) werner@1824: bounds: (Rectangle 0 0 388 149) cg@1156: ) sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (FramedBoxSpec cg@2382: label: 'Column Format' sv@1737: name: 'framedBox1' werner@1824: layout: (LayoutFrame 0 0.0 3 0 0 1.0 149 0) sv@1737: labelPosition: topLeft cg@2262: translateLabel: true sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (LabelSpec cg@2382: label: 'Type:' sv@1737: name: 'typeLabel' sv@1737: layout: (AlignmentOrigin 115 0 26 0 1 0.5) werner@1824: translateLabel: true sv@1737: resizeForLabel: true cg@2475: activeHelpKey: formatInputType cg@1156: ) sv@1737: (ComboListSpec sv@1737: name: 'typeCombo' sv@1737: layout: (LayoutFrame 118 0 15 0 3 1.0 37 0) sv@1737: activeHelpKey: formatInputType sv@1737: tabable: true sv@1737: model: type cg@2262: comboList: possiblePrintConverterTypes sv@1737: useIndex: false werner@1824: hidePullDownMenuButton: false cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'Max Size:' sv@1737: name: 'sizeLabel' sv@1737: layout: (AlignmentOrigin 115 0 52 0 1 0.5) werner@1824: translateLabel: true sv@1737: resizeForLabel: true cg@2475: activeHelpKey: formatMaxSize cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'sizeField' sv@1737: layout: (LayoutFrame 118 0 41 0 3 1.0 63 0) sv@1737: activeHelpKey: formatMaxSize sv@1737: tabable: true sv@1737: model: size sv@1737: group: inputGroup sv@1737: type: numberOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'Text Format:' sv@1737: name: 'formatLabel' sv@1737: layout: (AlignmentOrigin 115 0 77 0 1 0.5) werner@1824: translateLabel: true sv@1737: resizeForLabel: true cg@2475: activeHelpKey: formatTextFormat cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'formatField' sv@1737: layout: (LayoutFrame 118 0 66 0 3 1.0 88 0) sv@1737: activeHelpKey: formatTextFormat sv@1737: tabable: true sv@1737: model: formatString sv@1737: group: inputGroup sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) werner@1824: (LabelSpec werner@1824: label: 'Format Selector:' werner@1824: name: 'formatSelectorLabel' werner@1824: layout: (AlignmentOrigin 115 0 103 0 1 0.5) werner@1824: translateLabel: true werner@1824: resizeForLabel: true cg@2475: activeHelpKey: formatFormatSelector werner@1824: ) werner@1824: (InputFieldSpec werner@1824: name: 'formatSelector' werner@1824: layout: (LayoutFrame 118 0 92 0 3 1.0 114 0) cg@2475: activeHelpKey: formatFormatSelector werner@1824: tabable: true werner@1824: model: formatSelector werner@1824: group: inputGroup werner@1824: acceptOnLostFocus: false werner@1824: acceptChannel: acceptChannel werner@1824: modifiedChannel: modifiedChannel werner@1824: acceptOnPointerLeave: false werner@1824: ) cg@1156: ) cg@1156: ca@370: ) cg@1156: ) cg@1156: ) cg@1156: cg@1156: ) ca@370: ) ca@370: ! ca@370: tz@408: frameEditSpec tz@825: "This resource specification was automatically generated tz@825: by the UIPainter of ST/X." ca@391: tz@825: "Do not manually edit this!! If it is corrupted, tz@825: the UIPainter may not be able to read the specification." ca@391: ca@391: " tz@408: UIPainter new openOnClass:DataSetBuilder andSelector:#frameEditSpec tz@408: DataSetBuilder new openInterface:#frameEditSpec ca@391: " ca@391: ca@391: ca@391: cg@1156: ^ sv@1737: #(FullSpec sv@1737: name: frameEditSpec sv@1737: window: sv@1737: (WindowSpec sv@1737: label: 'DataSet Dimension' sv@1737: name: 'DataSet Dimension' sv@1737: min: (Point 10 10) cg@1841: bounds: (Rectangle 0 0 396 313) cg@1156: ) sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (FramedBoxSpec sv@1737: label: 'Separators' sv@1737: name: 'separatorBox' sv@1737: layout: (LayoutFrame 0 0.0 3 0 0 1.0 132 0) sv@1737: labelPosition: topLeft cg@1875: translateLabel: true sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (CheckBoxSpec sv@1737: label: 'Show Row-Separator' sv@1737: name: 'showRowSeparator' sv@1737: layout: (LayoutFrame 5 0 15 0 293 0 38 0) sv@1737: activeHelpKey: frameShowRowSeparator sv@1737: tabable: true sv@1737: model: showRowSeparator cg@1875: translateLabel: true cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'rowSeparatorSelector' sv@1737: layout: (LayoutFrame 142 0 41 0 2 1.0 63 0) sv@1737: activeHelpKey: frameShowRowSeparatorSelector sv@1737: tabable: true sv@1737: model: rowSeparatorSelector sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) sv@1737: (CheckBoxSpec sv@1737: label: 'Show Column-Separator' sv@1737: name: 'showColSeparator' sv@1737: layout: (LayoutFrame 5 0 70 0 294 0 93 0) sv@1737: activeHelpKey: frameShowColumnSeparator sv@1737: tabable: true sv@1737: model: showColSeparator cg@1875: translateLabel: true cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'Selector:' sv@1737: name: 'Label1' sv@1737: layout: (LayoutFrame 80 0.0 44 0 140 0.0 61 0) sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1875: translateLabel: true penk@1580: ) cg@1156: ) cg@1156: ca@391: ) cg@1156: ) sv@1737: (FramedBoxSpec sv@1737: label: 'Dimensions:' sv@1737: name: 'framedBox1' sv@1737: layout: (LayoutFrame 0 0.0 133 0 0 1.0 305 0) sv@1737: labelPosition: topLeft cg@1875: translateLabel: true sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (LabelSpec sv@1737: label: 'Column Width:' sv@1737: name: 'widthLabel' sv@1737: layout: (AlignmentOrigin 140 0.0 23 0 1 0.5) sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1875: translateLabel: true cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'widthField' sv@1737: layout: (LayoutFrame 142 0 12 0 2 1.0 34 0) sv@1737: activeHelpKey: frameColumnWidth sv@1737: tabable: true sv@1737: model: width sv@1737: group: inputGroup sv@1737: type: numberOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'Min. Width:' sv@1737: name: 'minWidthLabel' sv@1737: layout: (AlignmentOrigin 140 0.0 51 0 1 0.5) sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1875: translateLabel: true cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'minWidthField' sv@1737: layout: (LayoutFrame 142 0 40 0 2 1.0 62 0) sv@1737: activeHelpKey: frameMinWidth sv@1737: tabable: true sv@1737: model: minWidth sv@1737: group: inputGroup sv@1737: type: numberOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'Row Height:' sv@1737: name: 'heightLabel' sv@1737: layout: (AlignmentOrigin 140 0.0 79 0 1 0.5) sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1875: translateLabel: true cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'heightField' sv@1737: layout: (LayoutFrame 142 0 68 0 2 1.0 90 0) sv@1737: activeHelpKey: frameRowHeight sv@1737: tabable: true sv@1737: model: height sv@1737: group: inputGroup sv@1737: type: numberOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) sv@1737: (CheckBoxSpec cg@1841: label: 'Compute Width from Items' sv@1737: name: 'usePreferredWidth' cg@1841: layout: (LayoutFrame 5 0 96 0 -5 1 118 0) sv@1737: activeHelpKey: usePreferredWidth sv@1737: tabable: true sv@1737: model: usePreferredWidth cg@1875: translateLabel: true cg@1216: ) sv@1737: (CheckBoxSpec sv@1737: label: 'Is Resizeable' sv@1737: name: 'isResizeable' cg@1841: layout: (LayoutFrame 5 0 121 0 -5 1.0 144 0) sv@1737: activeHelpKey: isResizeable sv@1737: tabable: true sv@1737: model: isResizeable cg@1875: translateLabel: true ca@1452: ) cg@1156: ) cg@1156: cg@1156: ) cg@1156: ) cg@1156: ) cg@1156: cg@1156: ) ca@391: ) ca@391: ! ca@391: tz@408: selectionEditSpec tz@825: "This resource specification was automatically generated tz@825: by the UIPainter of ST/X." ca@370: tz@825: "Do not manually edit this!! If it is corrupted, tz@825: the UIPainter may not be able to read the specification." ca@370: ca@370: " tz@408: UIPainter new openOnClass:DataSetBuilder andSelector:#selectionEditSpec tz@408: DataSetBuilder new openInterface:#selectionEditSpec ca@332: " ca@332: ca@332: ca@332: cg@1156: ^ sv@1737: #(FullSpec sv@1737: name: selectionEditSpec sv@1737: window: sv@1737: (WindowSpec sv@1737: label: 'DataSet Basic' sv@1737: name: 'DataSet Basic' sv@1737: min: (Point 10 10) ca@1857: bounds: (Rectangle 0 0 331 328) cg@1156: ) sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (FramedBoxSpec sv@1737: label: 'Label Select Action:' sv@1737: name: 'LabelSelectAction' sv@1737: layout: (LayoutFrame 0 0.0 3 0 0 1.0 97 0) sv@1737: labelPosition: topLeft cg@1875: translateLabel: true sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (LabelSpec sv@1737: label: 'Selector:' sv@1737: name: 'ActionLabel' sv@1737: layout: (AlignmentOrigin 95 0 20 0 1 0.5) sv@1737: resizeForLabel: true sv@1737: adjust: left cg@1875: translateLabel: true cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'ActionSelector' sv@1737: layout: (LayoutFrame 98 0 9 0 3 1.0 31 0) sv@1737: activeHelpKey: selectionLabelClickSelector sv@1737: tabable: true sv@1737: model: labelActionSelector sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'Argument:' sv@1737: name: 'ArgumentLabel' sv@1737: layout: (AlignmentOrigin 95 0 48 0 1 0.5) sv@1737: resizeForLabel: true sv@1737: adjust: left cg@1875: translateLabel: true cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'ArgumentValue' sv@1737: layout: (LayoutFrame 98 0 37 0 3 1.0 59 0) sv@1737: activeHelpKey: selectionLabelSelectorArgument sv@1737: tabable: true sv@1737: model: labelActionArgument sv@1737: group: inputGroup sv@1737: type: string sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) cg@1156: ) cg@1156: tz@408: ) cg@1156: ) sv@1737: (FramedBoxSpec sv@1737: label: 'Cell Selection:' sv@1737: name: 'CellSelection' sv@1737: layout: (LayoutFrame 0 0.0 105 0 0 1.0 215 0) sv@1737: labelPosition: topLeft cg@1875: translateLabel: true sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (CheckBoxSpec sv@1737: label: 'Is Selectable' sv@1737: name: 'canSelect' ca@1857: layout: (Point 95 -4) sv@1737: activeHelpKey: selectionIsSelectable sv@1737: tabable: true sv@1737: model: canSelect cg@1875: translateLabel: true cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'Selector:' sv@1737: name: 'selectorLabel' sv@1737: layout: (AlignmentOrigin 95 0 37 0 1 0.5) sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1875: translateLabel: true cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'selectSelector' sv@1737: layout: (LayoutFrame 98 0 26 0 3 1.0 48 0) sv@1737: activeHelpKey: selectionCellClickSelector sv@1737: tabable: true sv@1737: model: selectSelector sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) sv@1737: (CheckBoxSpec sv@1737: label: 'Show Selection HighLightened' sv@1737: name: 'showSelectionHighLightened' sv@1737: layout: (LayoutFrame 95 0 53 0 3 1.0 77 0) sv@1737: activeHelpKey: showSelectionHighLighted sv@1737: tabable: true sv@1737: model: showSelectionHighLighted cg@1875: translateLabel: true cg@1156: ) cg@1156: ) cg@1156: cg@1156: ) cg@1156: ) sv@1737: (FramedBoxSpec sv@1737: label: 'Cell Double Click:' sv@1737: name: 'CellDoubleClick' sv@1737: layout: (LayoutFrame 0 0.0 227 0 0 1.0 293 0) sv@1737: labelPosition: topLeft cg@1875: translateLabel: true sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (LabelSpec sv@1737: label: 'Selector:' sv@1737: name: 'doubleLabel' sv@1737: layout: (AlignmentOrigin 95 0 19 0 1 0.5) sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1875: translateLabel: true cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'doubleClicked' sv@1737: layout: (LayoutFrame 98 0 8 0 3 1.0 30 0) sv@1737: activeHelpKey: selectionCellDoubleClickSelector sv@1737: tabable: true sv@1737: model: doubleClickedSelector sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) cg@1156: ) cg@1156: cg@1156: ) cg@1156: ) cg@1156: ) cg@1156: cg@1156: ) tz@408: ) tz@408: ! tz@408: tz@528: slices tz@528: ^#( tz@528: (Basics basicsEditSpec) tz@528: (Values valuesEditSpec) tz@528: (Format formatEditSpec) cg@2475: (Sort sortEditSpec) tz@528: (Selection selectionEditSpec) tz@528: (Frame frameEditSpec) tz@528: (Colors colorsEditSpec) tz@528: ) tz@528: ! tz@528: cg@2475: sortEditSpec cg@2475: "This resource specification was automatically generated cg@2475: by the UIPainter of ST/X." cg@2475: cg@2475: "Do not manually edit this!! If it is corrupted, cg@2475: the UIPainter may not be able to read the specification." cg@2475: cg@2475: " cg@2475: UIPainter new openOnClass:DataSetBuilder andSelector:#sortEditSpec cg@2475: DataSetBuilder new openInterface:#sortEditSpec cg@2475: " cg@2475: cg@2475: cg@2475: cg@2475: ^ cg@2475: #(FullSpec cg@2475: name: sortEditSpec cg@2475: window: cg@2475: (WindowSpec cg@2475: label: 'DataSet Basic' cg@2475: name: 'DataSet Basic' cg@2475: min: (Point 10 10) cg@2475: bounds: (Rectangle 0 0 389 473) cg@2475: ) cg@2475: component: cg@2475: (SpecCollection cg@2475: collection: ( cg@2475: (VerticalPanelViewSpec cg@2475: name: 'VerticalPanel1' cg@2475: layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) cg@2475: horizontalLayout: fit cg@2475: verticalLayout: top cg@2475: horizontalSpace: 3 cg@2475: verticalSpace: 3 cg@2475: component: cg@2475: (SpecCollection cg@2475: collection: ( cg@2475: (FramedBoxSpec cg@2475: label: 'Sorting:' cg@2475: name: 'sortFrame' cg@2475: labelPosition: topLeft cg@2475: translateLabel: true cg@2475: component: cg@2475: (SpecCollection cg@2475: collection: ( cg@2475: (CheckBoxSpec cg@2475: label: 'Sortable' cg@2475: name: 'isSortable' cg@2475: layout: (LayoutOrigin -3 0 0 0) cg@2475: activeHelpKey: isSortable cg@2475: tabable: true cg@2475: model: isSortable cg@2475: translateLabel: true cg@2475: ) cg@2475: (LabelSpec cg@2475: label: 'Sort Selector:' cg@2475: name: 'sortSelector' cg@2475: layout: (AlignmentOrigin 90 0 42 0 1 0.5) cg@2475: activeHelpKey: sortSelector cg@2475: translateLabel: true cg@2475: resizeForLabel: true cg@2475: adjust: right cg@2475: ) cg@2475: (InputFieldSpec cg@2475: name: 'EntryField3' cg@2475: layout: (LayoutFrame 93 0 30 0 2 1 56 0) cg@2475: activeHelpKey: sortSelector cg@2475: enableChannel: isSortable cg@2475: tabable: true cg@2475: model: sortSelector cg@2475: group: inputGroup cg@2475: type: symbolOrNil cg@2475: immediateAccept: false cg@2475: acceptOnLeave: false cg@2475: acceptOnLostFocus: false cg@2475: acceptChannel: acceptChannel cg@2475: modifiedChannel: modifiedChannel cg@2475: acceptOnPointerLeave: false cg@2475: ) cg@2475: ) cg@2475: cg@2475: ) cg@2475: extent: (Point 389 94) cg@2475: ) cg@2475: ) cg@2475: cg@2475: ) cg@2475: ) cg@2475: ) cg@2475: cg@2475: ) cg@2475: ) cg@2475: ! cg@2475: tz@408: valuesEditSpec tz@825: "This resource specification was automatically generated tz@825: by the UIPainter of ST/X." tz@408: tz@825: "Do not manually edit this!! If it is corrupted, tz@825: the UIPainter may not be able to read the specification." tz@408: tz@408: " tz@408: UIPainter new openOnClass:DataSetBuilder andSelector:#valuesEditSpec tz@408: DataSetBuilder new openInterface:#valuesEditSpec tz@408: " tz@408: tz@408: tz@408: cg@1156: ^ sv@1737: #(FullSpec sv@1737: name: valuesEditSpec sv@1737: window: sv@1737: (WindowSpec sv@1737: label: 'DataSet Basic' sv@1737: name: 'DataSet Basic' sv@1737: min: (Point 10 10) cg@1944: bounds: (Rectangle 0 0 436 387) cg@1156: ) sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (FramedBoxSpec sv@1737: label: 'Value Selectors:' sv@1737: name: 'valuesBox' ca@1857: layout: (LayoutFrame 0 0.0 3 0 0 1.0 163 0) sv@1737: labelPosition: topLeft cg@1944: translateLabel: true sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (LabelSpec sv@1737: label: 'Read:' sv@1737: name: 'readLabel' sv@1737: layout: (AlignmentOrigin 94 0 15 0 1 0.5) cg@1944: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'readSelector' sv@1737: layout: (LayoutFrame 97 0 4 0 2 1.0 26 0) sv@1737: activeHelpKey: valuesReadSelector sv@1737: tabable: true sv@1737: model: readSelector sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'Write:' sv@1737: name: 'writeLabel' sv@1737: layout: (AlignmentOrigin 94 0 40 0 1 0.5) cg@1944: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right sv@1737: ) sv@1737: (InputFieldSpec sv@1737: name: 'writeSelector' sv@1737: layout: (LayoutFrame 97 0 29 0 2 1.0 51 0) sv@1737: activeHelpKey: valuesWriteSelector sv@1737: tabable: true sv@1737: model: writeSelector sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'Converter:' sv@1737: name: 'converterLabel' sv@1737: layout: (AlignmentOrigin 94 0 65 0 1 0.5) cg@1944: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'converterField' sv@1737: layout: (LayoutFrame 97 0 54 0 2 1.0 76 0) sv@1737: activeHelpKey: converterSelector sv@1737: tabable: true sv@1737: model: converterSelector sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'Print:' sv@1737: name: 'printLabel' sv@1737: layout: (AlignmentOrigin 94 0 90 0 1 0.5) cg@1944: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right ca@1261: ) sv@1737: (InputFieldSpec sv@1737: name: 'printSelector' sv@1737: layout: (LayoutFrame 97 0 79 0 2 1.0 101 0) sv@1737: activeHelpKey: valuesPrintSelector sv@1737: tabable: true sv@1737: model: printSelector sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) sv@1737: (LabelSpec sv@1737: label: 'Visibility:' sv@1737: name: 'visibilityLabel' sv@1737: layout: (AlignmentOrigin 94 0 115 0 1 0.5) cg@1944: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right penk@1731: ) sv@1737: (InputFieldSpec sv@1737: name: 'visibilitySelector' sv@1737: layout: (LayoutFrame 97 0 104 0 2 1.0 126 0) sv@1737: activeHelpKey: valuesVisibilitySelector sv@1737: tabable: true sv@1737: model: visibilitySelector sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false penk@1731: ) cg@1156: ) cg@1156: ca@332: ) cg@1156: ) sv@1737: (FramedBoxSpec werner@1822: label: 'Range:' cg@1944: name: 'rangeBox' ca@1857: layout: (LayoutFrame 0 0.0 162 0 0 1.0 218 0) werner@1822: labelPosition: topLeft cg@1944: translateLabel: true werner@1822: component: werner@1822: (SpecCollection werner@1822: collection: ( werner@1822: (LabelSpec werner@1822: label: 'Min:' werner@1822: name: 'Label1' werner@1822: layout: (LayoutFrame 11 0 3 0 94 0 20 0) cg@1944: translateLabel: true werner@1822: resizeForLabel: true werner@1822: adjust: right werner@1822: ) werner@1822: (InputFieldSpec werner@1822: name: 'EntryField1' werner@1822: layout: (LayoutFrame 97 0 1 0 20 0.5 23 0) werner@1822: activeHelpKey: valuesMenuSelector werner@1822: tabable: true werner@1822: model: minValue werner@1822: group: inputGroup werner@1822: type: numberOrNil werner@1822: acceptOnLeave: true werner@1822: acceptOnLostFocus: true werner@1822: acceptChannel: acceptChannel werner@1822: modifiedChannel: modifiedChannel werner@1822: acceptOnPointerLeave: true werner@1822: ) werner@1822: (LabelSpec werner@1822: label: 'Max:' werner@1822: name: 'Label2' werner@1822: layout: (LayoutFrame 21 0.5 3 0 70 0.5 20 0) cg@1944: translateLabel: true werner@1822: resizeForLabel: true werner@1822: adjust: right werner@1822: ) werner@1822: (InputFieldSpec werner@1822: name: 'EntryField2' werner@1822: layout: (LayoutFrame 70 0.5 1 0 -2 1.0 23 0) werner@1822: activeHelpKey: valuesMenuSelector werner@1822: tabable: true werner@1822: model: maxValue werner@1822: group: inputGroup werner@1822: type: numberOrNil werner@1822: acceptOnLeave: true werner@1822: acceptOnLostFocus: true werner@1822: acceptChannel: acceptChannel werner@1822: modifiedChannel: modifiedChannel werner@1822: acceptOnPointerLeave: true werner@1822: ) werner@1822: ) werner@1822: werner@1822: ) werner@1822: ) werner@1822: (FramedBoxSpec cg@1944: label: 'Menu Selector:' sv@1737: name: 'menusBox' ca@1857: layout: (LayoutFrame 0 0.0 216 0 0 1.0 272 0) sv@1737: labelPosition: topLeft cg@1944: translateLabel: true sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (LabelSpec sv@1737: label: 'Selector:' sv@1737: name: 'menuLabel' sv@1737: layout: (AlignmentOrigin 94 0 12 0 1 0.5) cg@1944: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'menuSelector' sv@1737: layout: (LayoutFrame 97 0 1 0 2 1.0 23 0) sv@1737: activeHelpKey: valuesMenuSelector sv@1737: tabable: true sv@1737: model: menu sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) cg@1156: ) cg@1156: cg@1156: ) cg@1156: ) sv@1737: (FramedBoxSpec sv@1737: label: 'Combo List/Box Selectors:' cg@1944: name: 'comboSelectorsBox' cg@1944: layout: (LayoutFrame 1 0.0 271 0 1 1.0 378 0) sv@1737: labelPosition: topLeft cg@1944: translateLabel: true sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (LabelSpec sv@1737: label: 'Choices:' sv@1737: name: 'ChoicesLabel' sv@1737: layout: (AlignmentOrigin 94 0 15 0 1 0.5) cg@1944: activeHelpKey: valuesChoicesSelector cg@1944: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1156: ) sv@1737: (InputFieldSpec sv@1737: name: 'ChoicesField' sv@1737: layout: (LayoutFrame 97 0 4 0 2 1.0 26 0) cg@1944: activeHelpKey: valuesChoicesSelector sv@1737: tabable: true sv@1737: model: choices sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLeave: false sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) sv@1737: (LabelSpec cg@1944: label: 'Translated Choices:' cg@1944: name: 'XChoicesLabel' cg@1944: layout: (AlignmentOrigin 94 0 40 0 1 0.5) cg@1944: activeHelpKey: valuesXChoicesSelector cg@1944: translateLabel: true sv@1737: resizeForLabel: true sv@1737: adjust: right cg@1156: ) sv@1737: (InputFieldSpec cg@1944: name: 'XChoicesField' cg@1944: layout: (LayoutFrame 97 0 29 0 2 1.0 51 0) cg@1944: activeHelpKey: valuesXChoicesSelector cg@1944: tabable: true cg@1944: model: translatedChoices cg@1944: group: inputGroup cg@1944: type: symbolOrNil cg@1944: acceptOnLeave: false cg@1944: acceptOnLostFocus: false cg@1944: acceptChannel: acceptChannel cg@1944: modifiedChannel: modifiedChannel cg@1944: acceptOnPointerLeave: false cg@1944: ) cg@1944: (LabelSpec cg@1944: label: 'Editable:' cg@1944: name: 'EditableLabel' cg@1944: layout: (AlignmentOrigin 94 0 65 0 1 0.5) cg@1944: activeHelpKey: showComboFieldSelector cg@1944: translateLabel: true cg@1944: resizeForLabel: true cg@1944: adjust: right cg@1944: ) cg@1944: (InputFieldSpec cg@1944: name: 'EditableField' cg@1944: layout: (LayoutFrame 97 0 54 0 2 1.0 76 0) sv@1737: activeHelpKey: showComboFieldSelector sv@1737: tabable: true sv@1737: model: showComboFieldSelector sv@1737: group: inputGroup sv@1737: type: symbolOrNil sv@1737: acceptOnLeave: false sv@1737: acceptOnLostFocus: false sv@1737: acceptChannel: acceptChannel sv@1737: modifiedChannel: modifiedChannel sv@1737: acceptOnPointerLeave: false cg@1156: ) cg@1156: ) cg@1156: cg@1156: ) cg@1156: ) cg@1156: ) cg@1156: cg@1156: ) ca@332: ) ca@332: ! ca@332: ca@332: windowSpec ca@817: "This resource specification was automatically generated ca@817: by the UIPainter of ST/X." ca@332: ca@817: "Do not manually edit this!! If it is corrupted, ca@817: the UIPainter may not be able to read the specification." ca@332: ca@332: " ca@332: UIPainter new openOnClass:DataSetBuilder andSelector:#windowSpec ca@332: DataSetBuilder new openInterface:#windowSpec ca@817: DataSetBuilder open ca@332: " ca@332: ca@332: ca@332: cg@1156: ^ sv@1737: #(FullSpec sv@1737: name: windowSpec sv@1737: window: sv@1737: (WindowSpec sv@1737: label: 'Data Set Builder' sv@1737: name: 'Data Set Builder' sv@1737: min: (Point 10 10) cg@1841: bounds: (Rectangle 0 0 633 658) sv@1737: menu: menu cg@1156: ) sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (MenuPanelSpec sv@1737: name: 'menuToolbarView' sv@1737: layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 32 0) sv@1737: tabable: true sv@1737: menu: menuToolbar cg@1156: ) sv@1737: (VariableVerticalPanelSpec cg@2000: name: 'mainPanel' sv@1737: layout: (LayoutFrame 0 0.0 38 0.0 0 1.0 -26 1.0) sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (FramedBoxSpec sv@1737: label: 'Table Columns' sv@1737: name: 'FramedBox' sv@1737: labelPosition: topLeft cg@1875: translateLabel: true sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (DataSetSpec sv@1737: name: 'columnView' cg@2262: layout: (LayoutFrame 0 0.0 6 0.0 0 1.0 2 1.0) sv@1737: hasHorizontalScrollBar: true sv@1737: hasVerticalScrollBar: false sv@1737: miniScrollerHorizontal: true sv@1737: useIndex: false sv@1737: has3Dseparators: true cg@1156: ) cg@1156: ) cg@1156: cg@1156: ) cg@1156: ) sv@1737: (VariableHorizontalPanelSpec sv@1737: name: 'VariablePanel' sv@1737: level: -1 sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (ViewSpec sv@1737: name: 'labelsView' sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (SequenceViewSpec sv@1737: name: 'labelAndColumns' sv@1737: layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) sv@1737: tabable: true sv@1737: model: selectedColumnModel sv@1737: menu: menuEdit sv@1737: hasHorizontalScrollBar: true sv@1737: hasVerticalScrollBar: true sv@1737: miniScrollerHorizontal: true cg@2262: isMultiSelect: true sv@1737: useIndex: true sv@1737: sequenceList: seqList tz@825: ) cg@1156: ) cg@1156: ca@332: ) cg@2262: postBuildCallback: postBuildListOfItemsView: ca@332: ) sv@1737: (ViewSpec sv@1737: name: 'specView' sv@1737: level: -1 sv@1737: component: sv@1737: (SpecCollection sv@1737: collection: ( sv@1737: (NoteBookViewSpec sv@1737: name: 'NoteBook' sv@1737: layout: (LayoutFrame 1 0.0 0 0.0 0 1.0 -30 1.0) sv@1737: tabable: true sv@1737: model: tabModel sv@1737: menu: tabList sv@1737: useIndex: true sv@1737: canvas: canvasHolder sv@1737: keepCanvasAlive: true cg@1156: ) sv@1737: (UISubSpecification sv@1737: name: 'SubSpecification' sv@1737: layout: (LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) sv@1737: majorKey: ToolApplicationModel sv@1737: minorKey: windowSpecForCommit cg@1156: ) cg@1156: ) cg@1156: cg@1156: ) cg@2262: postBuildCallback: postBuildSpecView: cg@1156: ) cg@1156: ) cg@1156: ca@332: ) sv@1737: handles: (Any 0.235387 1.0) cg@1156: ) cg@1156: ) cg@1156: ca@332: ) cg@1841: handles: (Any 0.208748 1.0) cg@1156: ) sv@1737: (UISubSpecification sv@1737: name: 'infoBarSubSpec' sv@1737: layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) sv@1737: majorKey: ToolApplicationModel sv@1737: minorKey: windowSpecForInfoBar cg@1156: ) cg@1156: ) cg@1156: cg@1156: ) ca@332: ) ca@332: ! ! ca@332: ca@332: !DataSetBuilder class methodsFor:'menu specs'! ca@332: cg@2549: fileMenu cg@2549: "This resource specification was automatically generated cg@2549: by the MenuEditor of ST/X." cg@2549: cg@2549: "Do not manually edit this!! If it is corrupted, cg@2549: the MenuEditor may not be able to read the specification." cg@2549: cg@2549: " cg@2549: MenuEditor new openOnClass:DataSetBuilder andSelector:#fileMenu cg@2549: (Menu new fromLiteralArrayEncoding:(DataSetBuilder fileMenu)) startUp cg@2549: " cg@2549: cg@2549: cg@2549: cg@2549: ^ cg@2549: #(Menu cg@2549: ( cg@2549: (MenuItem cg@2549: activeHelpKey: fileNew cg@2549: label: 'New' cg@2549: itemValue: doNew cg@2549: translateLabel: true cg@2549: ) cg@2549: (MenuItem cg@2549: label: '-' cg@2549: isVisible: notEditingSpecOnly cg@2549: ) cg@2549: (MenuItem cg@2549: activeHelpKey: fileLoad cg@2549: label: 'Load...' cg@2549: itemValue: doLoad cg@2549: translateLabel: true cg@2549: isVisible: notEditingSpecOnly cg@2549: ) cg@2549: (MenuItem cg@2549: label: '-' cg@2549: ) cg@2549: (MenuItem cg@2549: activeHelpKey: fileSave cg@2549: label: 'Save' cg@2549: itemValue: doSave cg@2549: translateLabel: true cg@2549: isVisible: editingSpecOnly cg@2549: ) cg@2549: (MenuItem cg@2549: activeHelpKey: fileSaveMethod cg@2549: label: 'Save' cg@2549: itemValue: doSave cg@2549: translateLabel: true cg@2549: isVisible: notEditingSpecOnly cg@2549: ) cg@2549: (MenuItem cg@2549: activeHelpKey: fileSaveAsMethod cg@2549: label: 'Save As...' cg@2549: itemValue: doSaveAs cg@2549: translateLabel: true cg@2549: isVisible: notEditingSpecOnly cg@2549: ) cg@2549: (MenuItem cg@2549: label: '-' cg@2549: ) cg@2549: (MenuItem cg@2549: activeHelpKey: pickColumns cg@2549: label: 'Pick Columns...' cg@2549: itemValue: doPickColumns cg@2549: translateLabel: true cg@2549: ) cg@2549: (MenuItem cg@2549: label: '-' cg@2549: isVisible: isStandAlone cg@2549: ) cg@2549: (MenuItem cg@2549: activeHelpKey: fileBrowseClass cg@2549: label: 'Browse Class' cg@2549: itemValue: doBrowseClass cg@2549: translateLabel: true cg@2549: isVisible: isStandAlone cg@2549: ) cg@2549: (MenuItem cg@2549: label: '-' cg@2549: isVisible: isStandAlone cg@2549: ) cg@2549: (MenuItem cg@2549: activeHelpKey: fileExit cg@2549: label: 'Exit' cg@2549: itemValue: closeRequest cg@2549: translateLabel: true cg@2549: isVisible: isStandAlone cg@2549: ) cg@2549: ) cg@2549: nil cg@2549: nil cg@2549: ) cg@2549: ! cg@2549: tz@408: menu ca@818: "This resource specification was automatically generated ca@818: by the MenuEditor of ST/X." ca@332: ca@818: "Do not manually edit this!! If it is corrupted, ca@818: the MenuEditor may not be able to read the specification." ca@332: ca@332: " tz@408: MenuEditor new openOnClass:DataSetBuilder andSelector:#menu tz@408: (Menu new fromLiteralArrayEncoding:(DataSetBuilder menu)) startUp ca@332: " ca@332: ca@332: ca@332: cg@1981: ^ cg@1981: #(Menu cg@1981: ( cg@1981: (MenuItem cg@1981: label: 'File' cg@1981: translateLabel: true cg@2549: submenuChannel: fileMenu cg@1981: ) cg@1981: (MenuItem cg@1981: label: 'Edit' cg@1981: translateLabel: true cg@2262: submenuChannel: menuEditWithoutAccelerators cg@1981: ) cg@1981: (MenuItem cg@1981: label: 'Add' cg@1981: translateLabel: true cg@1981: submenu: cg@1981: (Menu cg@1981: ( cg@1981: (MenuItem cg@1981: activeHelpKey: addColumn cg@1981: enabled: columnIsNotEditing cg@1981: label: 'Column' cg@1981: itemValue: doCreateColumn cg@1981: translateLabel: true cg@1981: labelImage: (ResourceRetriever nil newColumnIcon 'Column') tz@521: ) cg@2262: (MenuItem cg@2262: activeHelpKey: addNonSelectableColumn cg@2262: enabled: columnIsNotEditing cg@2262: label: 'Column (Non-Selectable)' cg@2262: itemValue: doCreateNonSelectableColumn cg@2262: translateLabel: true cg@2262: labelImage: (ResourceRetriever DataSetBuilder newColumnNonSelectableIcon 'Column (Non-Selectable)') cg@2262: ) cg@1981: ) cg@1981: nil cg@1981: nil tz@521: ) cg@1981: ) cg@1981: (MenuItem cg@1981: label: 'Generate' cg@1981: translateLabel: true cg@2549: isVisible: notEditingSpecOnly cg@1981: submenu: cg@1981: (Menu cg@1981: ( cg@1981: (MenuItem cg@1981: activeHelpKey: fileDefineClass cg@1981: label: 'Define Row Class...' cg@1981: itemValue: doDefineRowClass cg@1981: translateLabel: true ca@818: ) cg@1981: (MenuItem cg@1981: activeHelpKey: browseRowClass cg@1981: label: 'Browse Row Class' cg@1981: itemValue: doBrowseRowClass cg@1981: translateLabel: true cg@1981: ) cg@1981: (MenuItem cg@1981: label: '-' cg@1981: ) cg@1981: (MenuItem cg@1981: activeHelpKey: generateCode cg@1981: label: 'Generate Code' cg@1981: itemValue: doGenerateCode cg@1981: translateLabel: true cg@1981: ) cg@1981: ) cg@1981: nil cg@1981: nil ca@818: ) cg@1981: ) cg@1981: (MenuItem cg@1981: label: 'History' cg@1981: translateLabel: true cg@1981: isVisible: isStandAlone cg@1981: submenuChannel: menuHistory cg@1981: ) cg@1981: (MenuItem cg@2262: label: 'MENU_Help' cg@1981: translateLabel: true cg@2126: startGroup: conditionalRight cg@1981: submenuChannel: menuHelp cg@1981: ) cg@1981: ) cg@1981: nil cg@1981: nil ca@332: ) ca@332: ! ca@332: tz@408: menuEdit tz@825: "This resource specification was automatically generated tz@825: by the MenuEditor of ST/X." ca@332: tz@825: "Do not manually edit this!! If it is corrupted, tz@825: the MenuEditor may not be able to read the specification." ca@332: ca@332: " tz@408: MenuEditor new openOnClass:DataSetBuilder andSelector:#menuEdit tz@408: (Menu new fromLiteralArrayEncoding:(DataSetBuilder menuEdit)) startUp tz@408: " tz@408: tz@408: tz@408: cg@2262: ^ cg@2262: #(Menu cg@2262: ( cg@2262: (MenuItem cg@2262: activeHelpKey: editCut cg@2262: enabled: isColumnSelected cg@2262: label: 'Cut' cg@2262: itemValue: doCut cg@2262: translateLabel: true cg@2262: shortcutKey: Cut cg@2262: ) cg@2262: (MenuItem cg@2262: activeHelpKey: editCopy cg@2262: enabled: isColumnSelected cg@2262: label: 'Copy' cg@2262: itemValue: doCopy cg@2262: translateLabel: true cg@2262: shortcutKey: Copy cg@2262: ) cg@2262: (MenuItem cg@2262: activeHelpKey: editPaste cg@2262: enabled: valueOfHavingClipboard cg@2262: label: 'Paste' cg@2262: itemValue: doPaste cg@2262: translateLabel: true cg@2262: shortcutKey: Paste cg@2262: ) cg@2262: (MenuItem cg@2262: label: '-' cg@2262: ) cg@2262: (MenuItem cg@2262: activeHelpKey: editMoveUp cg@2262: enabled: isColumnSelected cg@2262: label: 'Move Up' cg@2262: itemValue: doMoveColumn: cg@2262: translateLabel: true cg@2262: shortcutKey: CtrlCursorUp cg@2262: labelImage: (ResourceRetriever Icon upIcon 'Move Up') cg@2262: argument: up cg@2262: ) cg@2262: (MenuItem cg@2262: activeHelpKey: editMoveDown cg@2262: enabled: isColumnSelected cg@2262: label: 'Move Down' cg@2262: itemValue: doMoveColumn: cg@2262: translateLabel: true cg@2262: shortcutKey: CtrlCursorDown cg@2262: labelImage: (ResourceRetriever Icon downIcon 'Move Down') cg@2262: argument: down cg@2262: ) cg@2262: (MenuItem cg@2262: label: '-' cg@2262: ) cg@2262: (MenuItem cg@2262: label: 'Separators' cg@2262: translateLabel: true cg@2262: submenu: cg@2262: (Menu cg@2262: ( cg@2262: (MenuItem cg@2262: label: 'Label Columns' cg@2262: translateLabel: true cg@2262: submenu: cg@2262: (Menu cg@2262: ( cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Add Separators' cg@2262: itemValue: addLabelColumnSeparators cg@2262: translateLabel: true cg@2262: ) cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Remove Separators' cg@2262: itemValue: removeLabelColumnSeparators cg@2262: translateLabel: true cg@2262: ) cg@2262: ) cg@2262: nil cg@2262: nil cg@2262: ) cg@2262: ) cg@2262: (MenuItem cg@2262: label: 'Label Row && Columns' cg@2262: translateLabel: true cg@2262: submenu: cg@2262: (Menu cg@2262: ( cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Add Separators' cg@2262: itemValue: addLabelSeparators cg@2262: translateLabel: true cg@2262: ) cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Remove Separators' cg@2262: itemValue: removeLabelSeparators cg@2262: translateLabel: true cg@2262: ) cg@2262: ) cg@2262: nil cg@2262: nil cg@2262: ) cg@2262: ) cg@2262: (MenuItem cg@2262: label: '-' cg@2262: ) cg@2262: (MenuItem cg@2262: label: 'Cell Rows' cg@2262: translateLabel: true cg@2262: submenu: cg@2262: (Menu cg@2262: ( cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Add Separators' cg@2262: itemValue: addRowSeparators cg@2262: translateLabel: true cg@2262: ) cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Remove Separators' cg@2262: itemValue: removeRowSeparators cg@2262: translateLabel: true cg@2262: ) cg@2262: ) cg@2262: nil cg@2262: nil cg@2262: ) cg@2262: ) cg@2262: (MenuItem cg@2262: label: 'Cell Columns' cg@2262: translateLabel: true cg@2262: submenu: cg@2262: (Menu cg@2262: ( cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Add Separators' cg@2262: itemValue: addLabelColumnSeparators cg@2262: translateLabel: true cg@2262: ) cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Remove' cg@2262: itemValue: removeLabelColumnSeparators cg@2262: translateLabel: true cg@2262: ) cg@2262: ) cg@2262: nil cg@2262: nil cg@2262: ) cg@2262: ) cg@2262: (MenuItem cg@2262: label: 'Cell Rows && Columns' cg@2262: translateLabel: true cg@2262: submenu: cg@2262: (Menu cg@2262: ( cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Add Separators' cg@2262: itemValue: addCellSeparators cg@2262: translateLabel: true cg@2262: ) cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Remove Separators' cg@2262: itemValue: removeCellSeparators cg@2262: translateLabel: true cg@2262: ) cg@2262: ) cg@2262: nil cg@2262: nil cg@2262: ) cg@2262: ) cg@2262: ) cg@2262: nil cg@2262: nil tz@408: ) cg@2262: ) cg@2380: (MenuItem cg@2262: label: 'Alignment' cg@2262: translateLabel: true cg@2262: submenu: cg@2262: (Menu cg@2262: ( cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Make Labels Left Aligned' cg@2262: itemValue: alignLabelsLeft cg@2262: translateLabel: true cg@2262: ) cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Make Labels Centered' cg@2262: itemValue: alignLabelsCentered cg@2262: translateLabel: true cg@2262: ) cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Make Labels Right Aligned' cg@2262: itemValue: alignLabelsRight cg@2262: translateLabel: true cg@2262: ) cg@2262: (MenuItem cg@2262: label: '-' cg@2262: ) cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Make Cell Left Aligned' cg@2262: itemValue: alignColumnsLeft cg@2262: translateLabel: true cg@2262: ) cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Make Cell Centered' cg@2262: itemValue: alignColumnsCentered cg@2262: translateLabel: true cg@2262: ) cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Make Cell Right Aligned' cg@2262: itemValue: alignColumnsRight cg@2262: translateLabel: true cg@2262: ) cg@2262: ) cg@2262: nil cg@2262: nil tz@408: ) cg@2262: ) cg@2262: (MenuItem cg@2371: label: 'Colors' cg@2371: translateLabel: true cg@2371: submenu: cg@2371: (Menu cg@2371: ( cg@2371: (MenuItem cg@2371: enabled: hasSelection cg@2371: label: 'Set Cell Color Selectors' cg@2371: itemValue: setCellColorSelectors cg@2371: translateLabel: true cg@2371: ) cg@2371: (MenuItem cg@2371: enabled: hasSelection cg@2371: label: 'Set Selected Cell Color Selectors' cg@2371: itemValue: setSelectedCellColorSelectors cg@2371: translateLabel: true cg@2371: ) cg@2371: ) cg@2371: nil cg@2371: nil cg@2371: ) cg@2371: ) cg@2371: (MenuItem cg@2380: label: 'Behavior' cg@2380: translateLabel: true cg@2380: submenu: cg@2380: (Menu cg@2380: ( cg@2380: (MenuItem cg@2380: enabled: hasSelection cg@2380: label: 'Make Selected Cells Unselectable' cg@2380: itemValue: makeSelectedCellsUnselectable cg@2380: translateLabel: true cg@2380: ) cg@2380: (MenuItem cg@2380: enabled: hasSelection cg@2380: label: 'Make Selected Cells Selectable' cg@2380: itemValue: makeSelectedCellsSelectable cg@2380: translateLabel: true cg@2380: ) cg@2380: ) cg@2380: nil cg@2380: nil cg@2380: ) cg@2380: ) cg@2380: (MenuItem cg@2262: label: '-' cg@2262: ) cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Make Selectable' cg@2262: itemValue: makeColumnsSelectable cg@2262: translateLabel: true cg@2262: ) cg@2262: (MenuItem cg@2262: enabled: hasSelection cg@2262: label: 'Make Unselectable' cg@2262: itemValue: makeColumnsUnselectable cg@2262: translateLabel: true cg@2262: ) cg@2262: ) cg@2262: nil cg@2262: nil tz@408: ) tz@408: ! tz@408: cg@2262: menuEditWithoutAccelerators cg@2321: ^ self menuEdit decodeAsLiteralArray removeAllAccelerators cg@2262: ! cg@2262: tz@408: menuToolbar tz@825: "This resource specification was automatically generated tz@825: by the MenuEditor of ST/X." tz@408: tz@825: "Do not manually edit this!! If it is corrupted, tz@825: the MenuEditor may not be able to read the specification." tz@408: tz@408: " tz@408: MenuEditor new openOnClass:DataSetBuilder andSelector:#menuToolbar tz@408: (Menu new fromLiteralArrayEncoding:(DataSetBuilder menuToolbar)) startUp ca@332: " ca@332: ca@332: ca@332: cg@1757: ^ cg@1757: #(Menu cg@1757: ( cg@1757: (MenuItem cg@1757: activeHelpKey: fileNew cg@1757: label: 'New' cg@1757: itemValue: doNew cg@1757: translateLabel: true cg@1757: isButton: true cg@1887: labelImage: (ResourceRetriever ToolbarIconLibrary newDataSetIcon) cg@1757: ) cg@1757: (MenuItem cg@2262: label: '-' cg@2262: ) cg@2262: (MenuItem cg@1757: activeHelpKey: fileLoad cg@1757: label: 'Load' cg@1757: itemValue: doLoad cg@1757: translateLabel: true cg@1757: isButton: true cg@1757: submenuChannel: menuHistory cg@1887: labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethodIcon) cg@1757: ) cg@1757: (MenuItem cg@2549: activeHelpKey: fileSaveMethod cg@2549: label: 'Save' cg@2549: itemValue: doSave cg@2549: translateLabel: true cg@2549: isButton: true cg@2549: isVisible: notEditingSpecOnly cg@2549: labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethodIcon) cg@2549: ) cg@2549: (MenuItem cg@1757: activeHelpKey: fileSave cg@1757: label: 'Save' cg@1757: itemValue: doSave cg@1757: translateLabel: true cg@1757: isButton: true cg@2549: isVisible: editingSpecOnly cg@2549: labelImage: (ResourceRetriever ToolbarIconLibrary saveToFileIcon) cg@1757: ) cg@1757: (MenuItem cg@1887: label: '-' cg@1757: ) cg@1757: (MenuItem cg@1757: activeHelpKey: editCut cg@1757: enabled: isColumnSelected cg@1757: label: 'Cut' cg@1757: itemValue: doCut cg@1757: translateLabel: true cg@1757: isButton: true cg@1887: labelImage: (ResourceRetriever ToolbarIconLibrary cutWidgetIcon) cg@1757: ) cg@1757: (MenuItem cg@1757: activeHelpKey: editCopy cg@1757: enabled: isColumnSelected cg@1757: label: 'Copy' cg@1757: itemValue: doCopy cg@1757: translateLabel: true cg@1757: isButton: true cg@1887: labelImage: (ResourceRetriever ToolbarIconLibrary copyWidgetIcon) cg@1757: ) cg@1757: (MenuItem cg@1757: activeHelpKey: editPaste cg@1990: enabled: canPasteHolder cg@1757: label: 'Paste' cg@1757: itemValue: doPaste cg@1757: translateLabel: true cg@1757: isButton: true cg@1887: labelImage: (ResourceRetriever ToolbarIconLibrary pasteWidgetIcon) cg@1757: ) cg@1757: (MenuItem cg@1757: activeHelpKey: editDelete cg@1757: enabled: isColumnSelected cg@1757: label: 'Delete' cg@1757: itemValue: doDelete cg@1757: translateLabel: true cg@1757: isButton: true cg@1887: isVisible: false cg@1887: labelImage: (ResourceRetriever ToolbarIconLibrary deleteWidgetIcon) cg@1757: ) cg@1757: (MenuItem cg@1887: label: '-' cg@1757: ) cg@1757: (MenuItem cg@1757: activeHelpKey: addColumn cg@1757: enabled: columnIsNotEditing cg@1757: label: 'Add Column' cg@1757: itemValue: doCreateColumn cg@1757: translateLabel: true cg@1757: isButton: true cg@1757: labelImage: (ResourceRetriever nil newColumnIcon) cg@1757: ) cg@1757: (MenuItem cg@2262: activeHelpKey: addNonSelectableColumn cg@2262: enabled: columnIsNotEditing cg@2262: label: 'Add Column (Non Selectable)' cg@2262: itemValue: doCreateNonSelectableColumn cg@2262: translateLabel: true cg@2262: isButton: true cg@2262: labelImage: (ResourceRetriever DataSetBuilder newColumnNonSelectableIcon) cg@2262: ) cg@2262: (MenuItem cg@2262: label: '' cg@1757: ) cg@1757: (MenuItem cg@1757: activeHelpKey: editMoveUp cg@1757: enabled: isColumnSelected cg@1757: label: 'Move Up' cg@1757: itemValue: doMoveColumn: cg@1757: translateLabel: true cg@1757: isButton: true cg@2262: startGroup: right cg@1757: labelImage: (ResourceRetriever Icon upIcon) cg@1757: argument: up cg@1757: ) cg@1757: (MenuItem cg@1757: activeHelpKey: editMoveDown cg@1757: enabled: isColumnSelected cg@1757: label: 'Move Down' cg@1757: itemValue: doMoveColumn: cg@1757: translateLabel: true cg@1757: isButton: true cg@2262: startGroup: right cg@1757: labelImage: (ResourceRetriever Icon downIcon) cg@1757: argument: down cg@1757: ) cg@1757: ) cg@1757: nil cg@1757: nil ca@332: ) ca@332: ! ! ca@332: ca@332: !DataSetBuilder methodsFor:'accessing'! ca@332: cg@2549: acceptedColumns cg@2549: "returns the last saved columns (internal, for specOnly edit mode)" cg@2549: cg@2549: ^ acceptedColumns cg@2549: ! cg@2549: ca@332: columns tz@419: "returns list of columns" tz@419: ca@818: ^ columns ca@332: ! ca@332: ca@818: columns:aListOfColumns tz@419: "setup columns from a column view" tz@419: cg@2549: |list newColumns| cg@2549: cg@2549: newColumns := OrderedCollection new. cg@2549: list := self seqList. ca@332: list removeAll. ca@332: ca@818: aListOfColumns size ~~ 0 ifTrue:[ ca@818: aListOfColumns do:[:aColumn||column| ca@818: (column := aColumn) isSequenceable ifTrue:[ cg@2167: column := DataSetColumnSpec decodeFromLiteralArray:aColumn ca@818: ] ifFalse:[ ca@818: column := aColumn copy ca@818: ]. cg@2549: newColumns add:column. tz@825: list add:(self labelFromColumn:column). ca@332: ] ca@818: ]. cg@2549: columns := newColumns. ca@818: self updateColumnView. ca@818: cg@2167: "Modified: / 27-03-2007 / 08:46:39 / cg" ca@333: ! ca@333: cg@2549: editingSpecOnly cg@2549: ^ editingSpecOnly ? false cg@2549: ! cg@2549: cg@2549: editingSpecOnly:something cg@2549: editingSpecOnly := something. cg@2549: ! cg@2549: cg@2549: notEditingSpecOnly cg@2549: ^ self editingSpecOnly not cg@2549: ! cg@2549: ca@983: resolveRowClass ca@983: "returns the resolved row class ca@983: " ca@983: ^ Smalltalk resolveName:rowClass inClass:self class ca@983: ! ca@983: ca@333: rowClassName tz@419: ca@983: ^ self resolveRowClass notNil ifTrue:[rowClass] ifFalse:[nil] ca@333: ! ca@333: ca@333: rowClassName:aClassName tz@419: ca@333: |cls| ca@333: ca@818: rowSuperClass := nil. ca@333: ca@818: (rowClass := aClassName) notNil ifTrue:[ ca@983: (cls := self resolveRowClass) notNil ca@818: ifTrue: [rowSuperClass := cls superclass name asString] ca@818: ifFalse:[rowSuperClass := 'Object'] ca@333: ] ca@333: ca@332: ! ! ca@332: tz@419: !DataSetBuilder methodsFor:'aspects'! ca@332: ca@1300: canvasHolder ca@1300: "returns a value holder which keeps selected column" ca@1300: ca@1300: |holder| ca@1300: ca@1300: (holder := builder bindingAt:#canvasHolder) isNil ifTrue:[ ca@1300: builder aspectAt:#canvasHolder put:(holder := ValueHolder new). ca@1300: ]. ca@1300: ^ holder ca@1300: ! ca@1300: tz@419: columnIsNotEditing cg@2262: "returns a boolean value holder which returns true if a columns attributes have not cg@2262: been modified (notebook fields)" ca@332: ca@1311: |holder| ca@1311: ca@1311: (holder := builder bindingAt:#columnIsNotEditing) isNil ifTrue:[ ca@1311: holder := BlockValue forLogicalNot:(self modifiedChannel). ca@1311: builder aspectAt:#columnIsNotEditing put:holder. ca@1311: ]. ca@1311: ^ holder ca@332: ! ca@332: tz@419: editorTypeList tz@419: "generate list of supported editor types" ca@332: ca@332: |list| ca@332: cg@1697: (list := builder bindingAt:#editorTypeList) isNil ifTrue:[ cg@1697: list := (DataSetColumnSpec slices collect:[:eachSlice | eachSlice at:1]) asSet. martin@1700: list := list asOrderedCollection sort. tz@419: builder aspectAt:#editorTypeList put:list ca@332: ]. tz@419: ^list ca@332: ! ca@332: cg@2262: hasColumns cg@2262: "returns a boolean value holder which is set to true if there are any columns" cg@2262: cg@2262: ^ BlockValue cg@2262: with:[:m | m notEmptyOrNil] cg@2262: argument:(self seqList) cg@2262: ! cg@2262: cg@2262: hasSelection cg@2262: ^ (selectedColumnIndex isCollection not and:[ selectedColumnIndex ~~ 0 ]) cg@2262: or:[ selectedColumnIndex size > 0 ] cg@2262: ! cg@2262: tz@408: isColumnSelected cg@2262: "returns a boolean value holder which is set to true if some col is selected" tz@419: tz@419: ^builder valueAspectFor:#isColumnSelected initialValue: false ca@332: ! ca@332: ca@1836: menuEdit cg@2371: "redefined to access my menu and not the one of the UIPainter" cg@2371: cg@2371: ^ [self class menuEdit] ca@1836: ! ca@1836: cg@2262: possiblePrintConverterTypes cg@2262: ^ UISpecification possiblePrintConverterTypes cg@2262: ! cg@2262: ca@332: rendererTypeList tz@419: "generate list of supported renderer types" tz@419: ca@332: |list| ca@332: cg@1697: (list := builder bindingAt:#rendererTypeList) isNil ifTrue:[ cg@1697: list := (DataSetColumnSpec slices collect:[:eachSlice | eachSlice at:2]) asSet. martin@1701: list := list asOrderedCollection sort. tz@419: builder aspectAt:#rendererTypeList put:list ca@332: ]. tz@419: ^list ca@332: ! ca@332: ca@332: selectedColumnModel tz@419: "returns a value holder which keeps selected column" ca@332: ca@332: |holder| ca@332: ca@332: (holder := builder bindingAt:#selectedColumnModel) isNil ifTrue:[ ca@332: holder := AspectAdaptor new subject:self; forAspect:#selectedColumnIndex. ca@332: builder aspectAt:#selectedColumnModel put:holder. ca@332: ]. ca@332: ^ holder ca@332: ! ca@332: ca@332: seqList cg@1182: ^ builder listAspectFor:#seqList ca@332: ! ca@332: ca@391: style tz@419: tz@419: ^self aspectFor:#labelFont ca@391: ! ca@391: ca@332: tabList ca@332: tz@419: ^self class slices collect:[:aSlice|aSlice first] ca@332: ca@332: ! ! ca@332: ca@818: !DataSetBuilder methodsFor:'building'! ca@818: cg@1974: buildFromResourceSpec:aResourceSpec cg@1974: cg@1974: self columns:aResourceSpec. cg@1974: cg@1974: "/ columns notEmpty ifTrue: [ cg@1974: "/ self tabModel value: 1. cg@1974: "/ self selectedColumnModel value:nil; value:1. "/ toggle to force change cg@1974: "/ self updateInputFields. cg@1974: "/ self updateInfoLabel. cg@1974: "/ self updateHistory cg@1974: "/ ]. cg@1974: cg@1974: ! cg@1974: cg@1974: loadFromClass:aClass andSelector:aSelector cg@2549: |cls list| tz@825: cg@1974: self assert:(aClass isNil or:[aClass isClass]). cg@1974: tz@825: selectedColumnIndex := 0. tz@825: tz@825: "if opened on table columns" tz@825: tz@825: aClass isNil ifTrue: [ tz@825: self tabModel value: 0. cg@2549: "/ self columns removeAll. cg@2549: "/ self seqList removeAll. tz@825: self updateColumnView. tz@825: self updateInfoLabel. cg@1974: self isColumnSelected value: false. cg@1974: ^ self. tz@825: ]. tz@825: cg@2549: specSelector isNil ifTrue: [ cg@2549: self updateAfterColumnChange. cg@2549: ^ self cg@2549: ]. ca@818: ca@818: list := nil. ca@818: ca@818: (aClass notNil or:[self isStandAlone or:[self window shown]]) ifTrue:[ ca@818: (aClass notNil and:[aSelector notNil]) ifTrue:[ cg@1974: cls := aClass isBehavior ifTrue:[ aClass ] ifFalse:[ self resolveName:aClass]. cg@1974: cg@1974: (cls respondsTo: aSelector) ifTrue:[ cg@1974: list := cls perform: aSelector. cg@1974: ]. ca@818: ] ca@818: ] ifFalse:[ ca@818: list := columns ca@818: ]. tz@825: self columns:list. cg@2549: self updateAfterColumnChange. cg@2549: ! cg@2549: cg@2549: updateAfterColumnChange ca@2557: self tabModel changed "value:0; value:1". "/ toggle to force change ca@2557: self selectedColumnModel changed "value:nil; value:1". "/ toggle to force change cg@2549: self updateColumnView. cg@2549: self updateInputFields. cg@2549: self updateInfoLabel. cg@2549: self updateHistory. cg@2549: self clearModifiedFlag. cg@2549: self enablingCommitButtonsHolder value:false. ca@818: ! ! ca@818: ca@332: !DataSetBuilder methodsFor:'code generation'! ca@332: ca@332: compile:aCode forClass:aClass inCategory:aCategory tz@419: "compile method for class in a category" tz@419: cg@1569: aClass cg@1569: compile:(aCode withCRs) cg@1569: classified:aCategory ca@332: ! ca@332: ca@380: generateBackgroundSelectorIn:aClass tz@419: "generate code for #backgroundSelector" tz@419: ca@380: |sel catg code bCode| ca@380: cg@1771: catg := #'accessing look'. ca@380: code := '\' ca@380: , ' "automatically generated by DataSetBuilder ..."\' ca@380: , '\' ca@380: , ' "specific background color for a cell"\' ca@380: , '\' ca@380: . ca@380: tz@419: columns do: tz@419: [:aColumn| cg@1553: ((sel := aColumn backgroundSelector) notNil and:[(aClass includesSelector:sel) not]) tz@419: ifTrue: tz@419: [ tz@419: bCode := sel asString, code, ' ^nil'. ca@380: self compile:bCode forClass:aClass inCategory:catg ca@380: ] ca@380: ] ca@380: ! ca@380: ca@332: generateChoicesIn:aClass tz@419: "generate code for #choices" tz@419: cg@1009: |sel catg code edt| ca@332: cg@1771: catg := #'accessing menu'. ca@332: code := '\' ca@332: , ' "automatically generated by DataSetBuilder ..."\' ca@332: , '\' ca@983: , ' "get choices for visual editor; (a list of labels)..."\' ca@332: , '\' ca@983: , ' ^ #( foo bar baz )' ca@332: . ca@332: cg@1009: columns do:[:aColumn| cg@1009: edt := aColumn editorType. cg@1009: cg@1009: ( aColumn canSelect cg@1009: and:[(sel := aColumn choices) notNil cg@1009: and:[(edt == #ComboBox or:[edt == #ComboList]) cg@1553: and:[(aClass includesSelector:sel) not]]] cg@1009: ) ifTrue:[ ca@332: self compile:(sel asString, code) forClass:aClass inCategory:catg ca@332: ] ca@332: ] ca@332: ! ca@332: ca@391: generateDoubleClickSelectorIn:aClass tz@419: "generate code for #foregroundSelector" tz@419: ca@391: |sel catg code bCode| ca@391: cg@1841: catg := #'accessing-action'. ca@391: code := '\' ca@391: , ' "automatically generated by DataSetBuilder ..."\' ca@391: , '\' ca@391: , ' "specific selector to be called on double click"\' ca@391: , '\' ca@391: . ca@391: tz@419: columns do: tz@419: [:aColumn| tz@419: ((sel := aColumn doubleClickedSelector) notNil cg@1553: and:[(aClass includesSelector:sel) not]) tz@419: ifTrue: tz@419: [ ca@391: bCode := sel asString, code. ca@391: self compile:bCode forClass:aClass inCategory:catg ca@391: ] ca@391: ] ca@391: ! ca@391: ca@380: generateForegroundSelectorIn:aClass ca@380: "generate code for #foregroundSelector ca@380: " ca@380: |sel catg code bCode| ca@380: cg@1841: catg := #'accessing-look'. ca@380: code := '\' ca@380: , ' "automatically generated by DataSetBuilder ..."\' ca@380: , '\' ca@380: , ' "specific foreground color for a cell"\' ca@380: , '\' ca@380: . ca@380: tz@419: columns do: tz@419: [:aColumn| tz@419: ((sel := aColumn foregroundSelector) notNil cg@1553: and:[(aClass includesSelector:sel) not]) tz@419: ifTrue: tz@419: [ cg@1841: bCode := sel asString, code, ' ^ nil'. ca@380: self compile:bCode forClass:aClass inCategory:catg ca@380: ] ca@380: ] ca@380: ! ca@380: ca@332: generateMenuIn:aClass tz@419: "generate code for #menu" tz@419: ca@332: |sel catg code| ca@332: cg@1771: catg := #'accessing menu'. ca@332: code := '\' ca@332: , ' "automatically generated by DataSetBuilder ..."\' ca@332: , '\' ca@332: , ' "get middleButton menu for selected cell in column"\' ca@332: , '\' tz@419: , ' ^nil' ca@332: . ca@332: tz@419: columns do: tz@419: [:aColumn| tz@419: (aColumn canSelect tz@419: and:[(sel := aColumn menu) notNil cg@1553: and:[(aClass includesSelector:sel) not]]) tz@419: ifTrue: tz@419: [ ca@332: self compile:(sel asString, code) forClass:aClass inCategory:catg ca@332: ] ca@332: ] ca@332: ! ca@332: ca@332: generatePrintSelectorIn:aClass tz@419: "generate code for #printSelector" tz@419: ca@332: |sel catg code| ca@332: cg@1771: catg := #'accessing'. cg@1004: code := '\' ca@332: , ' "automatically generated by DataSetBuilder ..."\' ca@332: , '\' ca@332: , ' "get drawable image or text on a gc"\' ca@332: , '\' cg@1004: , ' ^ ' ca@332: . ca@332: cg@1004: columns do:[:aColumn| cg@1004: ( aColumn rendererType ~~ #rowSelector cg@1004: and:[(sel := aColumn printSelector) notNil cg@1553: and:[(aClass includesSelector:sel) not]] cg@1004: ) ifTrue:[ cg@1548: |numArgs bcode keys| cg@1004: bcode := sel asString. cg@1548: numArgs := sel numArgs. cg@1548: cg@1548: numArgs ~~ 0 ifTrue:[ cg@1548: numArgs == 1 ifTrue:[ cg@1004: bcode := bcode, 'aGC' cg@1004: ] ifFalse:[ cg@1004: keys := sel keywords. cg@1004: bcode := (keys at:1), 'aGC ', (keys at:2), 'aColNr'. cg@1004: ] cg@1004: ]. cg@1004: self compile:(bcode, code, '''', bcode, '''') forClass:aClass inCategory:catg ca@332: ] ca@332: ] ca@332: ! ca@332: ca@332: generateReadSelectorIn:aClass tz@419: "generate code for #readSelector" tz@419: ca@332: |sel catg code bCode| ca@332: cg@1771: catg := #'accessing'. ca@332: code := '\' ca@332: , ' "automatically generated by DataSetBuilder ..."\' ca@332: , '\' ca@332: , ' "get value"\' ca@332: , '\' ca@332: . ca@332: tz@419: columns do: tz@419: [:aColumn| tz@419: (aColumn rendererType ~~ #rowSelector tz@419: and:[(sel := aColumn readSelector) notNil cg@1553: and:[(aClass includesSelector:sel) not]]) tz@419: ifTrue: tz@419: [ tz@419: (aColumn printSelector isNil or:[aColumn canSelect]) tz@419: ifTrue: tz@419: [ cg@1004: |selName| cg@1004: selName := sel asString. cg@1004: tz@419: sel numArgs == 0 cg@1004: ifTrue: [bCode := selName, code] cg@1004: ifFalse:[bCode := selName, 'anIndex\', code]. tz@419: aColumn rendererType == #CheckToggle cg@1004: ifFalse:[bCode := bCode, ' ^ ''', selName, ''''] tz@419: ifTrue: [bCode := bCode, ' ^true']. ca@332: self compile:bCode forClass:aClass inCategory:catg ca@332: ] ca@332: ] ca@332: ] ca@332: ! ca@332: ca@983: generateRowSeparatorSelectorIn:aClass ca@983: "generate code for #rowSeparatorSelector" ca@983: ca@983: |sel catg code bCode| ca@983: cg@1771: catg := #'accessing look'. ca@983: code := '\' ca@983: , ' "automatically generated by DataSetBuilder ..."\' ca@983: , '\' ca@983: , ' "specific row separator visibility for a cell"\' ca@983: , '\' ca@983: . ca@983: ca@983: columns do: ca@983: [:aColumn| cg@1553: ((sel := aColumn rowSeparatorSelector) notNil and:[(aClass includesSelector:sel) not]) ca@983: ifTrue: ca@983: [ ca@983: bCode := sel asString, code, ' ^true'. ca@983: self compile:bCode forClass:aClass inCategory:catg ca@983: ] ca@983: ] ca@983: ! ca@983: ca@377: generateSelectSelectorIn:aClass ca@377: "generate code for #selectSelector ca@377: " ca@377: |sel catg code bCode| ca@377: cg@1771: catg := #'accessing selection'. ca@377: code := '\' ca@377: , ' "automatically generated by DataSetBuilder ..."\' ca@377: , '\' ca@377: , ' "can select cell in column"\' ca@377: , '\' ca@377: . ca@377: tz@419: columns do: tz@419: [:aColumn| tz@419: (aColumn rendererType ~~ #rowSelector ca@377: and:[(sel := aColumn selectSelector) notNil cg@1553: and:[(aClass includesSelector:sel) not]]) tz@419: ifTrue: tz@419: [ tz@419: aColumn canSelect tz@419: ifTrue: tz@419: [ tz@419: bCode := sel asString, code, ' ^true'. ca@377: self compile:bCode forClass:aClass inCategory:catg ca@377: ] ca@377: ] ca@377: ] ca@377: ! ca@377: cg@1009: generateShowComboFieldSelectorIn:aClass cg@1009: "generate code for #showComboFieldSelector cg@1009: " cg@1009: |sel catg code bCode edt state| cg@1009: cg@1771: catg := #'accessing menu'. cg@1009: code := '\' cg@1009: , ' "automatically generated by DataSetBuilder ..."\' cg@1009: , '\' cg@1009: , ' "open an editField on a combo list or box"\' cg@1009: , '\' cg@1009: . cg@1009: cg@1009: columns do:[:aColumn| cg@1009: edt := aColumn editorType. cg@1009: cg@1009: ( aColumn canSelect cg@1009: and:[(sel := aColumn showComboFieldSelector) notNil cg@1009: and:[(edt == #ComboBox or:[edt == #ComboList]) cg@1553: and:[(aClass includesSelector:sel) not]]] cg@1009: ) ifTrue:[ cg@1009: state := edt == #ComboBoxView. cg@1009: cg@1009: bCode := sel asString, code, ' ^ ', state printString. cg@1009: self compile:bCode forClass:aClass inCategory:catg cg@1009: ] cg@1009: ] cg@1009: ! cg@1009: ca@332: generateWriteSelectorIn:aClass tz@419: "generate code for #writeSelector" tz@419: ca@379: |sel catg code bCode sz| ca@332: cg@1771: catg := #'accessing'. ca@332: code := 'aValue\' ca@332: , ' "automatically generated by DataSetBuilder ..."\' ca@332: , '\' ca@332: , ' "set value"\' ca@332: . ca@332: tz@419: columns do: tz@419: [:aColumn| tz@419: ((sel := aColumn writeSelector) notNil ca@983: and:[aColumn editorType ~~ #None tz@419: and:[aColumn canSelect cg@1553: and:[(aClass includesSelector:sel) not]]]) tz@419: ifTrue: tz@419: [ tz@419: sel numArgs == 1 tz@419: ifTrue: tz@419: [ ca@379: bCode := sel asString tz@419: ] tz@419: ifFalse: tz@419: [ ca@379: sz := sel indexOf:$:. ca@379: bCode := sel copyTo:sz. tz@419: bCode := bCode, 'anIndex ', (sel copyFrom:sz + 1) ca@379: ]. ca@379: self compile:(bCode, code) forClass:aClass inCategory:catg ca@332: ] ca@332: ] ca@332: ! ! ca@332: cg@2262: !DataSetBuilder methodsFor:'event handling'! cg@2262: cg@2262: processEvent:anEvent cg@2262: "filter keyboard edit-events typed into the listOfItemsView. cg@2262: Return true, if I have eaten the event" cg@2262: cg@2262: |evView inView rawKey key| cg@2262: cg@2262: anEvent isKeyPressEvent ifFalse:[^ false]. cg@2262: cg@2262: evView := anEvent targetView. cg@2262: evView isNil ifTrue:[ ^ false ]. cg@2262: cg@2262: inView := evView isSameOrComponentOf:listOfItemsView. cg@2262: inView ifTrue:[^ false]. cg@2262: cg@2262: key := anEvent key. cg@2262: rawKey := anEvent rawKey. cg@2262: cg@2262: ( key == #Delete cg@2262: or:[key == #BackSpace cg@2262: or:[key == #Cut]] cg@2262: ) ifTrue:[ cg@2262: self doCut. cg@2262: ^ true. cg@2262: ]. cg@2262: cg@2262: key == #Copy ifTrue:[ self doCopy. ^ true ]. cg@2262: key == #Paste ifTrue:[ self doPaste. ^ true ]. cg@2262: cg@2262: (rawKey == #CtrlCursorUp) ifTrue:[ cg@2262: self doMoveUp. cg@2262: ^ true. cg@2262: ]. cg@2262: (rawKey == #CtrlCursorDown) ifTrue:[ cg@2262: self doMoveDown. cg@2262: ^ true. cg@2262: ]. cg@2262: cg@2262: ^ false. cg@2262: ! ! cg@2262: ca@332: !DataSetBuilder methodsFor:'initialization'! ca@332: ca@332: initialize tz@825: "initializes" ca@332: ca@332: super initialize. ca@332: tz@825: selectedColumnIndex := 0. cg@1156: columns := OrderedCollection new. cg@1156: modalOpened := false. ca@1300: listOfSpecViews := Array new:(self class slices size). ca@2557: editingSpecOnly := false. werner@1824: ! werner@1824: cg@2549: loadFromResourceSpec: aResourceSpec cg@2549: self columns:aResourceSpec copy. cg@2549: modified := false. cg@2549: hasSaved := false. cg@2549: self updateAfterColumnChange. cg@2549: ! cg@2549: werner@1824: setDefaultValuesInNewColumn:aDataSetColumnSpec werner@1825: "/ aDataSetColumnSpec readSelector: #'valueAtColumnIndex:'. werner@1825: "/ aDataSetColumnSpec writeSelector: #'valueAtColumnIndex:put:'. werner@1825: "/ aDataSetColumnSpec backgroundSelector: #'bgAtRowIndex:columnIndex:'. werner@1825: "/ aDataSetColumnSpec foregroundSelector: #'fgAtRowIndex:columnIndex:'. werner@1825: "/ aDataSetColumnSpec selectSelector: #'selectAtColumnIndex:'. werner@1825: "/ aDataSetColumnSpec editorType: #InputField. ca@332: ! ! ca@332: cg@2262: !DataSetBuilder methodsFor:'operations'! cg@2262: cg@2262: addCellSeparators cg@2262: self addRowSeparators. cg@2262: self addColumnSeparators. cg@2262: ! cg@2262: cg@2262: addColumnSeparators cg@2262: self selectedColumnsDo:[:eachColDescr | cg@2262: eachColDescr showColSeparator:true cg@2262: ]. cg@2262: self updateAfterOperation. cg@2262: ! cg@2262: cg@2262: addLabelColumnSeparators cg@2262: self selectedColumnsDo:[:eachColDescr | cg@2262: eachColDescr labelButtonType:#Button cg@2262: ]. cg@2262: self updateAfterOperation. cg@2262: ! cg@2262: cg@2262: addLabelSeparators cg@2262: self selectedColumnsDo:[:eachColDescr | cg@2262: eachColDescr labelButtonType:#Button cg@2262: ]. cg@2262: self updateAfterOperation. cg@2262: ! cg@2262: cg@2262: addRowSeparators cg@2262: self selectedColumnsDo:[:eachColDescr | cg@2262: eachColDescr showRowSeparator:true cg@2262: ]. cg@2262: self updateAfterOperation. cg@2262: ! cg@2262: cg@2262: alignColumns:how cg@2262: self selectedColumnsDo:[:eachColDescr | cg@2262: eachColDescr columnAlignment:how cg@2262: ]. cg@2262: self updateAfterOperation. cg@2262: ! cg@2262: cg@2262: alignColumnsCentered cg@2262: self alignColumns:#centered cg@2262: ! cg@2262: cg@2262: alignColumnsLeft cg@2262: self alignColumns:#left cg@2262: ! cg@2262: cg@2262: alignColumnsRight cg@2262: self alignColumns:#right cg@2262: ! cg@2262: cg@2262: alignLabels:how cg@2262: self selectedColumnsDo:[:eachColDescr | cg@2262: eachColDescr labelAlignment:how cg@2262: ]. cg@2262: self updateAfterOperation. cg@2262: ! cg@2262: cg@2262: alignLabelsCentered cg@2262: self alignLabels:#centered cg@2262: ! cg@2262: cg@2262: alignLabelsLeft cg@2262: self alignLabels:#left cg@2262: ! cg@2262: cg@2262: alignLabelsRight cg@2262: self alignLabels:#right cg@2262: ! cg@2262: cg@2262: makeColumnsSelectable cg@2262: self makeColumnsSelectable:true cg@2262: ! cg@2262: cg@2262: makeColumnsSelectable:aBoolean cg@2262: self selectedColumnsDo:[:eachColDescr | cg@2262: eachColDescr canSelect:aBoolean cg@2262: ]. cg@2262: self updateAfterOperation. cg@2262: ! cg@2262: cg@2262: makeColumnsUnselectable cg@2262: self makeColumnsSelectable:false cg@2262: ! cg@2262: cg@2380: makeSelectedCellsSelectable cg@2380: self selectedColumnsDo:[:eachColDescr | cg@2380: eachColDescr canSelect:true cg@2380: ]. cg@2380: self updateAfterOperation. cg@2380: ! cg@2380: cg@2380: makeSelectedCellsUnselectable cg@2380: self selectedColumnsDo:[:eachColDescr | cg@2380: eachColDescr canSelect:false cg@2380: ]. cg@2380: self updateAfterOperation. cg@2380: ! cg@2380: cg@2262: removeCellSeparators cg@2262: self removeRowSeparators. cg@2262: self removeColumnSeparators. cg@2262: ! cg@2262: cg@2262: removeColumnSeparators cg@2262: self selectedColumnsDo:[:eachColDescr | cg@2262: eachColDescr showColSeparator:false cg@2262: ]. cg@2262: self updateAfterOperation. cg@2262: ! cg@2262: cg@2262: removeLabelColumnSeparators cg@2262: self selectedColumnsDo:[:eachColDescr | cg@2262: eachColDescr labelButtonType:#Group cg@2262: ]. cg@2262: self updateAfterOperation. cg@2262: ! cg@2262: cg@2262: removeLabelSeparators cg@2262: self selectedColumnsDo:[:eachColDescr | cg@2262: eachColDescr labelButtonType:#None cg@2262: ]. cg@2262: self updateAfterOperation. cg@2262: ! cg@2262: cg@2262: removeRowSeparators cg@2262: self selectedColumnsDo:[:eachColDescr | cg@2262: eachColDescr showRowSeparator:false cg@2262: ]. cg@2262: self updateAfterOperation. cg@2262: ! cg@2262: cg@2262: selectedColumnsDo:aBlock cg@2262: selectedColumnIndex isCollection ifTrue:[ cg@2262: selectedColumnIndex do:[:idx | aBlock value:(columns at:idx)]. cg@2262: ] ifFalse:[ cg@2262: selectedColumnIndex ~~ 0 ifTrue:[ cg@2262: selectedColumnIndex notNil ifTrue:[ cg@2262: aBlock value:(columns at:selectedColumnIndex) cg@2262: ] cg@2262: ]. cg@2262: ]. cg@2262: ! cg@2262: cg@2371: setCellColorSelectors cg@2371: |fgSelector bgSelector| cg@2371: cg@2371: fgSelector := Dialog request:'FG-Selector for all selected Columns (accept empty for none):'. cg@2371: fgSelector isNil ifTrue:[^ self]. cg@2371: cg@2371: bgSelector := Dialog request:'BG-Selector for all selected Columns (accept empty for none):'. cg@2371: bgSelector isNil ifTrue:[^ self]. cg@2371: cg@2371: self selectedColumnsDo:[:eachColDescr | cg@2371: bgSelector notEmpty ifTrue:[ cg@2371: eachColDescr backgroundSelector:bgSelector cg@2371: ]. cg@2371: fgSelector notEmpty ifTrue:[ cg@2371: eachColDescr foregroundSelector:fgSelector cg@2371: ]. cg@2371: ]. cg@2371: self updateAfterOperation. cg@2371: ! cg@2371: cg@2371: setSelectedCellColorSelectors cg@2371: |fgSelector bgSelector| cg@2371: cg@2371: fgSelector := Dialog request:'Selected FG-Selector for all selected Columns (accept empty for none):'. cg@2371: fgSelector isNil ifTrue:[^ self]. cg@2371: cg@2371: bgSelector := Dialog request:'Selected BG-Selector for all selected Columns (accept empty for none):'. cg@2371: bgSelector isNil ifTrue:[^ self]. cg@2371: cg@2371: self selectedColumnsDo:[:eachColDescr | cg@2371: bgSelector notEmpty ifTrue:[ cg@2371: eachColDescr selectedBackgroundSelector:bgSelector cg@2371: ]. cg@2371: fgSelector notEmpty ifTrue:[ cg@2371: eachColDescr selectedForegroundSelector:fgSelector cg@2371: ]. cg@2371: ]. cg@2371: self updateAfterOperation. cg@2371: ! cg@2371: cg@2262: updateAfterOperation cg@2262: self updateColumnView. cg@2262: self updateInputFields. cg@2262: self setModified. cg@2262: ! ! cg@2262: ca@332: !DataSetBuilder methodsFor:'private'! ca@332: ca@818: labelFromColumn:aColumn ca@1562: |label| ca@1562: ca@1562: aColumn rendererType == #rowSelector ifTrue:[ ca@1562: ^ 'Row Selector' ca@1562: ]. ca@1562: label := aColumn label. cg@2152: label isNil ifTrue:[^ nil]. ca@1562: ca@1562: label isString ifTrue:[^ label]. ca@1562: ca@1562: label size > 0 ifTrue:[ ca@1562: label := label at:1. ca@1562: ]. ca@1562: ^ label printString cg@1004: ! cg@1004: cg@1004: labelInPreviewPressed:anIndex cg@1597: (self componentAt:#labelAndColumns) selection:anIndex ca@332: ! ca@332: ca@332: updateColumnView cg@2549: "updates the column view from column descriptions" cg@2549: cg@2549: |size previewColumns columnList| tz@825: tz@825: columnView notNil ifTrue:[ tz@825: columnList := List new. ca@1019: previewColumns := OrderedCollection new. ca@1019: ca@1019: (size := columns size) ~~ 0 ifTrue:[ ca@1019: columns do:[:aCol| ca@1019: previewColumns add:(aCol copy) ca@1019: ]. cg@1004: previewColumns keysAndValuesDo:[:anIndex :column| penk@1731: column penk@1731: readSelector: #at:; tz@857: writeSelector: #at:put:; tz@857: backgroundSelector:nil; tz@857: foregroundSelector:nil; ca@983: rowSeparatorSelector:nil; tz@857: selectSelector: nil; cg@1009: showComboFieldSelector: nil; ca@1261: selectSelector: nil; tz@857: doubleClickedSelector: nil; tz@857: printSelector: nil; penk@1731: visibilitySelector: nil; tz@857: menu: nil; cg@1004: labelActionSelector:#labelInPreviewPressed:; cg@1004: labelActionArgument:anIndex; cg@1004: choices:#choices tz@825: ]. cg@1004: #(' 1' ' 2' ' x') do:[:suffix| cg@2549: |oneRow| cg@2549: cg@2549: oneRow := Row new:size. cg@2549: 1 to:size do:[:i | oneRow at: i put: ('Cell%1-%2' bindWith:suffix with:i)]. cg@2549: columnList add: oneRow. tz@825: ] tz@825: ]. cg@2549: tz@825: columnView list: #(). tz@825: columnView columnDescriptors: previewColumns. tz@825: columnView list: columnList. cg@1156: ]. cg@1014: cg@1014: "Modified: / 27.10.1998 / 14:41:16 / cg" tz@419: ! tz@419: tz@419: updateInputFields tz@825: "reloads item value into input fields" tz@419: ca@1836: |column notifyValue| tz@419: cg@1004: (column := self selectedColumn) isNil ifTrue:[ tz@419: self tabModel value:0. cg@1004: ] ifFalse:[ ca@1836: notifyValue := nil. "/ old: '' -> problems with Toggles (asBoolean) ca@1836: ca@1836: aspects do:[:anAspect| anAspect value:notifyValue ]. cg@1036: aspects keysAndValuesDo:[:aKey :aModel | cg@1036: aModel value:(column perform:aKey) withoutNotifying: self cg@1036: ]. ca@1311: ca@1311: "/ REPALCE nil by empty string for specific inputFields without an adapter ca@1311: #( #labelActionArgument #formatString #id ) do:[:aKey| |model| ca@1311: model := aspects at:aKey. ca@1836: model value isNil ifTrue:[model value:notifyValue withoutNotifying: self] ca@1311: ]. ca@1311: cg@1156: tabSelection == 0 ifTrue:[self tabModel value:1]. cg@1156: ]. ca@332: ! ! ca@332: ca@332: !DataSetBuilder methodsFor:'selection'! ca@332: ca@332: selectedColumn tz@419: "returns selected column or nil" tz@419: cg@2262: selectedColumnIndex isCollection ifTrue:[ cg@2262: ^ selectedColumnIndex size == 1 cg@2262: ifTrue:[ columns at:selectedColumnIndex first ] cg@2262: ifFalse:[ nil ] cg@2262: ]. cg@2262: tz@419: ^selectedColumnIndex == 0 tz@825: ifFalse:[columns at:selectedColumnIndex ifAbsent: nil] tz@419: ifTrue: [nil] ca@332: ! ca@332: ca@332: selectedColumnIndex tz@419: "returns selected column index or 0" tz@419: tz@419: ^selectedColumnIndex ca@332: ! ca@332: ca@332: selectedColumnIndex:something cg@2262: "changes selected column and updates specifications" tz@419: cg@1004: something == selectedColumnIndex ifFalse:[ ca@332: selectedColumnIndex := something ? 0. ca@2557: "/ self assert:( selectedColumnIndex <= columns size ). ca@2557: "/ self assert:( selectedColumnIndex <= self seqList size ). tz@408: self isColumnSelected value: true cg@1156: ]. ca@332: ! ca@332: cg@2262: selectedColumnIndices cg@2262: "returns selected column indices or #()" cg@2262: cg@2262: selectedColumnIndex == 0 ifTrue:[ ^ #() ]. cg@2262: selectedColumnIndex isNumber ifTrue:[ ^ Array with:selectedColumnIndex ]. cg@2262: ^selectedColumnIndex cg@2262: ! cg@2262: cg@2262: selectedColumns cg@2262: selectedColumnIndex isCollection ifTrue:[ cg@2262: ^ selectedColumnIndex collect:[:idx | columns at:idx] cg@2262: ]. cg@2262: cg@2262: ^ selectedColumnIndex == 0 cg@2262: ifFalse:[ Array with:(columns at:selectedColumnIndex) ] cg@2262: ifTrue: [ #() ] cg@2262: ! cg@2262: cg@2262: singleSelectedColumnIndex cg@2262: selectedColumnIndex isCollection ifTrue:[ cg@2262: ^ selectedColumnIndex size == 1 cg@2262: ifTrue:[ selectedColumnIndex first ] cg@2262: ifFalse:[ 0 ] cg@2262: ]. cg@2262: cg@2262: ^ selectedColumnIndex cg@2262: ! cg@2262: tz@825: tabSelection:something tz@825: "changes selected tab and set corresponding specification" tz@419: ca@1300: |view spec| ca@1300: ca@1300: something == tabSelection ifTrue:[^self]. ca@1300: ca@1300: (tabSelection := something) isNil ifTrue:[ ca@1300: tabSelection == 0 ifTrue:[^ self]. ca@1300: tabSelection := 0. ca@1300: ]. cg@1004: cg@1004: self selectedColumn isNil ifTrue:[ ca@1300: tabSelection ~~ 0 ifTrue:[ ca@1300: self tabModel value:0 ca@1300: ] ifFalse:[ ca@1300: self canvasHolder value:nil ca@1300: ]. ca@1300: ^ self ca@332: ]. ca@1300: ca@1300: tabSelection == 0 ifTrue:[ ca@1300: ^ self tabModel value:1. cg@1158: ]. ca@1300: ca@1300: (view := listOfSpecViews at:tabSelection) isNil ifTrue:[ ca@1300: view := SimpleView new. ca@1300: spec := (self class slices at:tabSelection) last. ca@1390: ca@1390: "/ view client:nil spec:(self class interfaceSpecFor:spec) builder:(self builder). ca@1300: view client:self spec:spec builder:(self builder). ca@1300: listOfSpecViews at:tabSelection put:view. ca@1300: ]. ca@1300: self canvasHolder value:view ca@332: ! ! ca@332: cg@1716: !DataSetBuilder methodsFor:'startup & release'! tz@408: cg@2000: commonPostBuild cg@2000: columnView := self componentAt:#columnView. cg@2000: cg@2000: columns notEmpty ifTrue: [ cg@2000: self tabModel value: 1. cg@2000: self selectedColumnModel value:nil; value:1. "/ toggle to force change cg@2000: self updateInputFields. cg@2000: self updateInfoLabel. cg@2000: self updateHistory cg@2000: ]. cg@2000: cg@2000: (self componentAt: #labelAndColumns) cg@2000: selectConditionBlock: [:i|self askForItemModification]; cg@2000: action: [:i|self cancel]; cg@2000: selection: 1. cg@2000: cg@2000: "/ using masters infoHolder ? cg@2000: (builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[ cg@2000: (builder componentAt:#mainPanel) layout bottomOffset:0. cg@2000: (builder componentAt:#infoBarSubSpec) beInvisible cg@2000: ] cg@2000: ! cg@2000: tz@826: openModal tz@826: "sets the modalOpened flag, so later, tz@826: there is no need to ask for saving into a class" tz@826: tz@826: modalOpened := true. tz@826: super openModal tz@826: ! tz@826: tz@825: openModalOnResourceSpec: aListSpec tz@825: "sets the modalOpened flag, so later, tz@825: there is no need to ask for saving into a class" tz@419: tz@825: modalOpened := true. tz@825: super openModalOnResourceSpec: aListSpec tz@825: tz@825: tz@409: ! tz@409: cg@2262: postBuildListOfItemsView:aView cg@2262: listOfItemsView := aView cg@2262: ! cg@2262: cg@2262: postBuildSpecView:aView cg@2262: listOfItemsView := aView cg@2262: ! cg@2262: ca@1250: postOpenWith:aBuilder cg@2021: "reset keyboardProcessor for menuBar" cg@2021: cg@2262: super postOpenWith:aBuilder. ca@1250: aBuilder keyboardProcessor menuBar:nil. cg@2262: self windowGroup addPreEventHook:self. tz@408: ! ! tz@408: tz@419: !DataSetBuilder methodsFor:'user actions'! tz@419: tz@419: accept tz@419: "accept changes made" tz@419: tz@419: |column type| tz@419: tz@825: super accept. tz@419: tz@419: (column := self selectedColumn) isNil ifTrue: [^self cancel]. tz@419: tz@419: type := (aspects at:#rendererType) value. tz@419: ca@818: type == #rowSelector ifTrue:[ penk@1731: #(label cg@1944: width minWidth usePreferredWidth editorType choices translatedChoices penk@1731: readSelector writeSelector printSelector visibilitySelector cg@2475: formatString formatSelector type converterSelector size height canSelect selectSelector showComboFieldSelector werner@1822: minValue maxValue ca@818: ) do:[:aKey| ca@818: (aspects at:aKey) value:nil ca@818: ] tz@419: ]. cg@1036: aspects keysAndValuesDo:[:aKey :aModel| cg@1036: column perform:(aKey , ':') asSymbol with: aModel value cg@1036: ]. cg@2262: self seqList at:self singleSelectedColumnIndex put:(self labelFromColumn:column). tz@419: self updateColumnView. tz@825: self cancel. cg@1974: self clearModified. tz@419: ! tz@419: tz@419: cancel tz@419: "remove all changes and reload selected column values" tz@419: tz@419: self updateInputFields. cg@1990: self enablingCommitButtonsHolder value:false. cg@1187: self clearModifiedFlag. cg@1990: self enablingCommitButtonsHolder value:false. cg@1014: cg@1014: "Modified: / 27.10.1998 / 14:41:41 / cg" tz@419: ! tz@419: cg@1036: cutOrDelete:isCut cg@1036: "remove selected column and optionally put it to the clipboard" cg@1036: cg@2262: |indices selectionModel| cg@2262: cg@2262: ((indices := self selectedColumnIndices) notEmpty and:[self askForItemModification]) ifFalse:[ ca@1390: ^ self ca@1390: ]. ca@1390: isCut ifTrue:[ cg@2262: self clipboard: (self selectedColumns) ca@1390: ]. cg@2262: cg@2262: selectionModel := self selectedColumnModel. cg@2262: selectionModel value:0. cg@2262: cg@2262: indices sort reverseDo:[:idx | cg@2262: columns removeIndex:idx. cg@2262: self seqList removeIndex:idx. cg@2262: ]. cg@2262: cg@2262: selectionModel value:((indices max) min:(columns size)). cg@2262: self updateColumnView. cg@2262: self updateInputFields. ca@1390: ca@1390: columns isEmpty ifTrue:[ ca@1390: self isColumnSelected value: false ca@1390: ]. ca@1390: self cancel. cg@1974: self setModified. cg@1036: ! cg@1036: cg@2262: doAddColumn:descr cg@2262: "adds a new column after the selected column or at the left (if nothing is selected)" cg@2262: ca@2557: columns add:descr afterIndex:(self singleSelectedColumnIndex min:columns size). cg@2262: self setDefaultValuesInNewColumn:descr. cg@2262: self seqList add:(descr label) afterIndex:self singleSelectedColumnIndex. cg@2262: self enablingCommitButtonsHolder value ifFalse:[ cg@2262: self selectedColumnModel value:self singleSelectedColumnIndex + 1 cg@2262: ]. cg@2262: self cancel. cg@2262: self updateColumnView. cg@2262: self setModified. cg@2262: ! cg@2262: ca@818: doBrowseRowClass tz@419: "browse class of columns spec" tz@419: tz@419: |cls| tz@419: ca@983: (cls := self resolveRowClass) notNil cg@2401: ifTrue: [Smalltalk browseInClass:cls] cg@842: ifFalse:[self information:'No class defined !!'] cg@842: cg@842: "Modified: / 20.5.1998 / 03:48:04 / cg" tz@419: ! tz@419: tz@825: doCopy cg@2262: "copy selected columns to the clipboard" cg@2262: cg@2262: |cols| cg@2262: cg@2262: cols := self selectedColumns. cg@2262: cols notEmptyOrNil ifTrue:[ cg@2262: self clipboard:(cols deepCopy) tz@419: ] tz@419: ! tz@419: tz@419: doCreateColumn tz@419: "create a new column after selected column or at left (nothing selected)" tz@419: cg@2262: |label list dscs descr| cg@2262: cg@2262: "/ list := self seqList. cg@2262: "/ label := 'Column ', (list size + 1) printString. cg@2262: "/ columns add:(dscs := DataSetColumnSpec label:label selector:nil) afterIndex:selectedColumnIndex. cg@2262: "/ self setDefaultValuesInNewColumn:dscs. cg@2262: "/ self seqList add:label afterIndex:selectedColumnIndex. cg@2262: "/ self enablingCommitButtonsHolder value ifFalse:[ cg@2262: "/ self selectedColumnModel value:selectedColumnIndex + 1 cg@2262: "/ ]. cg@2262: "/ self cancel. cg@2262: "/ self updateColumnView. cg@2262: "/ self setModified. cg@2262: "/ cg@2262: cg@2262: label := 'Column ', (self seqList size + 1) printString. cg@2262: descr := DataSetColumnSpec label:label selector:nil. cg@2262: self doAddColumn:descr cg@2262: ! cg@2262: cg@2262: doCreateNonSelectableColumn cg@2262: "create a new column after selected column or at left (nothing selected)" cg@2262: cg@2262: |label list dscs descr| cg@2262: cg@2262: "/ list := self seqList. cg@2262: "/ label := 'Column ', (list size + 1) printString. cg@2262: "/ columns add:(dscs := DataSetColumnSpec label:label selector:nil) afterIndex:selectedColumnIndex. cg@2262: "/ self setDefaultValuesInNewColumn:dscs. cg@2262: "/ self seqList add:label afterIndex:selectedColumnIndex. cg@2262: "/ self enablingCommitButtonsHolder value ifFalse:[ cg@2262: "/ self selectedColumnModel value:selectedColumnIndex + 1 cg@2262: "/ ]. cg@2262: "/ self cancel. cg@2262: "/ self updateColumnView. cg@2262: "/ self setModified. cg@2262: "/ cg@2262: cg@2262: label := 'Column ', (self seqList size + 1) printString. cg@2262: descr := DataSetColumnSpec label:label selector:nil. cg@2262: descr canSelect:false. cg@2262: self doAddColumn:descr tz@419: ! tz@419: tz@825: doCut tz@419: "remove selected column and put it to the clipboard" tz@419: cg@1036: self cutOrDelete:true tz@419: ! tz@419: ca@818: doDefineRowClass tz@419: "launch a dialog to define class and superclass" tz@419: cg@1382: |aspects cls oldClass oldSuper val classNameChannel superclassNameChannel| tz@419: tz@419: aspects := IdentityDictionary new. ca@818: oldClass := rowClass. ca@818: oldSuper := rowSuperClass. tz@419: tz@419: [true] tz@419: whileTrue: tz@419: [ cg@1382: rowClass notNil ifTrue:[ cg@1382: (cls := self resolveRowClass) notNil ifTrue:[ ca@818: rowSuperClass := cls superclass name asString tz@419: ]. cg@1382: val := rowClass cg@1382: ] ifFalse:[ cg@1382: val := 'DSVRow' tz@419: ]. cg@1382: aspects at:#classNameChannel put:(classNameChannel := ValueHolder with:val). tz@419: ca@818: rowSuperClass notNil cg@1382: ifTrue: [val := rowSuperClass] cg@1382: ifFalse:[val := 'Object']. cg@1382: aspects at:#superclassNameChannel put:(superclassNameChannel := ValueHolder with:val). tz@419: tz@419: (self openDialogInterface:#defineClassNameSpec withBindings:aspects) tz@419: ifFalse: tz@419: [ ca@818: rowClass := oldClass. ca@818: rowSuperClass := oldSuper. tz@419: ^self tz@419: ]. cg@1382: rowClass := (classNameChannel value) withoutSeparators. cg@1382: rowSuperClass := (superclassNameChannel value) withoutSeparators. tz@419: ca@818: rowClass size == 0 tz@419: ifTrue: tz@419: [ ca@818: rowClass := nil. tz@419: self information:'no valid className' tz@419: ] tz@419: ifFalse: tz@419: [ ca@983: cls := self resolveRowClass. tz@419: tz@419: cls notNil ifTrue:[cls := cls superclass name asString]. tz@419: ca@818: rowSuperClass size == 0 tz@419: ifTrue: tz@419: [ tz@419: cls notNil ifTrue:[ ca@818: rowSuperClass := cls tz@419: ] ifFalse:[ ca@818: rowSuperClass := 'Object' tz@419: ]. tz@419: self information: 'set superclassName' tz@419: ] tz@419: ifFalse: tz@419: [ tz@825: (cls isNil or:[rowSuperClass = cls]) ifTrue:[^self]. ca@818: self information:('A global named ' , rowClass , ' exists,\' , ca@818: 'but is not a subclass of ' , rowSuperClass, '.\\' , tz@419: 'Check and try again if that is not what you want.') withCRs. tz@419: ca@818: rowSuperClass := cls tz@419: ] tz@419: ] tz@419: ] cg@846: cg@846: "Modified: / 21.5.1998 / 03:08:42 / cg" tz@419: ! tz@419: tz@825: doDelete tz@825: "remove selected column and put it to the clipboard" tz@825: cg@1036: self cutOrDelete:false cg@1036: tz@825: ! tz@825: tz@419: doGenerateCode tz@419: "generate code for column values" tz@419: tz@419: |cls superclass| tz@419: ca@818: rowClass isNil ifTrue:[^self information:'No class defined!!']. ca@983: cls := self resolveRowClass. tz@419: tz@419: cls isNil tz@419: ifTrue: tz@419: [ ca@818: superclass := Smalltalk resolveName:rowSuperClass inClass:self class. tz@419: tz@419: superclass isNil ifTrue:[^self information:'No superclass defined!!']. ca@818: (self confirm:'create ' , rowClass , ' ?') ifFalse:[^self]. ca@818: cls := superclass subclass:rowClass asSymbol tz@419: instanceVariableNames:'' tz@419: classVariableNames:'' tz@419: poolDictionaries:'' tz@419: category:'Applications'. tz@419: ]. tz@419: tz@419: self generateChoicesIn:cls. tz@419: self generateMenuIn:cls. tz@419: self generatePrintSelectorIn:cls. tz@419: self generateReadSelectorIn:cls. tz@419: self generateBackgroundSelectorIn:cls. tz@419: self generateForegroundSelectorIn:cls. tz@419: self generateSelectSelectorIn:cls. tz@419: self generateWriteSelectorIn:cls. tz@419: self generateDoubleClickSelectorIn:cls. ca@983: self generateRowSeparatorSelectorIn:cls. cg@1009: self generateShowComboFieldSelectorIn:cls. cg@1009: tz@419: ! tz@419: tz@419: doMoveColumn:upOrDown tz@419: "move selected column up or down" tz@419: ca@2558: |idx list label col size tabIndex| tz@419: cg@2262: (idx := self singleSelectedColumnIndex) == 0 ifTrue:[^self]. tz@419: list := self seqList. tz@419: size := list size. tz@419: ca@2558: size > 1 ifFalse:[ ^ self ]. ca@2558: tz@419: selectedColumnIndex := 0. ca@2558: tabIndex := self tabModel value. ca@2558: tz@419: label := list at:idx. tz@419: col := columns at:idx. tz@419: list removeIndex:idx. tz@419: columns removeIndex:idx. tz@419: cg@2262: upOrDown == #up ifTrue:[ tz@419: idx == 1 ifTrue:[idx := size] tz@419: ifFalse:[idx := idx - 1] cg@2262: ] ifFalse:[ tz@419: idx == size ifTrue:[idx := 1] tz@419: ifFalse:[idx := idx + 1] tz@419: ]. tz@419: columns add:col beforeIndex:idx. ca@2558: list add:label beforeIndex:idx. ca@2558: tz@419: self selectedColumnModel value:idx. tz@419: self updateColumnView. ca@2558: self tabModel value:tabIndex. ca@2558: cg@1974: self setModified. tz@419: ! tz@419: cg@2262: doMoveDown cg@2262: self doMoveColumn:#down cg@2262: ! cg@2262: cg@2262: doMoveUp cg@2262: self doMoveColumn:#up cg@2262: ! cg@2262: tz@825: doPaste tz@419: "paste clipboard copy column after selected column or at left (nothing selected)" tz@419: cg@2262: |cols idx newSel| cg@2262: cg@2262: self askForItemModification ifFalse: [^ self]. cg@2262: cg@2262: cols := self class clipboard. cg@2262: cols isEmptyOrNil ifTrue:[^ self]. cg@2262: cg@2262: idx := (self selectedColumnIndices) isEmpty cg@2262: ifTrue:[ columns size ] cg@2262: ifFalse:[ self selectedColumnIndices max ]. cg@2262: cg@2262: newSel := OrderedCollection new. cg@2262: cols do:[:col | cg@2262: | lbl| cg@2262: cg@2262: lbl := self labelFromColumn:col. cg@2262: cg@2262: columns add:(col deepCopy) afterIndex:idx. cg@2262: self seqList add:lbl afterIndex:idx. cg@2262: idx := idx + 1. cg@2262: newSel add:idx. cg@2262: ]. tz@419: cg@1990: self enablingCommitButtonsHolder value ifFalse:[ cg@2262: self selectedColumnModel value:newSel "/idx ca@818: ]. tz@419: self updateColumnView. tz@556: self updateInputFields. cg@1974: self setModified. ca@818: ! ca@818: ca@818: doPickColumns ca@818: ca@818: |view cls| ca@818: ca@818: view := Screen current viewFromUser. ca@818: cls := view class. ca@818: ca@818: (cls == DSVColumnView or:[cls == DataSetView or:[cls == DSVLabelView]]) ifTrue:[ ca@818: self columns:(view columnView columnDescriptors) ca@818: ] ca@818: ! ca@818: ca@818: doSave cg@1144: |cls dst spc category mthd excla code resourceType| ca@818: cg@2549: editingSpecOnly == true ifTrue:[ cg@2549: acceptedColumns := columns. cg@2549: hasSaved := true. cg@2549: self clearModified. cg@2549: ^ self. cg@2549: ]. cg@2549: ca@818: (columns size ~~ 0 and:[super doSave]) ifFalse:[ ca@818: ^ nil ca@818: ]. ca@983: ca@818: cls := self resolveName:specClass. ca@818: dst := columns collect:[:aCol| aCol literalArrayEncoding ]. ca@818: spc := WriteStream on:String new. cg@1105: spc nextPutAll:' ^'. ca@818: UISpecification prettyPrintSpecArray:dst asArray on:spc indent:4. ca@818: spc := spc contents. ca@818: ca@818: "/ if that method already exists, do not overwrite the category ca@818: ca@818: resourceType := self class resourceType. ca@818: category := resourceType, ' specs'. ca@818: ca@818: (mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[ ca@818: category := mthd category. ca@818: ]. ca@818: ca@818: excla := Character excla asString. ca@818: ca@818: code := excla ca@818: , (cls name , ' class methodsFor:' , category storeString) ca@818: , excla , '\\' ca@818: ca@818: , specSelector , '\' ca@818: , (self class codeGenerationComment replChar:$!! withString:'!!!!') ca@818: , '\\ "\' ca@818: , (' DataSetBuilder new openOnClass:' , cls name , ' andSelector:#' , specSelector , '\') ca@818: , ' "\'. ca@818: ca@818: code := code ca@818: , '\' ca@818: , ' \\' ca@818: , spc ca@818: , '\' ca@818: , (excla , ' ' , excla) ca@818: , '\\'. ca@818: ca@818: code := code withCRs. ca@818: (ReadStream on:code) fileIn. ca@818: ca@818: "/ self isStandAlone ifTrue: [self helpTool installHelpSpecsOnClass:self specClass]. ca@818: ca@818: self updateHistory. ca@818: self updateInfoLabel. ca@818: ca@818: hasSaved := true. cg@1974: self clearModified. ca@1619: ! ca@1619: ca@1619: openDocumentation ca@1619: self openHTMLDocument:'tools/uipainter/DataSetBuilder.html'. tz@419: ! ! tz@419: cg@1004: !DataSetBuilder::Row methodsFor:'accessing'! cg@1004: cg@1004: choices cg@1004: ^ #( 'foo' 'bar' 'baz' ) cg@1004: cg@1004: cg@1004: ! ! cg@1004: cg@1004: !DataSetBuilder::Row methodsFor:'message handling'! cg@1004: cg@1004: doesNotUnderstand:aMessage cg@1004: "does not understand message; delegate to column view cg@1004: " cg@1004: ^ nil cg@1004: cg@1004: ! ! cg@1004: ca@332: !DataSetBuilder class methodsFor:'documentation'! ca@332: ca@332: version ca@332: ^ '$Header$' ca@332: ! !