eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'DataSetColumnSpec':

Home

everywhere
www.exept.de
for:
[back]

Class: DataSetColumnSpec


Inheritance:

   Object
   |
   +--DataSetColumnSpec

Package:
stx:libui
Category:
Interface-Support-UI-Specs
Version:
rev: 1.100 date: 2010/01/25 12:14:30
user: cg
file: DataSetColumnSpec.st directory: libui
module: stx stc-classLibrary: libui
Author:
Claus Atzkern

Description:


describes one single column of a DataSetView.

[Instance variables:]

    label                   <misc>          the label of the column
    labelIsButton           <Boolean>       label looks like a button
    width                   <Integer/nil>   the width of a fixed column; in case of
                                            nil or 0 the column width will be computed
                                            dependent on the contents
    minWidth                <Integer/nil>   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 mimimum width.
    height                  <Integer/nil>   preferred height (optional)
    menu                    <Selector/nil>  selector to get the menu for the selected
                                            cell (optional).
    choices                 <Selector/nil>  selector to get the collection of choice for
                                            a #ComboBox or #ComboList (optional).
    editorType              <Symbol>        editor type; #None #InputField #CheckToggle
                                            #ComboBox #ComboList. Or if the user wants to
                                            create its own editor, a selector with no args
                                            which returns the editor.
    rendererType            <Symbol>        description type: #Text #CheckToggle #ComboBox
                                            #ComboList
    readSelector            <Selector>      selector to get the value of a cell (required).
    writeSelector           <Selector/nil>  selector to set the value of a cell
                                            (derived from readSelector).
    printSelector           <Selector/nil>  selector to get the drawable value of a cell (optional).
    isResizeable            <Boolean>       true if the column is resizeable (default is true)
    showRowSeparator        <Boolean>       show row separator (horizontal).
    showColSeparator        <Boolean>       show column separator (vertical).
    canSelect               <Boolean>       entries into row are selectable or not.
    selectSelector          <Selector/nil>  selector to test whether a cell in the column is
                                            selectable; the 'canSelect' flag must be enabled.
    size                    <Integer/nil>   max size of an InputField, ComboBox or ComboList.
                                            0 or nil means unlimited.
    type                    <Symbol>        a type converter symbol used by the input field
                                            one of ( #string #password #number #numberOrNil 
                                            #symbolOrNil ).
    formatString            <String/nil>    string describing special formatting for an input
                                            field { #InputField #ComboBox #ComboList }
                                            !! float's are supported !!
    foregroundSelector      <Selector/nil>  selector which returns the foreground color for a
                                            cell (optional). If the selector is nil or returns
                                            nil, the default foreground color is set.
    backgroundSelector      <Selector/nil>  selector which returns the background color for a
                                            cell (optional). If the selector is nil or returns
                                            nil, the default background color is set.
    doubleClickedSelector   <Selector/nil>  selector which is evaluated on double click
                                            If the selector is nil, the views double click
                                            action (if not nil) is performed.
    showSelectionHighLighted <Boolean>      true: change fg/bg color if selected 

Notice: 
    this class was implemented using protocol information
    from alpha testers, literature and by read public domain code
    - it may not be complete or compatible to
    the corresponding ST-80 class. 
    If you encounter any incompatibilities, please forward a note 
    describing the incompatibility verbal (i.e. no code) to the ST/X team.


Related information:

    DataSetColumn
    DataSetView
    DSVColumnView

Class protocol:

constants
o  defaultIcon
returns an icon used for unspecified bitmap labels

o  slices
return the slices for the attribute sections in the TableColumnEditor

instance creation
o  label: aColumnLabel editorType: anEditorType selector: aReadWriteSelectorOrCollectionOfSelectors
instance creation; set renderType dependent on the editorType

o  label: aColumnLabel selector: aReadWriteSelector
instance creation

o  new
instance creation

o  rowSelector
instance creation


Instance protocol:

accessing
o  activeHelpKey

o  activeHelpKey: aSymbol

o  activeHelpKeyForLabel

o  activeHelpKeyForLabel: aSymbol

o  backgroundColor
get the user configured backgroundColor or nil

o  backgroundColor: aColor
set the user configured backgroundColor or nil

o  choices
selector to get the collection of choices for a #ComboBox or #ComboList

o  choices: aSelector
selector to get the collection of choices for a #ComboBox or #ComboList

o  columnAlignment
return the labels alignmen, one of #left, #right, #center, #decimal or #decimalRight.
The default is #left.

o  columnAlignment: how
specify how the label is to be aligned;
Supports #left, #right, #center, #decimal and #decimalRight.
The default is #left.

o  editorType
get the editor type or selector

o  editorType: aType
set the editor type or selector

o  foregroundColor
get the user configured foregroundColor or nil

o  foregroundColor: aColor
set the user configured foregroundColor or nil

o  formatSelector
selector to ask row for a print-format of a column (i.e. dynamic formatString)

o  formatSelector: aSelectorOrNil
selector to ask row for a print-format of a column (i.e. dynamic formatString)

o  formatString
string describing special formatting for an input
field { #InputField #ComboBox #ComboList }.

o  formatString: aFormatString
string describing special formatting for an input
field { #InputField #ComboBox #ComboList }.

o  height
returns the fixed height of a cell or 0 (recompute from contents)

o  height: aHeight
set a fixed height of a cell or 0 (nil)

o  id
get the columns id

o  id: usuallyASymbol
set the columns id

o  isSortable

o  isSortable: something

o  label
get the label or selector to access a label/bitmap.
To get the label to be shown, use: #rawLabel

o  label: aLabel
set the label or selector to access the label/bitmap

o  labelAlignment
align label left, right or center; default is center

o  labelAlignment: how
align label left, right or center; default is center

o  labelBackgroundColor

o  labelBackgroundColor: aColor

o  labelFont

o  labelFont: aFont

o  labelForegroundColor

o  labelForegroundColor: aColor

o  labelIsImage
returns true if label is an image

o  labelIsImage: aBoolean

o  longStringCompression

o  longStringCompression: aBoolean

o  maxValue

o  maxValue: something

o  menu
selector to get the menu for the selected component

o  menu: aMenu
selector to get the menu for the selected component

o  menuForRow: aRow
OBSOLETE: returns the middle button menu or nil assigned to the row (cell)

o  menuForRow: aRow inApplication: anApplication
OBSOLETE: returns the middle button menu assigned to the row (cell), or nil.
If the menuSelector is a 0-arg selector, that message is sent to the row-object.
If its a 1-arg selector, the current application is passed as arg.
This allows the item to return a menu with menuPerform already set.

o  menuForRow: aRow orAdaptor: anAdaptorOrNil
returns the middle button menu or nil assigned to the row (cell)

o  menuForRow: aRow orAdaptor: anAdaptorOrNil inApplication: anApplication
returns the middle button menu or nil assigned to the row (cell).
If the menuSelector is a 0-arg selector,
that message is sent to the row-object.
If its a 1-arg selector, the current application is passed as arg.
This allows the item to return a menu with menuPerform already set.

o  minValue

o  minValue: something

o  minWidth
optional: if no width is specified and the column is asked for
the widest row, this width is returned if not 0. Otherwise
we sre going throught to each row and ask for the width.

o  minWidth: aMinWidth
optional: if no width is specified and the column is asked for
the widest row, this width is returned if not 0. Otherwise
we sre going throught to each row and ask for the width.

o  noScroll
not supported yet

o  noScroll: aBoolean
not supported yet

o  numberOfRowsProbedForColumnSize
only the first numberOfRowsProbedForColumnSize are probed when the column computes
its size (width),
In case the access is expensive (dataBase apps).
The default is 15.

o  numberOfRowsProbedForColumnSize: aNumberOrNil
only the first numberOfRowsProbedForColumnSize are probed when the column computes
its size (width),
In case the access is expensive (dataBase apps).
The default is 15.

o  rawLabel
returns the label to be shown

o  rawLabel: something
set the value of the instance variable 'rawLabel' (automatically generated)

o  rendererType
get the discription type of any row

o  rendererType: aType
set the discription type of any row

o  selectedBackgroundColor
get the user configured selectedBackgroundColor or nil

o  selectedBackgroundColor: aColor
set the user configured selectedbackgroundColor or nil

o  selectedForegroundColor
get the user configured selectedForegroundColor or nil

o  selectedForegroundColor: aColor
set the user configured selectedforegroundColor or nil

o  size: aSize
maximum number of characters that are allowed in an input field.
0 or nil means unlimited

o  translateLabel
get the translateLabel attribute (language string translation)

o  translateLabel: aBoolean
set/clear the translateLabel attribute (language string translation)

o  translatedChoices
selector to get the collection of shown choices for a #ComboBox or #ComboList

o  translatedChoices: aSelector
selector to get the collection of shown choices for a #ComboBox or #ComboList

o  type
a type converter symbol

o  type: aType
a type converter symbol

o  usePreferredWidth
optional: the width is computed from the label and the first
n entries

o  usePreferredWidth: aBool
optional: the width is computed from the label and the first
n entries

o  visibilitySelector
selector to get the visibility of a column (per row)

o  visibilitySelector: aSelector
selector to get the visibility of a column (per row)

o  width
get the width; in case that the width is 0 or nil, the width
is recomputed dependent on the view width and the entries of
the rows

o  width: aWidth
set the width; in case that the width is 0 or nil, the width
is recomputed dependent on the view width and the entries of
the rows

accessing-selectors
o  backgroundSelector
selector which returns a background color for a cell or nil

o  backgroundSelector: aSelector
selector which returns a background color for a cell or nil

o  converterSelector
get the selector which returns a converter on a model or nil

o  converterSelector: aSelector
set the selector which returns a converter on a model or nil

o  doubleClickedSelector
selector which is evaluated without an argument on the cell

o  doubleClickedSelector: aSelector
selector which is evaluated without an argument on the cell

o  foregroundSelector
selector which returns a foreground color for a cell or nil

o  foregroundSelector: aSelector
selector which returns a foreground color for a cell or nil

o  labelActionArgument
argument to labelSelectionSelector (optional)

o  labelActionArgument: anArgument
argument to labelSelectionSelector (optional)

o  labelActionSelector
selector which is evaluated with the 'labelActionArgument', column label or without an argumnent
when the label is pressed.

o  labelActionSelector: aSelector
selector which is evaluated with the 'labelActionArgument', column label or without an argumnent
when the label is pressed.

o  printSelector
get the printSelector or nil. If nil, the read selector will be used as fall back

o  printSelector: aSelector
set the printSelector. Called for drawable instance with argument
a GC; as fault back the read operation will be used

o  readSelector
get the readSelector (used to access columns)

o  readSelector: aSelector
set the readSelector (used to access columns)

o  rowSeparatorSelector
selector which returns false if the row separator to the
next row is invisible

o  rowSeparatorSelector: aSelector
selector which returns false if the row separator to the
next row is invisible

o  selectSelector
the message selector send to the application when about to select a column.
Should return true if a cell in the column is selectable, false otherwise.

o  selectSelector: aSelector
the message selector send to the application when about to select a column.
Should return true if a cell in the column is selectable, false otherwise.

o  selectedBackgroundSelector
selector which returns a selected-background color for a cell or nil

o  selectedBackgroundSelector: aSelector
selector which returns a selectedbackground color for a cell or nil

o  selectedForegroundSelector
selector which returns a selected-foreground color for a cell or nil

o  selectedForegroundSelector: aSelector
selector which returns a selectedforeground color for a cell or nil

o  showComboFieldSelector
selector which returns true if a field for a ComboBox is shown

o  showComboFieldSelector: aSelector
selector which returns true if a field for a ComboBox is shown

o  sortSelector
selector which to get a comparable value from the row for sorting

o  sortSelector: aSelector
selector which to get a comparable value from the row for sorting

o  writeSelector
get the writeSelector. used to write back a value to the cell

o  writeSelector: aSelector
set the writeSelector. used to wtite back a value to the cell

accessing-visibility
o  isResizeable
true: the label and thus all rows are resizable

o  isResizeable: aBoolean
true: the label and thus all rows are resizable

o  labelButtonType

o  labelButtonType: aType
#None, #Button or #Group

o  labelIsButton
true if row label looks like a button; the defualt is true

o  labelIsButton: aBoolean
true if row label looks like a button; the default is true

o  showColSeparator
true if column seperator is shown; vertical line at the right side
of the row; default is true

o  showColSeparator: aBoolean
true if column seperator is shown; vertical line at the right side
of the row; default is true

o  showRowSeparator
true if row seperator is shown; horizontal line at the bottom
of the row; default is true

o  showRowSeparator: aBoolean
true if row seperator is shown; horizontal line at the bottom
of the row; default is true

o  showSelectionHighLighted
true: change fg/bg color if selected

o  showSelectionHighLighted: aBoolean
true: change fg/bg color if selected

converting
o  fromLiteralArrayEncoding: aSpecArray
read my attributes from aSpecArray

o  literalArrayEncoding
return myself encoded as a literal array

o  model: aReadSelector
used by builder

editing
o  editorOn: aRow at: aRowNr column: aColumn value: aValue usingAdaptor: anAdaptorOrNil
creates the editor for the row in a view and returns an editorAndModel object, or nil.

o  editorOn: aRow column: aColumn value: aValue usingAdaptor: anAdaptorOrNil

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  row: aRow at: anIndex put: something

initialization
o  initialize
setup default values

private
o  send: aSelector to: aRow orAdaptor: anAdaptorOrNil

o  send: aSelector with: arg to: aRow orAdaptor: anAdaptorOrNil

queries
o  canResize
returns true if the column is resizable

o  canSelect
returns true if cells are selectable

o  canSelect: aBoolean
true if cells are selectable

o  choicesFor: aRow

o  choicesFor: aRow at: aRowNr column: aColumn
invoked to retrieve a choice list for a comboList.

o  choicesFor: aRow column: aColumn

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  hasChoices: aRow

o  hasRelativeWidth
returns true if width is relative

o  labelHasButtonLayout

o  labelIsPartOfGroup

o  rowIsVisible: aRow

o  size
maximum number of characters that are allowed in an input field.
0 or nil means unlimited

o  translatedChoicesFor: aRow

o  translatedChoicesFor: aRow at: aRowNr column: aColumn
invoked to retrieve a choice list for a comboList.


Private classes:

    EditorAndModel
    StandardEditorAndModel
    UserProvidedEditorAndModel


ST/X 6.1.1; WebServer 1.620 at exept:8081; Mon, 21 May 2012 15:54:52 GMT