DataSetBuilder.st
changeset 528 4c6acd1fa911
parent 524 6ced725af608
child 545 25a3072fd268
equal deleted inserted replaced
527:6dc446339dc2 528:4c6acd1fa911
    56         Claus Atzkern
    56         Claus Atzkern
    57 "
    57 "
    58 
    58 
    59 ! !
    59 ! !
    60 
    60 
    61 !DataSetBuilder class methodsFor:'columns specs'!
    61 !DataSetBuilder class methodsFor:'help specs'!
       
    62 
       
    63 helpSpec
       
    64     "return a dictionary filled with helpKey -> helptext associations.
       
    65      These are used by the activeHelp tool."
       
    66 
       
    67     "
       
    68     UIHelpTool openOnClass:DataSetBuilder    
       
    69     "
       
    70 
       
    71   ^ super helpSpec addPairsFrom:#(
       
    72 
       
    73 #backgroundColor
       
    74 'Sets the background color of the column if the color-checkBox is turned on. Otherwise, the column uses its default background color (which is specified in the styleSheet).'
       
    75 
       
    76 #backgroundSelector
       
    77 'Selector which returns the background color for a cell (optional). If the selector is nil or returns nil, the default background color is set.'
       
    78 
       
    79 #canSelect
       
    80 'If true, each cell in the column can be selected. In case of having a menu, the menu can be opened by selecting the cell and pressing down the right or middle button of the mouse. if false, the whole line is selected. The menu opened derives from the DataSetView, which is specified in the window specification (Basics).'
       
    81 
       
    82 #choices
       
    83 'Selector to get the collection of choices for a column which is selectable and its editor is kind of a ComboBox or ComboList. If a cell in the column is selected, the visual editor is opened and in case of having choices, the choices are assigned to the widget.'
       
    84 
       
    85 #doubleClickedSelector
       
    86 'Selector evaluated without arguments on selected column.'
       
    87 
       
    88 #editorField
       
    89 'Type of visual editor (using default editors) or a selector, which will return an visual editor. If the cell is selected, a visual editor is opened in in the cell. In case of an unsupported selector (user defined editor), the row object is asked for the visual editor by performing the selector on the row. A widget instance must be returned which is opened in the cell.'
       
    90 
       
    91 #foregroundColor
       
    92 'Sets the foreground color of the column  if the color-checkBox is turned on. Otherwise, the column uses its default foreground color (which is specified in the styleSheet).'
       
    93 
       
    94 #foregroundSelector
       
    95 'Selector which returns the foreground color for a cell (optional). If the selector is nil or returns nil, the default foreground color is set.'
       
    96 
       
    97 #formatString
       
    98 'Format string, which specifies the output format of a text in a cell. At the moment  only numbers are supported  (for example: 0.0000).'
       
    99 
       
   100 #height
       
   101 'Preferred height (optional).'
       
   102 
       
   103 #label
       
   104 'The label of the column. If ''label is image'' is off, this is the label string. Otherwise, it specifies the applications selector, which returns the label - either a string or a bitmap image.'
       
   105 
       
   106 #labelIsImage
       
   107 'If ''label is image'' is off (the default), the columns label is the string as entered in the label aspect. Otherwise, its the name of the message sent to the application - this should return a string or bitmap image, which is used as logo in the column.'
       
   108 
       
   109 #menuSelector
       
   110 'A selector to access the middleButton menu or nil. If a cell is selected. The menu will be opened by selecting the cell and pressing down the right or middle button of the mouse.'
       
   111 
       
   112 #minWidth
       
   113 'Makes sense if the width is set to 0 or nil. This is the minimum size required; no computation dependent on the contents. When resizing the view the column may grow or shrink to the minimum width.'
       
   114 
       
   115 #printSelector
       
   116 'A selector with one argument, the DataSetView. Used to access a drawable display object. In case of nil, the value derived from the readSelector is shown in the unselected cell.\ \ Using bitmaps, the DataSetView offers three important methods:\ \ #registerImage:anImage key:aSymbol\ register an image with an unique symbol. This symbol can be used by the row object to access the image, using #registeredImageAt:. The image will be associated to the device.\ \ #registeredImageAt:aSymbol\ returns an image assigned to the symbol or nil. The image returned is associated to the device.\ \ #releaseAllRegisteredImages\ relaese all registered images.'
       
   117 
       
   118 #readSelector
       
   119 'A selector, which is used to get or set (if the write selector is undefined) the value of a cell. The value returned by the method can be a string object or a bitmap. The set operation only is performed if the column is selectable.'
       
   120 
       
   121 #rendererType
       
   122 'This type specifies, how the text of an unselected cell should be shown. As Text, CheckToggle, ComboBox, ComboList or as a RowSelector.'
       
   123 
       
   124 #selectSelector
       
   125 'An optional selector, which is used to test whether the cell in the column is selectable; the ''Is Selectable'' flag must be enabled.'
       
   126 
       
   127 #showColumnSeparator
       
   128 'Shows or hide the column separator (right vertical separator).'
       
   129 
       
   130 #showRowSeparator
       
   131 'Shows or hide the row separator (bottom horizontal separator).'
       
   132 
       
   133 #size
       
   134 'Max size of an InputField, ComboBox or ComboList. 0 or nil means unlimited.'
       
   135 
       
   136 #type
       
   137 'A type converter symbol used by the input field.'
       
   138 
       
   139 #width
       
   140 'The width of a fixed column; in case of nil or 0 the column width will be computed dependent on the contents.'
       
   141 
       
   142 #writeSelector
       
   143 'A selector, which is used to set the value of a cell. If the selector is not defined, the selector derives from the printSelector.'
       
   144 
       
   145 )
       
   146 ! !
       
   147 
       
   148 !DataSetBuilder class methodsFor:'interface specs'!
    62 
   149 
    63 basicsEditSpec
   150 basicsEditSpec
    64     "this window spec was automatically generated by the ST/X UIPainter"
   151     "this window spec was automatically generated by the ST/X UIPainter"
    65 
   152 
    66     "do not manually edit this - the painter/builder may not be able to
   153     "do not manually edit this - the painter/builder may not be able to
   329                           )
   416                           )
   330                         )
   417                         )
   331                     )
   418                     )
   332                     #'label:' 'Cell Colors:'
   419                     #'label:' 'Cell Colors:'
   333                     #'labelPosition:' #topLeft
   420                     #'labelPosition:' #topLeft
       
   421                 )
       
   422               )
       
   423           )
       
   424       )
       
   425 !
       
   426 
       
   427 defineClassNameSpec
       
   428     "this window spec was automatically generated by the ST/X UIPainter"
       
   429 
       
   430     "do not manually edit this - the painter/builder may not be able to
       
   431      handle the specification if its corrupted."
       
   432 
       
   433     "
       
   434      UIPainter new openOnClass:DataSetBuilder andSelector:#defineClassNameSpec
       
   435      DataSetBuilder new openInterface:#defineClassNameSpec
       
   436     "
       
   437 
       
   438     <resource: #canvas>
       
   439 
       
   440     ^
       
   441      
       
   442        #(#FullSpec
       
   443           #'window:' 
       
   444            #(#WindowSpec
       
   445               #'name:' 'Data Set Builder'
       
   446               #'layout:' #(#LayoutFrame 185 0 408 0 511 0 543 0)
       
   447               #'label:' 'Data Set Builder'
       
   448               #'min:' #(#Point 10 10)
       
   449               #'max:' #(#Point 1152 900)
       
   450               #'bounds:' #(#Rectangle 185 408 512 544)
       
   451               #'usePreferredExtent:' false
       
   452           )
       
   453           #'component:' 
       
   454            #(#SpecCollection
       
   455               #'collection:' 
       
   456                #(
       
   457                  #(#FramedBoxSpec
       
   458                     #'name:' 'framedBox1'
       
   459                     #'layout:' #(#LayoutFrame 0 0.0 3 0.0 0 1.0 -34 1.0)
       
   460                     #'label:' 'Classes for code'
       
   461                     #'labelPosition:' #topLeft
       
   462                 )
       
   463                  #(#LabelSpec
       
   464                     #'name:' 'classLabel'
       
   465                     #'layout:' #(#AlignmentOrigin 73 0.11 38 0 1 0.5)
       
   466                     #'label:' 'Class:'
       
   467                     #'adjust:' #right
       
   468                     #'resizeForLabel:' true
       
   469                 )
       
   470                  #(#InputFieldSpec
       
   471                     #'name:' 'classNameInputField'
       
   472                     #'layout:' #(#LayoutFrame 77 0.11 27 0 -16 1.0 49 0)
       
   473                     #'tabable:' true
       
   474                     #'model:' #classNameChannel
       
   475                 )
       
   476                  #(#LabelSpec
       
   477                     #'name:' 'superClassLabel'
       
   478                     #'layout:' #(#AlignmentOrigin 73 0.11 65 0 1 0.5)
       
   479                     #'label:' 'Superclass:'
       
   480                     #'adjust:' #right
       
   481                     #'resizeForLabel:' true
       
   482                 )
       
   483                  #(#InputFieldSpec
       
   484                     #'name:' 'superclassNameInputField'
       
   485                     #'layout:' #(#LayoutFrame 76 0.11 55 0 -16 1.0 77 0)
       
   486                     #'tabable:' true
       
   487                     #'model:' #superclassNameChannel
       
   488                 )
       
   489                  #(#UISubSpecification
       
   490                     #'name:' 'SubSpecification'
       
   491                     #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1.0)
       
   492                     #'majorKey:' #ToolApplicationModel
       
   493                     #'minorKey:' #windowSpecForCommitWithoutChannels
   334                 )
   494                 )
   335               )
   495               )
   336           )
   496           )
   337       )
   497       )
   338 !
   498 !
   685               )
   845               )
   686           )
   846           )
   687       )
   847       )
   688 !
   848 !
   689 
   849 
       
   850 slices
       
   851     ^#(
       
   852         (Basics         basicsEditSpec)
       
   853         (Values         valuesEditSpec)
       
   854         (Format         formatEditSpec)
       
   855         (Selection      selectionEditSpec)
       
   856         (Frame          frameEditSpec)
       
   857         (Colors         colorsEditSpec)
       
   858     )
       
   859 !
       
   860 
   690 valuesEditSpec
   861 valuesEditSpec
   691     "this window spec was automatically generated by the ST/X UIPainter"
   862     "this window spec was automatically generated by the ST/X UIPainter"
   692 
   863 
   693     "do not manually edit this - the painter/builder may not be able to
   864     "do not manually edit this - the painter/builder may not be able to
   694      handle the specification if its corrupted."
   865      handle the specification if its corrupted."
   817                     #'labelPosition:' #topLeft
   988                     #'labelPosition:' #topLeft
   818                 )
   989                 )
   819               )
   990               )
   820           )
   991           )
   821       )
   992       )
   822 ! !
       
   823 
       
   824 !DataSetBuilder class methodsFor:'help specs'!
       
   825 
       
   826 helpSpec
       
   827     "return a dictionary filled with helpKey -> helptext associations.
       
   828      These are used by the activeHelp tool."
       
   829 
       
   830     "
       
   831     UIHelpTool openOnClass:DataSetBuilder    
       
   832     "
       
   833 
       
   834   ^ super helpSpec addPairsFrom:#(
       
   835 
       
   836 #backgroundColor
       
   837 'Sets the background color of the column if the color-checkBox is turned on. Otherwise, the column uses its default background color (which is specified in the styleSheet).'
       
   838 
       
   839 #backgroundSelector
       
   840 'Selector which returns the background color for a cell (optional). If the selector is nil or returns nil, the default background color is set.'
       
   841 
       
   842 #canSelect
       
   843 'If true, each cell in the column can be selected. In case of having a menu, the menu can be opened by selecting the cell and pressing down the right or middle button of the mouse. if false, the whole line is selected. The menu opened derives from the DataSetView, which is specified in the window specification (Basics).'
       
   844 
       
   845 #choices
       
   846 'Selector to get the collection of choices for a column which is selectable and its editor is kind of a ComboBox or ComboList. If a cell in the column is selected, the visual editor is opened and in case of having choices, the choices are assigned to the widget.'
       
   847 
       
   848 #doubleClickedSelector
       
   849 'Selector evaluated without arguments on selected column.'
       
   850 
       
   851 #editorField
       
   852 'Type of visual editor (using default editors) or a selector, which will return an visual editor. If the cell is selected, a visual editor is opened in in the cell. In case of an unsupported selector (user defined editor), the row object is asked for the visual editor by performing the selector on the row. A widget instance must be returned which is opened in the cell.'
       
   853 
       
   854 #foregroundColor
       
   855 'Sets the foreground color of the column  if the color-checkBox is turned on. Otherwise, the column uses its default foreground color (which is specified in the styleSheet).'
       
   856 
       
   857 #foregroundSelector
       
   858 'Selector which returns the foreground color for a cell (optional). If the selector is nil or returns nil, the default foreground color is set.'
       
   859 
       
   860 #formatString
       
   861 'Format string, which specifies the output format of a text in a cell. At the moment  only numbers are supported  (for example: 0.0000).'
       
   862 
       
   863 #height
       
   864 'Preferred height (optional).'
       
   865 
       
   866 #label
       
   867 'The label of the column. If ''label is image'' is off, this is the label string. Otherwise, it specifies the applications selector, which returns the label - either a string or a bitmap image.'
       
   868 
       
   869 #labelIsImage
       
   870 'If ''label is image'' is off (the default), the columns label is the string as entered in the label aspect. Otherwise, its the name of the message sent to the application - this should return a string or bitmap image, which is used as logo in the column.'
       
   871 
       
   872 #menuSelector
       
   873 'A selector to access the middleButton menu or nil. If a cell is selected. The menu will be opened by selecting the cell and pressing down the right or middle button of the mouse.'
       
   874 
       
   875 #minWidth
       
   876 'Makes sense if the width is set to 0 or nil. This is the minimum size required; no computation dependent on the contents. When resizing the view the column may grow or shrink to the minimum width.'
       
   877 
       
   878 #printSelector
       
   879 'A selector with one argument, the DataSetView. Used to access a drawable display object. In case of nil, the value derived from the readSelector is shown in the unselected cell.\ \ Using bitmaps, the DataSetView offers three important methods:\ \ #registerImage:anImage key:aSymbol\ register an image with an unique symbol. This symbol can be used by the row object to access the image, using #registeredImageAt:. The image will be associated to the device.\ \ #registeredImageAt:aSymbol\ returns an image assigned to the symbol or nil. The image returned is associated to the device.\ \ #releaseAllRegisteredImages\ relaese all registered images.'
       
   880 
       
   881 #readSelector
       
   882 'A selector, which is used to get or set (if the write selector is undefined) the value of a cell. The value returned by the method can be a string object or a bitmap. The set operation only is performed if the column is selectable.'
       
   883 
       
   884 #rendererType
       
   885 'This type specifies, how the text of an unselected cell should be shown. As Text, CheckToggle, ComboBox, ComboList or as a RowSelector.'
       
   886 
       
   887 #selectSelector
       
   888 'An optional selector, which is used to test whether the cell in the column is selectable; the ''Is Selectable'' flag must be enabled.'
       
   889 
       
   890 #showColumnSeparator
       
   891 'Shows or hide the column separator (right vertical separator).'
       
   892 
       
   893 #showRowSeparator
       
   894 'Shows or hide the row separator (bottom horizontal separator).'
       
   895 
       
   896 #size
       
   897 'Max size of an InputField, ComboBox or ComboList. 0 or nil means unlimited.'
       
   898 
       
   899 #type
       
   900 'A type converter symbol used by the input field.'
       
   901 
       
   902 #width
       
   903 'The width of a fixed column; in case of nil or 0 the column width will be computed dependent on the contents.'
       
   904 
       
   905 #writeSelector
       
   906 'A selector, which is used to set the value of a cell. If the selector is not defined, the selector derives from the printSelector.'
       
   907 
       
   908 )
       
   909 ! !
       
   910 
       
   911 !DataSetBuilder class methodsFor:'interface specs'!
       
   912 
       
   913 defineClassNameSpec
       
   914     "this window spec was automatically generated by the ST/X UIPainter"
       
   915 
       
   916     "do not manually edit this - the painter/builder may not be able to
       
   917      handle the specification if its corrupted."
       
   918 
       
   919     "
       
   920      UIPainter new openOnClass:DataSetBuilder andSelector:#defineClassNameSpec
       
   921      DataSetBuilder new openInterface:#defineClassNameSpec
       
   922     "
       
   923 
       
   924     <resource: #canvas>
       
   925 
       
   926     ^
       
   927      
       
   928        #(#FullSpec
       
   929           #'window:' 
       
   930            #(#WindowSpec
       
   931               #'name:' 'Data Set Builder'
       
   932               #'layout:' #(#LayoutFrame 413 0 353 0 738 0 482 0)
       
   933               #'label:' 'Data Set Builder'
       
   934               #'min:' #(#Point 10 10)
       
   935               #'max:' #(#Point 1152 900)
       
   936               #'bounds:' #(#Rectangle 413 353 739 483)
       
   937               #'usePreferredExtent:' false
       
   938           )
       
   939           #'component:' 
       
   940            #(#SpecCollection
       
   941               #'collection:' 
       
   942                #(
       
   943                  #(#LabelSpec
       
   944                     #'name:' 'topLabel'
       
   945                     #'layout:' #(#Point 2 10)
       
   946                     #'label:' 'Classes for code:'
       
   947                     #'adjust:' #left
       
   948                     #'resizeForLabel:' true
       
   949                 )
       
   950                  #(#LabelSpec
       
   951                     #'name:' 'classLabel'
       
   952                     #'layout:' #(#AlignmentOrigin 50 0.11 50 0 1 0.5)
       
   953                     #'label:' 'Class:'
       
   954                     #'adjust:' #right
       
   955                     #'resizeForLabel:' true
       
   956                 )
       
   957                  #(#InputFieldSpec
       
   958                     #'name:' 'classNameInputField'
       
   959                     #'layout:' #(#LayoutFrame 51 0.11 39 0 -2 1.0 61 0)
       
   960                     #'tabable:' true
       
   961                     #'model:' #classNameChannel
       
   962                 )
       
   963                  #(#LabelSpec
       
   964                     #'name:' 'superClassLabel'
       
   965                     #'layout:' #(#AlignmentOrigin 50 0.11 77 0 1 0.5)
       
   966                     #'label:' 'Superclass:'
       
   967                     #'adjust:' #right
       
   968                     #'resizeForLabel:' true
       
   969                 )
       
   970                  #(#InputFieldSpec
       
   971                     #'name:' 'superclassNameInputField'
       
   972                     #'layout:' #(#LayoutFrame 51 0.11 67 0 -2 1.0 89 0)
       
   973                     #'tabable:' true
       
   974                     #'model:' #superclassNameChannel
       
   975                 )
       
   976                  #(#UISubSpecification
       
   977                     #'name:' 'SubSpecification'
       
   978                     #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1.0)
       
   979                     #'majorKey:' #ToolApplicationModel
       
   980                     #'minorKey:' #windowSpecForCommitWithoutChannels
       
   981                 )
       
   982               )
       
   983           )
       
   984       )
       
   985 !
       
   986 
       
   987 slices
       
   988     ^#(
       
   989         (Basics         basicsEditSpec)
       
   990         (Values         valuesEditSpec)
       
   991         (Format         formatEditSpec)
       
   992         (Selection      selectionEditSpec)
       
   993         (Frame          frameEditSpec)
       
   994         (Colors         colorsEditSpec)
       
   995     )
       
   996 !
   993 !
   997 
   994 
   998 windowSpec
   995 windowSpec
   999     "this window spec was automatically generated by the ST/X UIPainter"
   996     "this window spec was automatically generated by the ST/X UIPainter"
  1000 
   997