Yahoo! UI Library

DataTable Widget  2.7.0

Yahoo! UI Library > datatable > YAHOO.widget.ColumnSet
Search:
 
Filters

Class YAHOO.widget.ColumnSet - uses YAHOO.util.EventProvider

The ColumnSet class defines and manages a DataTable's Columns, including nested hierarchies and access to individual Column instances.

Constructor

YAHOO.widget.ColumnSet ( aDefinitions )
Parameters:
aDefinitions <Object[]> Array of object literals that define cells in the THEAD.

Properties

_aDefinitions - private Object[]

Array of object literal Column definitions passed to the constructor.

_sId - private String

Unique instance name.

ColumnSet._nCount - private static Number

Internal class variable to index multiple ColumnSet instances.

flat - YAHOO.widget.Column[]

Flattened representation of all Columns.
Default Value: []

headers - String[]

ID index of nested parent hierarchies for HEADERS accessibility attribute.
Default Value: []

keys - YAHOO.widget.Column[]

Array of Columns that map one-to-one to a table column.
Default Value: []

tree - YAHOO.widget.Column[]

Top-down tree representation of Column hierarchy.

Methods

_init

private void _init ( aDefinitions )
Initializes ColumnSet instance with data from Column definitions.
Parameters:
aDefinitions <Object[]> Array of object literals that define cells in the THEAD .
Returns: void

getColumn

YAHOO.widget.Column getColumn ( column )
Returns Column instance with given key or ColumnSet key index.
Parameters:
column <String | Number> Column key or ColumnSet key index.
Returns: YAHOO.widget.Column
Column instance.

getColumnById

YAHOO.widget.Column getColumnById ( column )
Returns Column instance with given ID.
Parameters:
column <String> Column ID.
Returns: YAHOO.widget.Column
Column instance.

getDefinitions

Object[] getDefinitions ( )
Public accessor to the definitions array.
Returns: Object[]
Array of object literal Column definitions.

getDescendants

Array getDescendants ( )
Public accessor returns array of given Column's desendants (if any), including itself.
Returns: Array
Array including the Column itself and all descendants (if any).

getId

String getId ( )
Returns unique name of the ColumnSet instance.
Returns: String
Unique name of the ColumnSet instance.

toString

String toString ( )
ColumnSet instance name, for logging.
Returns: String
Unique name of the ColumnSet instance.


Copyright © 2009 Yahoo! Inc. All rights reserved.