eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'DataSetColumn':

Home

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

Class: DataSetColumn


Inheritance:

   Object
   |
   +--DataSetColumn

Package:
stx:libwidg2
Category:
Views-DataSet
Version:
rev: 1.175 date: 2022/03/05 12:44:14
user: cg
file: DataSetColumn.st directory: libwidg2
module: stx stc-classLibrary: libwidg2

Description:


represent one single column description of a DataSetView

[Instance variables:]

    columnNumber    <Integer>               sequence number (into list of columns)

    dataSet         <DSVColumnView>         the view it belongs to

    width           <Integer>               width of column

    description     <DataSetColumnSpec>     the column description (a spec)

    buttonExtent    <Point>                 extent of drawable form

    rendererType    <Type>                  renderer type (cached value from
                                            the column specification).

    backgroundColor <Color or nil>          background color of all cells or nil
                                            (nil: use default background color).

    foregroundColor <Color or nil>          foreground color of all cells or nil
                                            (nil: use default foreground color).

    columnAlignment <Symbol>                align text/icon #left #right or #center
                                            in row (by default: #left).

    label           <label/icon or nil>     label resolved by the builder shown
                                            in the column description field.

    readSelector    <Symbol>                cached readSelector (from the spec)

    columnAdaptor   <nil or any>            if non-nil, that one is asked (via
                                            read-writeSelectors to extract a column
                                            from a row object.
                                            If nil, the row object is used itself.

    showColSeparator <Boolean>              true: vertical separators are enabled;
                                            separator between columns

    showRowSeparator <Boolean>              true: horizontal separators are enabled;
                                            separator between rows

    rowSeparatorSelector <Selector or nil>  access specific showRowSeparator state
                                            for a cell

[from description:]
    fgSelector      <Selector or nil>       access specific foreground color for
                                            a cell

    bgSelector      <Selector or nil>       access specific background color for
                                            a cell

    numberOfRowsProbedForColumnSize         the number of rows which are queries
                            <Integer>       in order to compute the columns width.
                                            (for scrollBar/col width computation)
                                            Notice, if it's expensive to fetch rows
                                            (dataBase apps), this should be small.
                                            Default:15

copyright

COPYRIGHT (c) 1997 by Claus Gittinger / 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  editorType_CheckToggle

o  editorType_ComboBox

o  editorType_ComboList

o  editorType_InputField

o  editorType_None

o  editorType_PopUpList

o  editorType_RadioButton

o  editorType_Text

o  editorType_rowSelector

initialization
o  initialize
(comment from inherited method)
called only once - initialize signals

utilities
o  shortenedStringFor: aString on: aGC maxWidth: maxWidth
common code to shorten a string; used in both the DSV label- and column Views,
if the string is too long for the column

o  shortenedStringFor: aString on: aGC maxWidth: maxWidth shortenedAtLeft: shortenedAtLeft
common code to shorten a string; used in both the DSV label- and column Views,
if the string is too long for the column


Instance protocol:

accessing
o  activeHelpText
get the active helpText or nil

o  activeHelpTextForLabel
get the active helpText for the label or nil

o  activeHelpTextForRow: rowNr
get the active helpText or nil

o  at: aRowNr
get the value of the cell at the row index, aRowNr

o  at: aRowNr put: something
set the value of the cell at the row index, aRowNr

o  columnAdaptor
If non-nil, messages to fetch/store columns from a model-list's element
will be sent to the adapter (i.e. it can map or compute values).
Use #yourself to let the application itself access the columns.
Use nil or leave empty, to have messages been sent directly to the row element.
The per-column getter/setter messages are specified in the columnSpecification.

o  columnAdaptor: anAdapter
If non-nil, messages to fetch/store columns from a model-list's element
will be sent to the adapter (i.e. it can map or compute values).
Use #yourself to let the application itself access the columns.
Use nil or leave empty, to have messages been sent directly to the row element.
The per-column getter/setter messages are specified in the columnSpecification.

o  columnNumber

o  description
returns the column spec

o  doubleClickSelector
selector which is sent without argument on the cell when double clicked

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

o  label
get the label assigned to the column

o  longStringCompression

o  longStringCompression: aBoolean

o  longStringCompressionAtLeft

o  rendererType
returns my renderer type

accessing-color & font
o  backgroundColor
returns the background color or nil

o  backgroundColor: aColor

o  backgroundColorAt: aRowNr
returns the background color for a row at list index a rowNr

o  backgroundColorFor: aRow at: aRowNr
return the background color for a row at list index a rowNr

o  colorFor: aRow at: aRowNr descriptionSelector: descriptionSelector descriptionColor: descriptionColor dataSetDefaultColor: dataSetColor
common code for returning a color for a row at list index a rowNr, asking both description and dataSet as fallBack

o  foregroundColor
returns the foreground color or nil

o  foregroundColor: aColor

o  foregroundColorFor: aRow at: aRowNr
returns the foreground color for a row at list index a rowNr

o  selectedBackgroundColorFor: aRow at: aRowNr
returns the selected background color for a row at list index a rowNr

o  selectedForegroundColorFor: aRow at: aRowNr
returns the selected foreground color for a row at list index a rowNr

o  selectedFrameColorFor: aRow at: aRowNr
returns the selected frame color for a row at list index a rowNr

accessing-dimension
o  minWidth
get the minimum width required by the column

o  minimumRequiredWidth
returns the minimum required width

o  setDescWidth: aWidth
set a fixed width

o  setWidth: pixels

o  width
returns the width in pixels
Warning:
only the first numberOfRowsProbedForColumnSize are probed,
in case the access is expensive (dataBase apps)
If the descriptor defines a width, that is used, and the items
are not probed at all.

o  width: aWidth

drawing
o  drawLabel: aLabelToDraw atX: xLeft y: yTop
draw aLabelToDraw; handle columnAlignment

o  drawLabelsAtX: xLeft y: yTop h: h from: start to: stop
redraw labels from start to stop

o  drawRendererInRow: rowNr x: xLeft y: y width: cellWidth value: cellValue

o  drawSeparatorsAtX: xLeft y: yTop h: h from: start to: stop
redraw separators for cells between start and stop

o  invalidate
invalidate width of column; forces a recomputation

o  redrawX: xLeft y: yTop h: h from: start to: stop
redraw all rows between start and stop

o  shownValueForRow: aRowOrNil rowNr: aRowNr
cannot remember what this was used for ...

editing
o  editorForRowAt: aRowNr
creates the editor for the row in a view and returns an editorAndModel, or nil

event handling
o  doesNotUnderstand: aMessage
(comment from inherited method)
this message is sent by the runtime system (VM) when
a message is not understood by some object (i.e. there
is no method for that selector). The original message has
been packed into aMessage (i.e. the receiver, selector and
any arguments) and the original receiver is then sent the
#doesNotUnderstand: message.
Here, we raise another signal which usually enters the debugger.
You can of course redefine #doesNotUnderstand: in your classes
to implement message delegation,
or handle the MessageNotUnderstood exception gracefully.

grow & shrink
o  growWidth: n
grow the width for n pixels

initialization
o  on: aDSVColumnView description: aDescription columnNumber: aNumber label: aLabel
instance creation; set attributes dependent on the description

private
o  extractColFromRow: aRow rowNr: rowNr
I don't use valueWithOptionalArgument:and:and:and: here, to make better use of inline caches...

o  storeCol: newValueArg inRow: aRow

queries
o  canResize

o  canSelect: aRowNr
returns true if the cell in column is selectable.
(possibly calls the selectSelector, if any)

o  choicesFor: aRow at: aRowNr

o  containsText
returns true if text might exist

o  doubleClickOn: aRowNr

o  hasChoices: aRowNr

o  hasPotentialNonConstantBackground

o  hasRelativeWidth
returns true if width is relative

o  hasRowSeparatorAt: rowNumber

o  heightOfHighestRow
returns the height of the highest row in pixels.
Warning:
only the first numberOfRowsProbedForColumnSize are probed,
in case the access is expensive (dataBase apps)
If the descriptor defines a height, that is used, and the items are not probed at all.
If the descriptor's height is -1 or #fontHeight, that is used.
If the descriptor's height is #heightOfFirstRow, only the first columns height is probed.

o  heightOfLabel: aLabel
returns the height of the label

o  isResizeable
returns true if the row is resizeable

o  isRowVisible: rowNr

o  isSortable

o  showColSeparator
returns true if column separator is on

o  showSelectionHighLighted
returns true if selection is highLighted

o  translatedChoicesFor: aRow at: aRowNr

o  widthOfLabel: aLabel
returns the width of the label

searching
o  findRowNrStartingWithChar: aChar start: start stop: stop
find the first row starting at start to stop, which drawable label
starts with the character, aChar. The index of the detected row is
returned or if no row is found 0.



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:47:15 GMT