|
Class: DataSetColumn
Object
|
+--DataSetColumn
- Package:
- stx:libwidg2
- Category:
- Views-DataSet
- Version:
- rev:
1.163
date: 2019/04/23 18:05:22
- user: cg
- file: DataSetColumn.st directory: libwidg2
- module: stx stc-classLibrary: libwidg2
- Author:
- Claus Atzkern
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 (on 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
DataSetColumnSpec
DSVColumnView
DataSetView
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
-
-
columnAdaptor: anAdapter
-
-
columnNumber
-
-
description
-
returns the column spec
-
doubleClickedSelector
-
-
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
-
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.
|