Class Index | File Index

Classes


Class zwt.ui.table.ColumnModel


Extends zwt.Object.

A column model provides all the attributes relative to the columns of a table.

Basically the column model is queried by the Table to display the columns.


Defined in: ColumnModel.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Construct a column model.
Method Summary
Method Attributes Method Name and Description
 
addColumn(zwt_ui_table_Column_column)
Add the specified column to the model.
 
Return the number of columns in the model.
 
Return the column model event manager attached to the model.
 
Return the columns in the model.
 
insertColumn(zwt_ui_table_Column_column, int_index)
Insert the specified column at the specified location in the model.
 
Determine whether the columns automatically resize in the table.
 
moveColumn(int_from, int_to)
Move the column at the specified index to the specified location.
 
onEvent(zwt_ui_table_ColumnModelEvent_event)
Dispatch the specified column model event to the appropriate event manager.
 
removeColumnAt(int_index)
Remove the column at the specified location.
 
setAutoResize(boolean_autoresize)
Make the columns automatically resize in the table.
 
setColumns(array_columns)
Change the columns in the model to be the specified columns.
Class Detail
zwt.ui.table.ColumnModel()
Construct a column model.
Author: Jeremy KUHN.
See:
zwt.ui.table.Column
zwt.ui.table.Table
Method Detail
addColumn(zwt_ui_table_Column_column)
Add the specified column to the model.
Parameters:
{zwt.ui.table.Column} zwt_ui_table_Column_column
The column to add

{Integer} getColumnCount()
Return the number of columns in the model.
Returns:
The number of columns

{zwt.ui.table.ColumnModelEventManager} getColumnModelEventManager()
Return the column model event manager attached to the model.
Returns:
The column model event manager

{zwt.ui.table.Column[]} getColumns()
Return the columns in the model.
Returns:
An array of columns

insertColumn(zwt_ui_table_Column_column, int_index)
Insert the specified column at the specified location in the model.
Parameters:
{zwt.ui.table.Column} zwt_ui_table_Column_column
The column to insert
{Integer} int_index
The index in the model where to insert the column

{Boolean} isAutoResize()
Determine whether the columns automatically resize in the table.
Returns:
true if the columns automatically resize, false otherwise

moveColumn(int_from, int_to)
Move the column at the specified index to the specified location.
Parameters:
{Integer} int_from
The current index of the column to move
{Integer} int_to
The target index of the column

onEvent(zwt_ui_table_ColumnModelEvent_event)
Dispatch the specified column model event to the appropriate event manager.
Parameters:
{zwt.ui.table.ColumnModelEvent} zwt_ui_table_ColumnModelEvent_event
The column model event to dispatch

removeColumnAt(int_index)
Remove the column at the specified location.
Parameters:
{Integer} int_index
The index of the column to remove

setAutoResize(boolean_autoresize)
Make the columns automatically resize in the table.
Parameters:
{Boolean} boolean_autoresize
true to make the columns automatically resize, false otherwise.

setColumns(array_columns)
Change the columns in the model to be the specified columns.
Parameters:
{zwt.ui.table.Column[]} array_columns
The columns to set

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Nov 09 2011 19:29:09 GMT+0100 (CET)