# HG changeset patch # User Claus Gittinger # Date 1236017868 -3600 # Node ID 5b9b2f78c24d7d27066d100e3cd073b454ec7da1 # Parent 675a80b62692b3e54f9508aed5f1427eacf4ca26 sort stuff (UBS) diff -r 675a80b62692 -r 5b9b2f78c24d DataSetBuilder.st --- a/DataSetBuilder.st Mon Feb 16 14:20:53 2009 +0100 +++ b/DataSetBuilder.st Mon Mar 02 19:17:48 2009 +0100 @@ -87,6 +87,7 @@ translatedChoices editorType formatString + formatSelector labelIsImage labelButtonType translateLabel @@ -129,6 +130,7 @@ columnAlignment minValue maxValue + isSortable ) "Modified: / 26-03-2007 / 14:05:10 / cg" @@ -208,6 +210,12 @@ #basicsFont 'Sets the font of the labeled text.' +#isSortable +'Adds indicator to allow user to sort rows based on this column.' + +#sortSelector +'Sent to the row to extract the column-value used for sorting' + #basicsJustification 'Aligns the label to the left, right, or center in the cell.' @@ -266,7 +274,7 @@ 'Specify class/selector and install the column description' #formatFormatSelector -'Selector sent to the row to get the Format string.' +'Selector sent to the row to get the format string.' #formatInputType 'A type converter symbol used by the input field.' @@ -275,7 +283,7 @@ 'Maximum size of the string which can be typed in. 0 or nil means unlimited.' #formatTextFormat -'Format string specifying the output format of the cell text. (for example: %5.4f gives 0.0000).' +'Format string specifying the output format of the cell text. (printf-format - for example: %5.4f gives 0.0000).' #frameColumnWidth 'Width (fixed or relative) of a column (optional).' @@ -437,268 +445,282 @@ label: 'DataSet Basic' name: 'DataSet Basic' min: (Point 10 10) - bounds: (Rectangle 0 0 389 418) + bounds: (Rectangle 0 0 389 473) ) component: (SpecCollection collection: ( - (FramedBoxSpec - label: 'Header:' - name: 'framedBox1' - layout: (LayoutFrame 0 0.0 3 0 0 1.0 180 0) - labelPosition: topLeft - translateLabel: true + (VerticalPanelViewSpec + name: 'VerticalPanel1' + layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) + horizontalLayout: fit + verticalLayout: top + horizontalSpace: 3 + verticalSpace: 3 component: (SpecCollection collection: ( - (LabelSpec - label: 'ID:' - name: 'idLabel' - layout: (AlignmentOrigin 94 0 14 0 1 0.5) - translateLabel: true - resizeForLabel: true - ) - (InputFieldSpec - name: 'idField' - layout: (LayoutFrame 97 0 0 0 2 1.0 22 0) - activeHelpKey: basicsLabelId - tabable: true - model: id - group: inputGroup - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Label:' - name: 'label1' - layout: (AlignmentOrigin 94 0 39 0 1 0.5) - translateLabel: true - resizeForLabel: true - ) - (InputFieldSpec - name: 'labelField' - layout: (LayoutFrame 97 0 28 0 2 1.0 50 0) - activeHelpKey: basicsLabel - tabable: true - model: label - group: inputGroup - type: smalltalkObject - immediateAccept: false - acceptOnLeave: false - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Font:' - name: 'LabelFont' - layout: (AlignmentOrigin 94 0 68 0 1 0.5) + (FramedBoxSpec + label: 'Header:' + name: 'headerFrame' + labelPosition: topLeft translateLabel: true - resizeForLabel: true - adjust: left - ) - (FontMenuSpec - name: 'fontMenu' - layout: (LayoutFrame 97 0 56 0 0 1.0 78 0) - activeHelpKey: labelFont - model: style - allowSymbolicFonts: true - ) - (LabelSpec - label: 'Type:' - name: 'Type' - layout: (AlignmentOrigin 52 0 105 0 1 0.5) - translateLabel: true - resizeForLabel: true - adjust: right - ) - (ComboListSpec - name: 'labelButtonType' - layout: (LayoutFrame 57 0 96 0 182 0 116 0) - tabable: true - model: labelButtonType - comboList: - (Array - None Button - Group + component: + (SpecCollection + collection: ( + (LabelSpec + label: 'ID:' + name: 'idLabel' + layout: (AlignmentOrigin 94 0 14 0 1 0.5) + translateLabel: true + resizeForLabel: true + ) + (InputFieldSpec + name: 'idField' + layout: (LayoutFrame 97 0 0 0 2 1.0 22 0) + activeHelpKey: basicsLabelId + tabable: true + model: id + group: inputGroup + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Label:' + name: 'label1' + layout: (AlignmentOrigin 94 0 39 0 1 0.5) + translateLabel: true + resizeForLabel: true + ) + (InputFieldSpec + name: 'labelField' + layout: (LayoutFrame 97 0 28 0 2 1.0 50 0) + activeHelpKey: basicsLabel + tabable: true + model: label + group: inputGroup + type: smalltalkObject + immediateAccept: false + acceptOnLeave: false + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Font:' + name: 'LabelFont' + layout: (AlignmentOrigin 94 0 68 0 1 0.5) + translateLabel: true + resizeForLabel: true + adjust: left + ) + (FontMenuSpec + name: 'fontMenu' + layout: (LayoutFrame 97 0 56 0 0 1.0 78 0) + activeHelpKey: labelFont + model: style + allowSymbolicFonts: true + ) + (LabelSpec + label: 'Type:' + name: 'Type' + layout: (AlignmentOrigin 52 0 100 0 1 0.5) + translateLabel: true + resizeForLabel: true + adjust: right + ) + (ComboListSpec + name: 'labelButtonType' + layout: (LayoutFrame 57 0 91 0 158 0 111 0) + tabable: true + model: labelButtonType + comboList: + (Array + None Button + Group + ) + useIndex: false + hidePullDownMenuButton: false + ) + (LabelSpec + label: 'Align:' + name: 'JustificationLabel' + layout: (AlignmentOrigin 243 0 100 0 1 0.5) + translateLabel: true + resizeForLabel: true + adjust: right + ) + (PopUpListSpec + label: 'Alignment' + name: 'Alignment' + layout: (LayoutFrame 248 0 91 0 2 1.0 113 0) + activeHelpKey: basicsJustification + tabable: true + model: labelAlignment + menu: + (Array + left right + center + ) + ) + (CheckBoxSpec + label: 'Label Is Image' + name: 'labelIsImage' + layout: (LayoutOrigin -3 0 120 0) + activeHelpKey: basicsLabelIsImage + tabable: true + model: labelIsImage + translateLabel: true + ) + (CheckBoxSpec + label: 'Translate Label' + name: 'CheckBox2' + layout: (LayoutOrigin 200 0 120 0) + activeHelpKey: basicsLabelTranslate + tabable: true + model: translateLabel + translateLabel: true + ) + ) + ) - useIndex: false - hidePullDownMenuButton: false - ) - (LabelSpec - label: 'Align:' - name: 'JustificationLabel' - layout: (LayoutFrame 186 0 97 0 243 0 118 0) - translateLabel: true - resizeForLabel: true - adjust: right - ) - (PopUpListSpec - label: 'Alignment' - name: 'Alignment' - layout: (LayoutFrame 248 0 97 0 2 1.0 119 0) - activeHelpKey: basicsJustification - tabable: true - model: labelAlignment - menu: - (Array - left right - center - ) - ) - (CheckBoxSpec - label: 'Label Is Image' - name: 'labelIsImage' - layout: (LayoutOrigin -3 0 126 0) - activeHelpKey: basicsLabelIsImage - tabable: true - model: labelIsImage - translateLabel: true - ) - (CheckBoxSpec - label: 'Translate Label' - name: 'CheckBox2' - layout: (LayoutOrigin 200 0 126 0) - activeHelpKey: basicsLabelTranslate - tabable: true - model: translateLabel - translateLabel: true + extent: (Point 389 176) ) - ) - - ) - ) - (FramedBoxSpec - label: 'Cell Type:' - name: 'typesFrame' - layout: (LayoutFrame 0 0.0 188 0 0 1.0 302 0) - labelPosition: topLeft - translateLabel: true - component: - (SpecCollection - collection: ( - (LabelSpec - label: 'Renderer:' - name: 'rendererLabel' - layout: (AlignmentOrigin 94 0 16 0 1 0.5) + (FramedBoxSpec + label: 'Cell Type:' + name: 'typesFrame' + labelPosition: topLeft translateLabel: true - resizeForLabel: true - ) - (ComboListSpec - name: 'rendererField' - layout: (LayoutFrame 97 0 5 0 2 1.0 27 0) - activeHelpKey: basicsRenderer - tabable: true - model: rendererType - comboList: rendererTypeList - useIndex: false - hidePullDownMenuButton: false - ) - (LabelSpec - label: 'Editor:' - name: 'editorLabel' - layout: (AlignmentOrigin 94 0 42 0 1 0.5) - translateLabel: true - resizeForLabel: true - ) - (ComboBoxSpec - name: 'editorField' - layout: (LayoutFrame 97 0 31 0 2 1.0 53 0) - activeHelpKey: basicsEditor - tabable: true - model: editorType - type: symbolOrNil - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - comboList: editorTypeList - useIndex: false - isFilenameBox: false - ) - (LabelSpec - label: 'Align:' - name: 'JustificationC' - layout: (LayoutFrame -194 1 58 0 -114 1 79 0) - translateLabel: true - resizeForLabel: true - adjust: right + component: + (SpecCollection + collection: ( + (LabelSpec + label: 'Renderer:' + name: 'rendererLabel' + layout: (AlignmentOrigin 94 0 16 0 1 0.5) + translateLabel: true + resizeForLabel: true + ) + (ComboListSpec + name: 'rendererField' + layout: (LayoutFrame 97 0 5 0 2 1.0 27 0) + activeHelpKey: basicsRenderer + tabable: true + model: rendererType + comboList: rendererTypeList + useIndex: false + hidePullDownMenuButton: false + ) + (LabelSpec + label: 'Editor:' + name: 'editorLabel' + layout: (AlignmentOrigin 94 0 42 0 1 0.5) + translateLabel: true + resizeForLabel: true + ) + (ComboBoxSpec + name: 'editorField' + layout: (LayoutFrame 97 0 31 0 2 1.0 53 0) + activeHelpKey: basicsEditor + tabable: true + model: editorType + type: symbolOrNil + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + comboList: editorTypeList + useIndex: false + isFilenameBox: false + ) + (LabelSpec + label: 'Align:' + name: 'JustificationC' + layout: (LayoutFrame -194 1 58 0 -114 1 79 0) + translateLabel: true + resizeForLabel: true + adjust: right + ) + (PopUpListSpec + label: 'Alignment' + name: 'AlignmentC' + layout: (LayoutFrame -115 1 58 0 2 1.0 80 0) + activeHelpKey: basicsJustificationEditor + tabable: true + model: columnAlignment + menu: + (Array + left right + center decimal + ) + ) + (CheckBoxSpec + label: 'Compress Long Strings' + name: 'LongStringCompressionCheckBox' + layout: (LayoutFrame -3 0 58 0 188 0 79 0) + activeHelpKey: basicsLabelTranslate + tabable: true + model: longStringCompression + translateLabel: true + ) + ) + + ) + extent: (Point 389 114) ) - (PopUpListSpec - label: 'Alignment' - name: 'AlignmentC' - layout: (LayoutFrame -115 1 58 0 2 1.0 80 0) - activeHelpKey: basicsJustificationEditor - tabable: true - model: columnAlignment - menu: - (Array - left right - center decimal - ) - ) - (CheckBoxSpec - label: 'Compress Long Strings' - name: 'LongStringCompressionCheckBox' - layout: (LayoutFrame -3 0 58 0 188 0 79 0) - activeHelpKey: basicsLabelTranslate - tabable: true - model: longStringCompression + (FramedBoxSpec + label: 'Active Help:' + name: 'activeHelpFrame' + labelPosition: topLeft translateLabel: true - ) - ) - - ) - ) - (FramedBoxSpec - label: 'Active Help:' - name: 'FramedBox1' - layout: (LayoutFrame 0 0.0 303 0 0 1.0 383 0) - labelPosition: topLeft - translateLabel: true - component: - (SpecCollection - collection: ( - (LabelSpec - label: 'Key:' - name: 'Label1' - layout: (AlignmentOrigin 94 0 14 0 1 0.5) - translateLabel: true - resizeForLabel: true - ) - (InputFieldSpec - name: 'EntryField1' - layout: (LayoutFrame 97 0 0 0 2 1.0 22 0) - activeHelpKey: basicsLabelId - tabable: true - model: activeHelpKey - group: inputGroup - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Key for Label:' - name: 'Label2' - layout: (AlignmentOrigin 94 0 42 0 1 0.5) - translateLabel: true - resizeForLabel: true - ) - (InputFieldSpec - name: 'EntryField2' - layout: (LayoutFrame 97 0 28 0 2 1.0 50 0) - activeHelpKey: basicsLabelId - tabable: true - model: activeHelpKeyForLabel - group: inputGroup - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false + component: + (SpecCollection + collection: ( + (LabelSpec + label: 'Key:' + name: 'Label1' + layout: (AlignmentOrigin 94 0 14 0 1 0.5) + translateLabel: true + resizeForLabel: true + ) + (InputFieldSpec + name: 'EntryField1' + layout: (LayoutFrame 97 0 0 0 2 1.0 22 0) + activeHelpKey: basicsLabelId + tabable: true + model: activeHelpKey + group: inputGroup + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Key for Label:' + name: 'Label2' + layout: (AlignmentOrigin 94 0 42 0 1 0.5) + translateLabel: true + resizeForLabel: true + ) + (InputFieldSpec + name: 'EntryField2' + layout: (LayoutFrame 97 0 28 0 2 1.0 50 0) + activeHelpKey: basicsLabelId + tabable: true + model: activeHelpKeyForLabel + group: inputGroup + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + ) + + ) + extent: (Point 389 81) ) ) @@ -1074,6 +1096,7 @@ layout: (AlignmentOrigin 115 0 26 0 1 0.5) translateLabel: true resizeForLabel: true + activeHelpKey: formatInputType ) (ComboListSpec name: 'typeCombo' @@ -1091,6 +1114,7 @@ layout: (AlignmentOrigin 115 0 52 0 1 0.5) translateLabel: true resizeForLabel: true + activeHelpKey: formatMaxSize ) (InputFieldSpec name: 'sizeField' @@ -1111,6 +1135,7 @@ layout: (AlignmentOrigin 115 0 77 0 1 0.5) translateLabel: true resizeForLabel: true + activeHelpKey: formatTextFormat ) (InputFieldSpec name: 'formatField' @@ -1130,11 +1155,12 @@ layout: (AlignmentOrigin 115 0 103 0 1 0.5) translateLabel: true resizeForLabel: true + activeHelpKey: formatFormatSelector ) (InputFieldSpec name: 'formatSelector' layout: (LayoutFrame 118 0 92 0 3 1.0 114 0) - activeHelpKey: formatTextFormat + activeHelpKey: formatFormatSelector tabable: true model: formatSelector group: inputGroup @@ -1511,12 +1537,107 @@ (Basics basicsEditSpec) (Values valuesEditSpec) (Format formatEditSpec) + (Sort sortEditSpec) (Selection selectionEditSpec) (Frame frameEditSpec) (Colors colorsEditSpec) ) ! +sortEditSpec + "This resource specification was automatically generated + by the UIPainter of ST/X." + + "Do not manually edit this!! If it is corrupted, + the UIPainter may not be able to read the specification." + + " + UIPainter new openOnClass:DataSetBuilder andSelector:#sortEditSpec + DataSetBuilder new openInterface:#sortEditSpec + " + + + + ^ + #(FullSpec + name: sortEditSpec + window: + (WindowSpec + label: 'DataSet Basic' + name: 'DataSet Basic' + min: (Point 10 10) + bounds: (Rectangle 0 0 389 473) + ) + component: + (SpecCollection + collection: ( + (VerticalPanelViewSpec + name: 'VerticalPanel1' + layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) + horizontalLayout: fit + verticalLayout: top + horizontalSpace: 3 + verticalSpace: 3 + component: + (SpecCollection + collection: ( + (FramedBoxSpec + label: 'Sorting:' + name: 'sortFrame' + labelPosition: topLeft + translateLabel: true + component: + (SpecCollection + collection: ( + (CheckBoxSpec + label: 'Sortable' + name: 'isSortable' + layout: (LayoutOrigin -3 0 0 0) + activeHelpKey: isSortable + tabable: true + model: isSortable + translateLabel: true + ) + (LabelSpec + label: 'Sort Selector:' + name: 'sortSelector' + layout: (AlignmentOrigin 90 0 42 0 1 0.5) + activeHelpKey: sortSelector + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'EntryField3' + layout: (LayoutFrame 93 0 30 0 2 1 56 0) + activeHelpKey: sortSelector + enableChannel: isSortable + tabable: true + model: sortSelector + group: inputGroup + type: symbolOrNil + immediateAccept: false + acceptOnLeave: false + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + ) + + ) + extent: (Point 389 94) + ) + ) + + ) + ) + ) + + ) + ) +! + valuesEditSpec "This resource specification was automatically generated by the UIPainter of ST/X." @@ -3695,7 +3816,7 @@ #(label width minWidth usePreferredWidth editorType choices translatedChoices readSelector writeSelector printSelector visibilitySelector - formatString type converterSelector size height canSelect selectSelector showComboFieldSelector + formatString formatSelector type converterSelector size height canSelect selectSelector showComboFieldSelector minValue maxValue ) do:[:aKey| (aspects at:aKey) value:nil