Class: SC.TableColumn


Extends SC.Object.

An abstract object that manages the state of the columns behind a SC.TableView.

Defined in: table_column.js

Since:
SproutCore 1.1

Field Summary

Instance Methods

Field Detail

columns Array

A collection of SC.TableColumn objects. Modify the array to adjust the columns.


Defined in: table.js.
exampleView SC.View
Which view to use for a table row.
Defined in: table.js.
flexibleColumn SC.TableColumn

Which column will alter its size so that the columns fill the available width of the table. If null, the last column will stretch.


Defined in: table.js.
hasTableHead Boolean

if YES, the table view will generate a head row at the top of the table view.


Defined in: table.js.
hasUniformRowHeights Boolean

Whether all rows in the table will have the same pixel height. If so, we can compute offsets very cheaply.


Defined in: table.js.
icon

Reference to the URL for this column's icon. If null, there is no icon associated with the column.

isFlexible Boolean

Whether the column gets wider or narrower based on the size of the table. Only one column in a TableView is allowed to be flexible.

isReorderable Boolean
Whether the column can be drag-reordered.
isSortable Boolean
Whether the column can be sorted.
key String

The internal name of the column. SC.TableRowView objects expect their content to be an object with keys corresponding to the column's keys.

maxWidth Number
How wide the column will allow itself to be.
minWidth Number
How narrow the column will allow itself to be.
rowHeight Number
How high each row should be, in pixels.
Defined in: table.js.
sortedColumn SC.TableColumn

Which column is currently the "active" column for sorting purposes. Doesn't say anything about sorting direction; for that, read the sortState property of the sorted column.


Defined in: table.js.
sortState

The sort state of this particular column. Can be one of SC.SORT_ASCENDING, SC.SORT_DESCENDING, or null. For instance, if SC.SORT_ASCENDING, means that the table is being sorted on this column in the ascending direction. If null, means that the table is sorted on another column.

tableContent

The content property of the controlling SC.TableView. This is needed because the SC.TableHeader views use this class to find out how to render table content (when necessary).

tableHeadHeight Number
The height of the table head in pixels.
Defined in: table.js.
tableHeadView SC.View
The view that serves as the head view for the table (if any).
Defined in: table.js.
title String

The display name of the column. Will appear in the table header for this column.

width Number
Width of the column.

Instance Method Detail

clippingFrame()

Defined in: table.js.
computeLayout()

Defined in: table.js.
containerView()

Defined in: table.js.
createItemView(exampleClass, idx, attrs)

Defined in: table.js.
Parameters:
exampleClass
idx
attrs
displayValue()

Defined in: table_cell.js.
init()

Defined in: table_cell.js.
layoutForContentIndex(index)

Computes the layout for a specific content index by combining the current row heights.


Defined in: table.js.
Parameters:
index Number
content index
mouseDownInTableHeaderView(evt, header)

Defined in: table.js.
Parameters:
evt
header
mouseDraggedInTableHeaderView(evt, header)

Defined in: table.js.
Parameters:
evt
header
mouseUpInTableHeaderView(evt, header)

Defined in: table.js.
Parameters:
evt
header
render(context, firstTime)

Defined in: table_cell.js.
Parameters:
context
firstTime
rowHeightForContentIndex(idx)

Returns the row height for the specified content index. This will take into account custom row heights and group rows.


Defined in: table.js.
Parameters:
idx Number
content index
Returns:
Number
the row height in pixels
rowOffsetForContentIndex(idx)

Returns the top offset for the specified content index. This will take into account any custom row heights and group views.


Defined in: table.js.
Parameters:
idx Number
the content index
Returns:
Number
the row offset in pixels
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 08 2015 10:02:21 GMT-0600 (CST)