205 'Turns on/off displaying column separators.' |
207 'Turns on/off displaying column separators.' |
206 |
208 |
207 #frameShowRowSeparator |
209 #frameShowRowSeparator |
208 'Turns on/off displaying row separators.' |
210 'Turns on/off displaying row separators.' |
209 |
211 |
|
212 #frameShowRowSeparatorSelector |
|
213 'An optional selector, which is used to test whether the row separator at the bottom is shown.' |
|
214 |
210 #generate |
215 #generate |
211 'Code generation.' |
216 'Code generation.' |
212 |
217 |
213 #generateCode |
218 #generateCode |
214 'Generate code and install in the selected class/selector.' |
219 'Generate code and install in the selected class/selector.' |
231 #selectionLabelClickSelector |
236 #selectionLabelClickSelector |
232 'A selector called if label cell was clicked.' |
237 'A selector called if label cell was clicked.' |
233 |
238 |
234 #selectionLabelSelectorArgument |
239 #selectionLabelSelectorArgument |
235 'An argument passed to label selection selector.' |
240 'An argument passed to label selection selector.' |
|
241 |
|
242 #showSelectionHighLighted |
|
243 'Show selected cell highligthened (change fg/bg color).' |
236 |
244 |
237 #valuesChoiceSelector |
245 #valuesChoiceSelector |
238 'A selector returning a collection of choices for a cell having a ComboBox or a ComboList widget.' |
246 'A selector returning a collection of choices for a cell having a ComboBox or a ComboList widget.' |
239 |
247 |
240 #valuesMenuSelector |
248 #valuesMenuSelector |
803 |
811 |
804 #(#FullSpec |
812 #(#FullSpec |
805 #window: |
813 #window: |
806 #(#WindowSpec |
814 #(#WindowSpec |
807 #name: 'DataSet Dimension' |
815 #name: 'DataSet Dimension' |
808 #layout: #(#LayoutFrame 216 0 173 0 506 0 416 0) |
816 #layout: #(#LayoutFrame 44 0 255 0 368 0 602 0) |
809 #label: 'DataSet Dimension' |
817 #label: 'DataSet Dimension' |
810 #min: #(#Point 10 10) |
818 #min: #(#Point 10 10) |
811 #max: #(#Point 1280 1024) |
819 #max: #(#Point 1280 1024) |
812 #bounds: #(#Rectangle 216 173 507 417) |
820 #bounds: #(#Rectangle 44 255 369 603) |
813 #usePreferredExtent: false |
821 #usePreferredExtent: false |
814 ) |
822 ) |
815 #component: |
823 #component: |
816 #(#SpecCollection |
824 #(#SpecCollection |
817 #collection: |
825 #collection: |
818 #( |
826 #( |
819 #(#FramedBoxSpec |
827 #(#FramedBoxSpec |
820 #name: 'separatorBox' |
828 #name: 'separatorBox' |
821 #layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 95 0) |
829 #layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 132 0) |
822 #component: |
830 #component: |
823 #(#SpecCollection |
831 #(#SpecCollection |
824 #collection: |
832 #collection: |
825 #( |
833 #( |
826 #(#CheckBoxSpec |
834 #(#CheckBoxSpec |
829 #activeHelpKey: #frameShowRowSeparator |
837 #activeHelpKey: #frameShowRowSeparator |
830 #tabable: true |
838 #tabable: true |
831 #model: #showRowSeparator |
839 #model: #showRowSeparator |
832 #label: 'Show Row-Separator' |
840 #label: 'Show Row-Separator' |
833 ) |
841 ) |
|
842 #(#InputFieldSpec |
|
843 #name: 'rowSeparatorSelector' |
|
844 #layout: #(#LayoutFrame 29 0 41 0 2 1.0 63 0) |
|
845 #activeHelpKey: #frameShowRowSeparatorSelector |
|
846 #tabable: true |
|
847 #model: #rowSeparatorSelector |
|
848 #type: #symbolOrNil |
|
849 ) |
834 #(#CheckBoxSpec |
850 #(#CheckBoxSpec |
835 #name: 'showColSeparator' |
851 #name: 'showColSeparator' |
836 #layout: #(#LayoutFrame 5 0 41 0 181 0 64 0) |
852 #layout: #(#LayoutFrame 5 0 70 0 181 0 93 0) |
837 #activeHelpKey: #frameShowColumnSeparator |
853 #activeHelpKey: #frameShowColumnSeparator |
838 #tabable: true |
854 #tabable: true |
839 #model: #showColSeparator |
855 #model: #showColSeparator |
840 #label: 'Show Column-Separator' |
856 #label: 'Show Column-Separator' |
841 ) |
857 ) |
926 |
940 |
927 #(#FullSpec |
941 #(#FullSpec |
928 #window: |
942 #window: |
929 #(#WindowSpec |
943 #(#WindowSpec |
930 #name: 'DataSet Basic' |
944 #name: 'DataSet Basic' |
931 #layout: #(#LayoutFrame 216 0 173 0 504 0 428 0) |
945 #layout: #(#LayoutFrame 104 0 195 0 434 0 522 0) |
932 #label: 'DataSet Basic' |
946 #label: 'DataSet Basic' |
933 #min: #(#Point 10 10) |
947 #min: #(#Point 10 10) |
934 #max: #(#Point 1280 1024) |
948 #max: #(#Point 1280 1024) |
935 #bounds: #(#Rectangle 216 173 505 429) |
949 #bounds: #(#Rectangle 104 195 435 523) |
936 #usePreferredExtent: false |
950 #usePreferredExtent: false |
937 ) |
951 ) |
938 #component: |
952 #component: |
939 #(#SpecCollection |
953 #(#SpecCollection |
940 #collection: |
954 #collection: |
981 #label: 'Label Select Action:' |
995 #label: 'Label Select Action:' |
982 #labelPosition: #topLeft |
996 #labelPosition: #topLeft |
983 ) |
997 ) |
984 #(#FramedBoxSpec |
998 #(#FramedBoxSpec |
985 #name: 'framedBox2' |
999 #name: 'framedBox2' |
986 #layout: #(#LayoutFrame 0 0.0 95 0 0 1.0 178 0) |
1000 #layout: #(#LayoutFrame 0 0.0 95 0 0 1.0 205 0) |
987 #component: |
1001 #component: |
988 #(#SpecCollection |
1002 #(#SpecCollection |
989 #collection: |
1003 #collection: |
990 #( |
1004 #( |
991 #(#CheckBoxSpec |
1005 #(#CheckBoxSpec |
992 #name: 'canSelect' |
1006 #name: 'canSelect' |
993 #layout: #(#Point 95 8) |
1007 #layout: #(#Point 95 1) |
994 #activeHelpKey: #selectionIsSelectable |
1008 #activeHelpKey: #selectionIsSelectable |
995 #tabable: true |
1009 #tabable: true |
996 #model: #canSelect |
1010 #model: #canSelect |
997 #label: 'Is Selectable' |
1011 #label: 'Is Selectable' |
998 ) |
1012 ) |
999 #(#LabelSpec |
1013 #(#LabelSpec |
1000 #name: 'selectorLabel' |
1014 #name: 'selectorLabel' |
1001 #layout: #(#AlignmentOrigin 95 0 44 0 1 0.5) |
1015 #layout: #(#AlignmentOrigin 95 0 37 0 1 0.5) |
1002 #label: 'Selector:' |
1016 #label: 'Selector:' |
1003 #adjust: #right |
1017 #adjust: #right |
1004 #resizeForLabel: true |
1018 #resizeForLabel: true |
1005 ) |
1019 ) |
1006 #(#InputFieldSpec |
1020 #(#InputFieldSpec |
1007 #name: 'selectSelector' |
1021 #name: 'selectSelector' |
1008 #layout: #(#LayoutFrame 98 0 33 0 3 1.0 55 0) |
1022 #layout: #(#LayoutFrame 98 0 26 0 3 1.0 48 0) |
1009 #activeHelpKey: #selectionCellClickSelector |
1023 #activeHelpKey: #selectionCellClickSelector |
1010 #tabable: true |
1024 #tabable: true |
1011 #model: #selectSelector |
1025 #model: #selectSelector |
1012 #type: #symbolOrNil |
1026 #type: #symbolOrNil |
|
1027 ) |
|
1028 #(#CheckBoxSpec |
|
1029 #name: 'showSelectionHighLightened' |
|
1030 #layout: #(#LayoutFrame 95 0 53 0 3 1.0 77 0) |
|
1031 #activeHelpKey: #showSelectionHighLighted |
|
1032 #tabable: true |
|
1033 #model: #showSelectionHighLighted |
|
1034 #label: 'Show Selection HighLightened' |
1013 ) |
1035 ) |
1014 ) |
1036 ) |
1015 ) |
1037 ) |
1016 #label: 'Cell Selection:' |
1038 #label: 'Cell Selection:' |
1017 #labelPosition: #topLeft |
1039 #labelPosition: #topLeft |
1018 ) |
1040 ) |
1019 #(#FramedBoxSpec |
1041 #(#FramedBoxSpec |
1020 #name: 'framedBox3' |
1042 #name: 'framedBox3' |
1021 #layout: #(#LayoutFrame 0 0.0 186 0 0 1.0 243 0) |
1043 #layout: #(#LayoutFrame 0 0.0 217 0 0 1.0 274 0) |
1022 #component: |
1044 #component: |
1023 #(#SpecCollection |
1045 #(#SpecCollection |
1024 #collection: |
1046 #collection: |
1025 #( |
1047 #( |
1026 #(#LabelSpec |
1048 #(#LabelSpec |
1760 ]. |
1780 ]. |
1761 self updateColumnView. |
1781 self updateColumnView. |
1762 |
1782 |
1763 ! |
1783 ! |
1764 |
1784 |
|
1785 resolveRowClass |
|
1786 "returns the resolved row class |
|
1787 " |
|
1788 ^ Smalltalk resolveName:rowClass inClass:self class |
|
1789 ! |
|
1790 |
1765 rowClassName |
1791 rowClassName |
1766 |
1792 |
1767 ^(Smalltalk resolveName:rowClass inClass:self class) notNil ifTrue:[rowClass] ifFalse:[nil] |
1793 ^ self resolveRowClass notNil ifTrue:[rowClass] ifFalse:[nil] |
1768 ! |
1794 ! |
1769 |
1795 |
1770 rowClassName:aClassName |
1796 rowClassName:aClassName |
1771 |
1797 |
1772 |cls| |
1798 |cls| |
1773 |
1799 |
1774 rowSuperClass := nil. |
1800 rowSuperClass := nil. |
1775 |
1801 |
1776 (rowClass := aClassName) notNil ifTrue:[ |
1802 (rowClass := aClassName) notNil ifTrue:[ |
1777 (cls := self resolveClassNamed) notNil |
1803 (cls := self resolveRowClass) notNil |
1778 ifTrue: [rowSuperClass := cls superclass name asString] |
1804 ifTrue: [rowSuperClass := cls superclass name asString] |
1779 ifFalse:[rowSuperClass := 'Object'] |
1805 ifFalse:[rowSuperClass := 'Object'] |
1780 ] |
1806 ] |
1781 |
1807 |
1782 ! ! |
1808 ! ! |
2163 ] |
2189 ] |
2164 ] |
2190 ] |
2165 ] |
2191 ] |
2166 ! |
2192 ! |
2167 |
2193 |
|
2194 generateRowSeparatorSelectorIn:aClass |
|
2195 "generate code for #rowSeparatorSelector" |
|
2196 |
|
2197 |sel catg code bCode| |
|
2198 |
|
2199 catg := 'accessing look' asSymbol. |
|
2200 code := '\' |
|
2201 , ' "automatically generated by DataSetBuilder ..."\' |
|
2202 , '\' |
|
2203 , ' "specific row separator visibility for a cell"\' |
|
2204 , '\' |
|
2205 . |
|
2206 |
|
2207 columns do: |
|
2208 [:aColumn| |
|
2209 ((sel := aColumn rowSeparatorSelector) notNil and:[(aClass implements:sel) not]) |
|
2210 ifTrue: |
|
2211 [ |
|
2212 bCode := sel asString, code, ' ^true'. |
|
2213 self compile:bCode forClass:aClass inCategory:catg |
|
2214 ] |
|
2215 ] |
|
2216 |
|
2217 |
|
2218 ! |
|
2219 |
2168 generateSelectSelectorIn:aClass |
2220 generateSelectSelectorIn:aClass |
2169 "generate code for #selectSelector |
2221 "generate code for #selectSelector |
2170 " |
2222 " |
2171 |sel catg code bCode| |
2223 |sel catg code bCode| |
2172 |
2224 |
2279 [:column| |
2332 [:column| |
2280 column readSelector: #at:; |
2333 column readSelector: #at:; |
2281 writeSelector: #at:put:; |
2334 writeSelector: #at:put:; |
2282 backgroundSelector:nil; |
2335 backgroundSelector:nil; |
2283 foregroundSelector:nil; |
2336 foregroundSelector:nil; |
|
2337 rowSeparatorSelector:nil; |
2284 selectSelector: nil; |
2338 selectSelector: nil; |
2285 doubleClickedSelector: nil; |
2339 doubleClickedSelector: nil; |
2286 printSelector: nil; |
2340 printSelector: nil; |
2287 menu: nil; |
2341 menu: nil; |
2288 choices: nil |
2342 choices: nil |
2446 doBrowseRowClass |
2500 doBrowseRowClass |
2447 "browse class of columns spec" |
2501 "browse class of columns spec" |
2448 |
2502 |
2449 |cls| |
2503 |cls| |
2450 |
2504 |
2451 (cls := self resolveClassNamed) notNil |
2505 (cls := self resolveRowClass) notNil |
2452 ifTrue: [SystemBrowser openInClass:cls] |
2506 ifTrue: [SystemBrowser openInClass:cls] |
2453 ifFalse:[self information:'No class defined !!'] |
2507 ifFalse:[self information:'No class defined !!'] |
2454 |
2508 |
2455 "Modified: / 20.5.1998 / 03:48:04 / cg" |
2509 "Modified: / 20.5.1998 / 03:48:04 / cg" |
2456 ! |
2510 ! |
2631 self generateBackgroundSelectorIn:cls. |
2685 self generateBackgroundSelectorIn:cls. |
2632 self generateForegroundSelectorIn:cls. |
2686 self generateForegroundSelectorIn:cls. |
2633 self generateSelectSelectorIn:cls. |
2687 self generateSelectSelectorIn:cls. |
2634 self generateWriteSelectorIn:cls. |
2688 self generateWriteSelectorIn:cls. |
2635 self generateDoubleClickSelectorIn:cls. |
2689 self generateDoubleClickSelectorIn:cls. |
|
2690 self generateRowSeparatorSelectorIn:cls. |
2636 ! |
2691 ! |
2637 |
2692 |
2638 doMoveColumn:upOrDown |
2693 doMoveColumn:upOrDown |
2639 "move selected column up or down" |
2694 "move selected column up or down" |
2640 |
2695 |
2707 |cls dst spc idx category mthd excla code resourceType| |
2762 |cls dst spc idx category mthd excla code resourceType| |
2708 |
2763 |
2709 (columns size ~~ 0 and:[super doSave]) ifFalse:[ |
2764 (columns size ~~ 0 and:[super doSave]) ifFalse:[ |
2710 ^ nil |
2765 ^ nil |
2711 ]. |
2766 ]. |
|
2767 |
2712 cls := self resolveName:specClass. |
2768 cls := self resolveName:specClass. |
2713 dst := columns collect:[:aCol| aCol literalArrayEncoding ]. |
2769 dst := columns collect:[:aCol| aCol literalArrayEncoding ]. |
2714 spc := WriteStream on:String new. |
2770 spc := WriteStream on:String new. |
2715 UISpecification prettyPrintSpecArray:dst asArray on:spc indent:4. |
2771 UISpecification prettyPrintSpecArray:dst asArray on:spc indent:4. |
2716 spc := spc contents. |
2772 spc := spc contents. |