eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'DataSetColumnSpec':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: DataSetColumnSpec


Inheritance:

   Object
   |
   +--DataSetColumnSpec

Package:
stx:libui
Category:
Interface-Support-UI-Specs
Version:
rev: 1.151 date: 2023/05/02 09:47:15
user: cg
file: DataSetColumnSpec.st directory: libui
module: stx stc-classLibrary: libui

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; one of DataSetColumn editorType_xxx,
                                            which are #None, #InputField, #CheckToggle, #ComboBox, #ComboList (and more). 
                                            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 view's 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 reading public domain code
    - it may be incomplete or oncompatible 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.

copyright

COPYRIGHT (c) 1997 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

constants
o  defaultIcon
This resource specification was automatically generated
by the ImageEditor of ST/X.

Usage example(s):

     self defaultIcon inspect
     ImageEditor openOnClass:self andSelector:#defaultIcon
     Icon flushCachedIcons

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

instance creation
o  label: aColumnLabel
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
the key used to ask the application for the tooltip text (via helpTextFor:)

o  activeHelpKey: aSymbolicKey
the key used to ask the application for the tooltip text (via helpTextFor:)

o  activeHelpKeyForLabel

o  activeHelpKeyForLabel: aSymbol

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 column's alignment, 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  drawSelector
Get the draw selector. If not nil, the view will draw cell contents using
this message sent to the row-objects, passing arguments:
- GC to draw on
- x, y, width, height
- col number (optional)


o  drawSelector: aSymbol
Sets the draw selector. If not nil, the view will draw cell's contents using
this message sent to the row-objects, passing arguments:
- GC to draw on
- x, y, width, height
- col number (optional)

o  editorType
get the editor type or selector

o  editorType: aType
set the editor type or selector

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 (if >0)
or 0 (ask each row),
or -1/#fontHeight to use the font height
or #heightOfFirstRow to assume all rows have the same height

o  height: aHeight
set a fixed height of a cell (>0)
or 0 (ask each),
or -1/#fontHeight to use the font height
or #heightOfFirstRow to assume all rows have the same height

o  id
get the columns id

o  id: usuallyASymbol
set the columns id

o  isSortable

o  isSortable: aBoolean

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: howSymbol
align label #left, #right or #center; default is #center

o  labelFont

o  labelFont: aFont

o  labelIsImage
returns true if label is an image

o  labelIsImage: aBoolean

o  longStringCompression
if true, long strings are shown as 'x...', with x being the longest possible part of the string

o  longStringCompression: aBoolean
if true, long strings are shown as 'x...', with x being the longest possible part of the string

o  longStringCompressionAtLeft
if true, long strings are shown as '...x', with x being the longest possible right part of the string.
If false (the default), long strings are compressed to 'x...', with x the longest possible left part

o  longStringCompressionAtLeft: aBoolean
if true, long strings are shown as '...x', with x being the longest possible right part of the string.
If false (the default), long strings are compressed to 'x...', with x the longest possible left part

o  maxValue

o  maxValue: something

o  menu
selector to get the menu for the selected component

o  menu: aMenuSelector
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 it's 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 it's a 1-arg selector, the current application is passed as arg.
This allows the item to return a menu with menuPerform already set.

o  menuFromApplication
true, if menu-selector is to be sent to the application instead of the row

o  menuFromApplication: aBoolean
true, if menu-selector is to be sent to the application instead of the row

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 2.

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;
Defaults to text, if aType is 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-color & font
o  backgroundColor
get the user configured backgroundColor or nil

o  backgroundColor: aColor
set the user configured backgroundColor or nil

o  foregroundColor
get the user configured foregroundColor or nil

o  foregroundColor: aColor
set the user configured foregroundColor or nil

o  labelBackgroundColor

o  labelBackgroundColor: aColor

o  labelForegroundColor

o  labelForegroundColor: aColor

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

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  doubleClickSelector
selector which is sent without argument on the cell when double clicked

o  doubleClickSelector: aSelector
selector which is evaluated without an argument on the cell;
IFF canSelect is true

o  doubleClickedSelector
obsolete: use: #doubleClickSelector
However: do not remove: it may still be found in many UI-specs

o  doubleClickedSelector: aSelector
obsolete: use: #doubleClickSelector:
However: do not remove: it may still be found in many UI-specs

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);
can be a selector (sent to the row)
or a block.

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.
caveat: should be named canSelectSelector.

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  sortBlockSelector
selector used to fetch a sortBlock

o  sortBlockSelector: aSymbol
selector used to fetch a sortBlock

o  sortSelector
selector used 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 default 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.
Redefined to special-care for the label attribute

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
creates the editor for the row in a view and returns an editorSpec

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

o  row: aRow at: anIndex put: something
stupid: cannot use #perform:withOptionalArg - because of arg-order.

initialization
o  initialize
setup default values

printing & storing
o  printOn: aStream
append a printed representation of the receiver to the argument, aStream

private
o  send: aSelector to: aRow orAdaptor: anAdaptorOrNil

o  send: aSelector with: arg to: aRow orAdaptor: anAdaptorOrNil
stupid: cannot use #perform:withOptionalArg - because of arg-order.

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
invoked to retrieve a choice list for a comboList.

** 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 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:00:34 GMT