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
- columns
- exampleView
- flexibleColumn
- hasTableHead
- hasUniformRowHeights
- icon
- isFlexible
- isReorderable
- isSortable
- key
- maxWidth
- minWidth
- rowHeight
- sortedColumn
- sortState
- tableContent
- tableHeadHeight
- tableHeadView
- title
- width
- Fields borrowed from SC.Object:
- concatenatedProperties, isDestroyed, isObject, nextProperty, object, property, target, toInvalidate
- Fields borrowed from SC.Observable:
- isObservable
Instance Methods
- clippingFrame()
- computeLayout()
- containerView()
- createItemView(exampleClass, idx, attrs)
- displayValue()
- init()
- layoutForContentIndex(index)
- mouseDownInTableHeaderView(evt, header)
- mouseDraggedInTableHeaderView(evt, header)
- mouseUpInTableHeaderView(evt, header)
- render(context, firstTime)
- rowHeightForContentIndex(idx)
- rowOffsetForContentIndex(idx)
Field Detail
columns ArrayA collection of SC.TableColumn
objects. Modify the array to adjust the
columns.
Defined in: table.js.
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.
Whether all rows in the table will have the same pixel height. If so, we can compute offsets very cheaply.
Defined in: table.js.
Reference to the URL for this column's icon. If null
, there is no
icon associated with the column.
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.
The internal name of the column. SC.TableRowView
objects expect their
content
to be an object with keys corresponding to the column's keys.
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.
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.
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).
The display name of the column. Will appear in the table header for this column.
Instance Method Detail
Defined in: table.js.
Defined in: table.js.
Defined in: table.js.
Defined in: table.js.
- Parameters:
- exampleClass
- idx
- attrs
Defined in: table_cell.js.
Defined in: table_cell.js.
Computes the layout for a specific content index by combining the current row heights.
Defined in: table.js.
- Parameters:
- index Number
- content index
Defined in: table.js.
- Parameters:
- evt
- header
Defined in: table.js.
- Parameters:
- evt
- header
Defined in: table.js.
- Parameters:
- evt
- header
Defined in: table_cell.js.
- Parameters:
- context
- firstTime
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
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