|
Class: DataSetColumnSpec
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
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.
copyrightCOPYRIGHT (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.
constants
-
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
|
-
slices
-
return the slices for the attribute sections in the TableColumnEditor
instance creation
-
label: aColumnLabel
-
instance creation
-
label: aColumnLabel editorType: anEditorType selector: aReadWriteSelectorOrCollectionOfSelectors
-
instance creation; set renderType dependent on the editorType
-
label: aColumnLabel selector: aReadWriteSelector
-
instance creation
-
new
-
instance creation
-
rowSelector
-
instance creation
accessing
-
activeHelpKey
-
the key used to ask the application for the tooltip text (via helpTextFor:)
-
activeHelpKey: aSymbolicKey
-
the key used to ask the application for the tooltip text (via helpTextFor:)
-
activeHelpKeyForLabel
-
-
activeHelpKeyForLabel: aSymbol
-
-
choices
-
selector to get the collection of choices for a #ComboBox or #ComboList
-
choices: aSelector
-
selector to get the collection of choices for a #ComboBox or #ComboList
-
columnAlignment
-
return the column's alignment, one of #left, #right, #center, #decimal or #decimalRight.
The default is #left.
-
columnAlignment: how
-
specify how the label is to be aligned;
Supports #left, #right, #center, #decimal and #decimalRight.
The default is #left.
-
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)
-
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)
-
editorType
-
get the editor type or selector
-
editorType: aType
-
set the editor type or selector
-
formatSelector
-
selector to ask row for a print-format of a column (i.e. dynamic formatString)
-
formatSelector: aSelectorOrNil
-
selector to ask row for a print-format of a column (i.e. dynamic formatString)
-
formatString
-
string describing special formatting for an input
field { #InputField #ComboBox #ComboList }.
-
formatString: aFormatString
-
string describing special formatting for an input
field { #InputField #ComboBox #ComboList }.
-
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
-
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
-
id
-
get the columns id
-
id: usuallyASymbol
-
set the columns id
-
isSortable
-
-
isSortable: aBoolean
-
-
label
-
get the label or selector to access a label/bitmap.
To get the label to be shown, use: #rawLabel
-
label: aLabel
-
set the label or selector to access the label/bitmap
-
labelAlignment
-
align label #left, #right or #center; default is #center
-
labelAlignment: howSymbol
-
align label #left, #right or #center; default is #center
-
labelFont
-
-
labelFont: aFont
-
-
labelIsImage
-
returns true if label is an image
-
labelIsImage: aBoolean
-
-
longStringCompression
-
if true, long strings are shown as 'x...', with x being the longest possible part of the string
-
longStringCompression: aBoolean
-
if true, long strings are shown as 'x...', with x being the longest possible part of the string
-
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
-
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
-
maxValue
-
-
maxValue: something
-
-
menu
-
selector to get the menu for the selected component
-
menu: aMenuSelector
-
selector to get the menu for the selected component
-
menuForRow: aRow
-
OBSOLETE: returns the middle button menu or nil assigned to the row (cell)
-
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.
-
menuForRow: aRow orAdaptor: anAdaptorOrNil
-
returns the middle button menu or nil assigned to the row (cell)
-
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.
-
menuFromApplication
-
true, if menu-selector is to be sent to the application instead of the row
-
menuFromApplication: aBoolean
-
true, if menu-selector is to be sent to the application instead of the row
-
minValue
-
-
minValue: something
-
-
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.
-
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.
-
noScroll
-
not supported yet
-
noScroll: aBoolean
-
not supported yet
-
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.
-
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.
-
rawLabel
-
returns the label to be shown
-
rawLabel: something
-
set the value of the instance variable 'rawLabel' (automatically generated)
-
rendererType
-
get the discription type of any row
-
rendererType: aType
-
set the discription type of any row;
Defaults to text, if aType is nil.
-
size: aSize
-
maximum number of characters that are allowed in an input field.
0 or nil means unlimited
-
translateLabel
-
get the translateLabel attribute (language string translation)
-
translateLabel: aBoolean
-
set/clear the translateLabel attribute (language string translation)
-
translatedChoices
-
selector to get the collection of shown choices for a #ComboBox or #ComboList
-
translatedChoices: aSelector
-
selector to get the collection of shown choices for a #ComboBox or #ComboList
-
type
-
a type converter symbol
-
type: aType
-
a type converter symbol
-
usePreferredWidth
-
optional: the width is computed from the label and the first
n entries
-
usePreferredWidth: aBool
-
optional: the width is computed from the label and the first
n entries
-
visibilitySelector
-
selector to get the visibility of a column (per row)
-
visibilitySelector: aSelector
-
selector to get the visibility of a column (per row)
-
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
-
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
-
backgroundColor
-
get the user configured backgroundColor or nil
-
backgroundColor: aColor
-
set the user configured backgroundColor or nil
-
foregroundColor
-
get the user configured foregroundColor or nil
-
foregroundColor: aColor
-
set the user configured foregroundColor or nil
-
labelBackgroundColor
-
-
labelBackgroundColor: aColor
-
-
labelForegroundColor
-
-
labelForegroundColor: aColor
-
-
selectedBackgroundColor
-
get the user configured selectedBackgroundColor or nil
-
selectedBackgroundColor: aColor
-
set the user configured selectedbackgroundColor or nil
-
selectedForegroundColor
-
get the user configured selectedForegroundColor or nil
-
selectedForegroundColor: aColor
-
set the user configured selectedforegroundColor or nil
accessing-selectors
-
backgroundSelector
-
selector which returns a background color for a cell or nil
-
backgroundSelector: aSelector
-
selector which returns a background color for a cell or nil
-
converterSelector
-
get the selector which returns a converter on a model or nil
-
converterSelector: aSelector
-
set the selector which returns a converter on a model or nil
-
doubleClickSelector
-
selector which is sent without argument on the cell when double clicked
-
doubleClickSelector: aSelector
-
selector which is evaluated without an argument on the cell;
IFF canSelect is true
-
doubleClickedSelector
-
obsolete: use: #doubleClickSelector
However: do not remove: it may still be found in many UI-specs
-
doubleClickedSelector: aSelector
-
obsolete: use: #doubleClickSelector:
However: do not remove: it may still be found in many UI-specs
-
foregroundSelector
-
selector which returns a foreground color for a cell or nil
-
foregroundSelector: aSelector
-
selector which returns a foreground color for a cell or nil
-
labelActionArgument
-
argument to labelSelectionSelector (optional)
-
labelActionArgument: anArgument
-
argument to labelSelectionSelector (optional)
-
labelActionSelector
-
selector which is evaluated with the 'labelActionArgument', column label or without an argumnent
when the label is pressed.
-
labelActionSelector: aSelector
-
selector which is evaluated with the 'labelActionArgument', column label or without an argumnent
when the label is pressed.
-
printSelector
-
get the printSelector or nil. If nil, the read selector will be used as fall back
-
printSelector: aSelector
-
set the printSelector. Called for drawable instance with argument
a GC; as fault back the read operation will be used
-
readSelector
-
get the readSelector (used to access columns)
-
readSelector: aSelector
-
set the readSelector (used to access columns);
can be a selector (sent to the row)
or a block.
-
rowSeparatorSelector
-
selector which returns false if the row separator to the
next row is invisible
-
rowSeparatorSelector: aSelector
-
selector which returns false if the row separator to the
next row is invisible
-
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.
-
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.
-
selectedBackgroundSelector
-
selector which returns a selected-background color for a cell or nil
-
selectedBackgroundSelector: aSelector
-
selector which returns a selectedbackground color for a cell or nil
-
selectedForegroundSelector
-
selector which returns a selected-foreground color for a cell or nil
-
selectedForegroundSelector: aSelector
-
selector which returns a selectedforeground color for a cell or nil
-
showComboFieldSelector
-
selector which returns true if a field for a ComboBox is shown
-
showComboFieldSelector: aSelector
-
selector which returns true if a field for a ComboBox is shown
-
sortBlockSelector
-
selector used to fetch a sortBlock
-
sortBlockSelector: aSymbol
-
selector used to fetch a sortBlock
-
sortSelector
-
selector used to get a comparable value from the row for sorting
-
sortSelector: aSelector
-
selector which to get a comparable value from the row for sorting
-
writeSelector
-
get the writeSelector. used to write back a value to the cell
-
writeSelector: aSelector
-
set the writeSelector. used to wtite back a value to the cell
accessing-visibility
-
isResizeable
-
true: the label and thus all rows are resizable
-
isResizeable: aBoolean
-
true: the label and thus all rows are resizable
-
labelButtonType
-
-
labelButtonType: aType
-
#None, #Button or #Group
-
labelIsButton
-
true if row label looks like a button; the default is true
-
labelIsButton: aBoolean
-
true if row label looks like a button; the default is true
-
showColSeparator
-
true if column seperator is shown; vertical line at the right side
of the row; default is true
-
showColSeparator: aBoolean
-
true if column seperator is shown; vertical line at the right side
of the row; default is true
-
showRowSeparator
-
true if row seperator is shown; horizontal line at the bottom
of the row; default is true
-
showRowSeparator: aBoolean
-
true if row seperator is shown; horizontal line at the bottom
of the row; default is true
-
showSelectionHighLighted
-
true: change fg/bg color if selected
-
showSelectionHighLighted: aBoolean
-
true: change fg/bg color if selected
converting
-
fromLiteralArrayEncoding: aSpecArray
-
read my attributes from aSpecArray.
Redefined to special-care for the label attribute
-
literalArrayEncoding
-
return myself encoded as a literal array
-
model: aReadSelector
-
used by builder
editing
-
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.
-
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) **
-
row: aRow at: anIndex put: something
-
stupid: cannot use #perform:withOptionalArg - because of arg-order.
initialization
-
initialize
-
setup default values
printing & storing
-
printOn: aStream
-
append a printed representation of the receiver to the argument, aStream
private
-
send: aSelector to: aRow orAdaptor: anAdaptorOrNil
-
-
send: aSelector with: arg to: aRow orAdaptor: anAdaptorOrNil
-
stupid: cannot use #perform:withOptionalArg - because of arg-order.
queries
-
canResize
-
returns true if the column is resizable
-
canSelect
-
returns true if cells are selectable
-
canSelect: aBoolean
-
true if cells are selectable
-
choicesFor: aRow
-
-
choicesFor: aRow at: aRowNr column: aColumn
-
invoked to retrieve a choice list for a comboList.
-
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) **
-
hasChoices: aRow
-
-
hasRelativeWidth
-
returns true if width is relative
-
labelHasButtonLayout
-
-
labelIsPartOfGroup
-
-
rowIsVisible: aRow
-
-
size
-
maximum number of characters that are allowed in an input field.
0 or nil means unlimited
-
translatedChoicesFor: aRow
-
-
translatedChoicesFor: aRow at: aRowNr column: aColumn
-
invoked to retrieve a choice list for a comboList.
EditorAndModel
StandardEditorAndModel
UserProvidedEditorAndModel
|