eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ListModelView::TableRenderer':

Home

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

Class: TableRenderer (private in ListModelView

This class is only visible from within ListModelView.

Inheritance:

   Object
   |
   +--ListModelView::Renderer
      |
      +--ListModelView::TableRenderer

Package:
stx:libwidg2
Category:
Views-Lists
Owner:
ListModelView

Class protocol:

defaults
o  dragCursor
returns the cursor used to highliggt the drag can start operation

o  separatorOneDColor
answer the color used for drawing separators


Instance protocol:

accessing
o  columnDescriptors: aSeqOfColumnSpecs
setup column descriptions for a sequence of DataSetColumnSpec's but still keep
the receiver which provides the selectors called by the DataSetColumnSpec.

If the receiver is nil, the item into the list is invoked

o  columnDescriptors: aSeqOfColumnSpecs receiver: aReceiver
setup column descriptions for a sequence of DataSetColumnSpec's and the
receiver which provides the selectors called by the DataSetColumnSpec.

If the receiver is nil, the item into the list is invoked

o  numberOfColumns
answer the numbers of columns excluding the items row

o  xSplitbars

accessing-look
o  defaultWidthForItem
answer the default witdth of the item before the first column

o  defaultWidthForItem: anIntegerOrFloat
Set the default witdth of the item before the first column.
If `anIntegerOrFloat` is
- an integer then the width is absolute width in pixels
- a float in <0.0, 1,1> then the width is percentage
of view's width

o  defaultWidthForItemInPixels
Answer the default witdth of the item before the first column in pixels

o  noAutoResizeForRowOfItems
the first row which keeps the items are not automatically resized
when width of items changed

o  separatorOneDColor
answer the color used for drawing separators

o  showHorizontalSeparators
answer true if horizontal separators are drawn

o  showHorizontalSeparators: aBoolean
set true if horizontal separators are drawn

o  showHorizontalSeparatorsForItem
answer true if horizontal separators is drawn for the item row

o  showHorizontalSeparatorsForItem: aBoolean
set true if horizontal separators is drawn for the item row

o  showItemInAdditionToColumns
Return, whether the item itseld should be shown in addition to
columns (default)

o  showItemInAdditionToColumns: aBoolean
If set to troe, the implicit forst column is shown (old behaviour).
When false, only column are shown

o  showVerticalSplitbars
answer true if vertical separators are drawn

o  showVerticalSplitbars: aBoolean
set true if vertical separators are drawn

o  showVerticalSplitbarsBelowContents
answer true if the vertical separators are drawn below last row

o  showVerticalSplitbarsBelowContents: aBoolean
set true if the vertical separators are drawn below last row

o  splitbarInset
returns the horizontal left and right inset of the splitbar

o  textStartLeft
used when drawing the last separator;
workaround when drawing the selection frame

actions
o  moveSplitbarAt: aSepIndex toAbsoluteX: x
move the position of the separator at an index to absolute position x;
used to drag splitbars

change & update
o  sizeChanged: how
(comment from inherited method)
Called when size of the corresponding view has changed.

o  sizeChangedDelayed: how

o  splitbarsChanged
called if the splitbars has changed; recompute the width of contents

o  withinUpdateFromListDo: aBlock
handle an change & update within the view

displaying
o  drawColumnsFrom: start to: stop x: xDmg y: yStart w: wDmg
draw columns from start to stop.
if the start/stop index is nil, than no row is affected by the damage.

o  drawHorizontalSeparatorsX: x y: y w: w from: start to: stop
draw horizontal seperators from start to stop.
if the start/stop index is nil, than no row is affected by the damage.

o  drawVerticalSplitbarsX: x0 y: y0 w: w from: start to: stop
draw vertical splitbars

o  postRedrawX: x y: y w: w from: start to: stop
draw columns and than the splitbars

o  validateDrawableItemsFrom: start to: stop
called before drawing the items in range from start to stop; the
renderer can perform some tests whether the draw operation might
fail; width, ... might change during draw.
If a test failed, the renderer should repair the failed test and
return false. In this case a full redraw is done.
By default, true is returned.

enumerating
o  columnDescriptorsDo: aOneArgBlock

o  columnDescriptorsKeysAndValuesDo: aTwoArgBlock

o  xSplitbarsDo: aOneArgblock
evaluate a block on each x splitbar position


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

o  xSplitbarsKeysAndValuesDo: aTwoArgblock
evaluate a block on each x splitbar index and position


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

event processing
o  addEventHook
add event hook to window group

o  processEvent: ev
Process a window event.
Only handled if drag splitbar is enabled.
Answer true if the event has been processed, false if it must still be processed.
TODO: sorting not yet implemented!

o  removeEventHook
release my event hook

initialization
o  initializeSplitbars

instance creation
o  forView: aView
setup instance for a view;
setup my default columnDescription

o  mapped
install event hook and enable motion events

o  release
release event hook

private
o  computeColumnWidthsWithXOffset: xoffset
splitbar width

private accessing
o  columnAlignmentAt: aColNr

o  defaultColumnWidthAt: aColIndex

o  showVerticalSplitbarAt: aColIndex

queries-behavior
o  isDragEnabled
answer true if drag of separators is enabled

o  isDragEnabled: aBoolean
answer true if drag of separators is enabled

queries-dimensions
o  boundingBoxForCellAtXAbsolute: x yAbsolute: y
- xTrs

o  boundingBoxForCellAtXVisible: x yVisible: y

o  heightFor: anItem
returns the height of an item on the view

o  maxItemWidthOrNil
returns the maximum item width for drawing; the
offset to the first splitbar minus an inset.

o  widthFor: anItem
returns the width of an item on the view including the columns
but extracting the hierarchical tree inset.

o  widthOfColumn: aColumn
answer the width of a column or nil

o  widthOfItemColumn
answer the current width of the column which holds the hierarchical
item label.

o  widthOfWidestLineBetween: firstLine and: lastLine
returns the width of the longest line in pixels in a range
- used to optimize scrolling, by limiting the scrolled area;
not for scrollbar or other width related stuff which should be exact.

o  xAbsoluteOfSplitbarAt: anIndex
returns the physical x of the splitbar at an index

o  xAbsoluteToColumnIndex: absX
returns the column index for position x or 0 if not detected

o  xAbsoluteToSplitbar: absX
returns the splitbar index at the position x or 0 if not detected

o  xVisibleOfLastSplitbar
answer the visible x position of the last splitBar

o  xVisibleOfSplitbarAt: anIndex
returns the visible x of the splitbar at an index

o  xVisibleToColumnIndex: relX
returns the column index for visible position x or 0 if not detected

o  xVisibleToSplitbar: visX
returns the splitbar index at the position x or 0 if not detected


Private classes:

    ColumnDescriptor


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sun, 24 Nov 2024 17:19:30 GMT