|
Class: DataSetColumn
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
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
copyrightCOPYRIGHT (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.
constants
-
editorType_CheckToggle
-
-
editorType_ComboBox
-
-
editorType_ComboList
-
-
editorType_InputField
-
-
editorType_None
-
-
editorType_PopUpList
-
-
editorType_RadioButton
-
-
editorType_Text
-
-
editorType_rowSelector
-
initialization
-
initialize
-
(comment from inherited method)
called only once - initialize signals
utilities
-
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
-
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
accessing
-
activeHelpText
-
get the active helpText or nil
-
activeHelpTextForLabel
-
get the active helpText for the label or nil
-
activeHelpTextForRow: rowNr
-
get the active helpText or nil
-
at: aRowNr
-
get the value of the cell at the row index, aRowNr
-
at: aRowNr put: something
-
set the value of the cell at the row index, aRowNr
-
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.
-
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.
-
columnNumber
-
-
description
-
returns the column spec
-
doubleClickSelector
-
selector which is sent without argument on the cell when double clicked
-
doubleClickedSelector
-
obsolete: use: #doubleClickSelector
However: do not remove: it may still be found in many UI-specs
-
label
-
get the label assigned to the column
-
longStringCompression
-
-
longStringCompression: aBoolean
-
-
longStringCompressionAtLeft
-
-
rendererType
-
returns my renderer type
accessing-color & font
-
backgroundColor
-
returns the background color or nil
-
backgroundColor: aColor
-
-
backgroundColorAt: aRowNr
-
returns the background color for a row at list index a rowNr
-
backgroundColorFor: aRow at: aRowNr
-
return the background color for a row at list index a rowNr
-
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
-
foregroundColor
-
returns the foreground color or nil
-
foregroundColor: aColor
-
-
foregroundColorFor: aRow at: aRowNr
-
returns the foreground color for a row at list index a rowNr
-
selectedBackgroundColorFor: aRow at: aRowNr
-
returns the selected background color for a row at list index a rowNr
-
selectedForegroundColorFor: aRow at: aRowNr
-
returns the selected foreground color for a row at list index a rowNr
-
selectedFrameColorFor: aRow at: aRowNr
-
returns the selected frame color for a row at list index a rowNr
accessing-dimension
-
minWidth
-
get the minimum width required by the column
-
minimumRequiredWidth
-
returns the minimum required width
-
setDescWidth: aWidth
-
set a fixed width
-
setWidth: pixels
-
-
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.
-
width: aWidth
-
drawing
-
drawLabel: aLabelToDraw atX: xLeft y: yTop
-
draw aLabelToDraw; handle columnAlignment
-
drawLabelsAtX: xLeft y: yTop h: h from: start to: stop
-
redraw labels from start to stop
-
drawRendererInRow: rowNr x: xLeft y: y width: cellWidth value: cellValue
-
-
drawSeparatorsAtX: xLeft y: yTop h: h from: start to: stop
-
redraw separators for cells between start and stop
-
invalidate
-
invalidate width of column; forces a recomputation
-
redrawX: xLeft y: yTop h: h from: start to: stop
-
redraw all rows between start and stop
-
shownValueForRow: aRowOrNil rowNr: aRowNr
-
cannot remember what this was used for ...
editing
-
editorForRowAt: aRowNr
-
creates the editor for the row in a view and returns an editorAndModel, or nil
event handling
-
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
-
growWidth: n
-
grow the width for n pixels
initialization
-
on: aDSVColumnView description: aDescription columnNumber: aNumber label: aLabel
-
instance creation; set attributes dependent on the description
private
-
extractColFromRow: aRow rowNr: rowNr
-
I don't use valueWithOptionalArgument:and:and:and: here, to make better use of inline caches...
-
storeCol: newValueArg inRow: aRow
-
queries
-
canResize
-
-
canSelect: aRowNr
-
returns true if the cell in column is selectable.
(possibly calls the selectSelector, if any)
-
choicesFor: aRow at: aRowNr
-
-
containsText
-
returns true if text might exist
-
doubleClickOn: aRowNr
-
-
hasChoices: aRowNr
-
-
hasPotentialNonConstantBackground
-
-
hasRelativeWidth
-
returns true if width is relative
-
hasRowSeparatorAt: rowNumber
-
-
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.
-
heightOfLabel: aLabel
-
returns the height of the label
-
isResizeable
-
returns true if the row is resizeable
-
isRowVisible: rowNr
-
-
isSortable
-
-
showColSeparator
-
returns true if column separator is on
-
showSelectionHighLighted
-
returns true if selection is highLighted
-
translatedChoicesFor: aRow at: aRowNr
-
-
widthOfLabel: aLabel
-
returns the width of the label
searching
-
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.
|