Class Index | File Index

Classes


Class zwt.ui.table.Column


Extends zwt.Object.

A column represents all the attributes of a column in a table, such as width, resizibility, minimum and maximum widths.

The column also provides a cell renderer to display the values in the column and a cell editor to edit these values.

It stores the link between the columns in the table (the view) and the model through the modelIndex which is the column in the table model queried to get the values for the cells in the column. If the column is moved in the view the modelIndex does not change.


Defined in: Column.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
zwt.ui.table.Column(int_modelIndex)
Construct a column.
Method Summary
Method Attributes Method Name and Description
 
Return the editor associated to the column.
 
Return the cell renderer associated to the column.
 
Return the column event manager attached to the model.
 
Return the description of the column.
 
Return the label of the column.
 
Return the maximum width of the column in the table.
 
Return the minimum width of the column in the table.
 
Return the corresponding model index of the column.
 
Return the preferred width of the column in the Table.
 
Determine whether the cells in the column are editable.
 
Determine whether the column is resizable.
 
onEvent(zwt_ui_table_ColumnEvent_event)
Dispatch the specified column event to the appropriate event manager.
 
setCellEditor(zwt_ui_table_CellEditor_editor)
Associate the specified cell editor to the column.
 
setCellRenderer(zwt_ui_table_CellRenderer_renderer)
Associate the specified renderer to the column.
 
setDescription(string_description)
Set the description of the column.
 
setEditable(boolean_editable)
Deactivate or activate the edition of the cells in the column.
 
setLabel(string_label)
Set the label of the column.
 
setMaxWidth(int_width)
Set the maximum width of the column in the table.
 
setMinWidth(int_width)
Set the minimum width of the column in the table.
 
setModelIndex(int_index)
Set the model index.
 
setPreferredWidth(int_preferredWidth)
Set the preferred width of the column in the table.
 
setResizable(boolean_resizable)
Make this column resizable
Class Detail
zwt.ui.table.Column(int_modelIndex)
Construct a column.
Author: Jeremy KUHN.
Parameters:
int_modelIndex
See:
zwt.ui.table.TableModel
Method Detail
{zwt.ui.table.CellEditor} getCellEditor()
Return the editor associated to the column. A cell editor is used to edit the values in the column.
Returns:
The cell editor

{zwt.ui.table.CellRenderer} getCellRenderer()
Return the cell renderer associated to the column. A cell renderer is used to display the values in the column.
Returns:
The cell renderer

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

{String} getDescription()
Return the description of the column.
Returns:
The column description

{String} getLabel()
Return the label of the column.
Returns:
The column label

{Integer} getMaxWidth()
Return the maximum width of the column in the table. If the column is not resizable then the preferred width is returned.
Returns:
The maximum width

{Integer} getMinWidth()
Return the minimum width of the column in the table. If the column is not resizable then the preferred width is returned.
Returns:
The minimum width

{Integer} getModelIndex()
Return the corresponding model index of the column. This index indicates what column of the data model will be displayed in the table column.
Returns:
The model index

{Integer} getPreferredWidth()
Return the preferred width of the column in the Table. This value is used by the Table to determine the actual initial width of the column in the table.
Returns:
The preferred width

{Boolean} isEditable()
Determine whether the cells in the column are editable. Column is editable by default.
Returns:
true if the cells are editable, false otherwise

{Boolean} isResizable()
Determine whether the column is resizable. Column is resizable by default.
Returns:
true if the column is resizable, false otherwise

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

setCellEditor(zwt_ui_table_CellEditor_editor)
Associate the specified cell editor to the column. A basic cell editor is provided by default.
Parameters:
{zwt.ui.table.CellEditor} zwt_ui_table_CellEditor_editor
The cell editor to set

setCellRenderer(zwt_ui_table_CellRenderer_renderer)
Associate the specified renderer to the column. A basic cell renderer is provided by default.
Parameters:
{zwt.ui.table.CellRenderer} zwt_ui_table_CellRenderer_renderer
The cell renderer to set

setDescription(string_description)
Set the description of the column.
Parameters:
{String} string_description
The column description to set

setEditable(boolean_editable)
Deactivate or activate the edition of the cells in the column.
Parameters:
{Boolean} boolean_editable
true to activate the edition, false otherwise

setLabel(string_label)
Set the label of the column.
Parameters:
{String} string_label
The column label to set

setMaxWidth(int_width)
Set the maximum width of the column in the table.
Parameters:
{Integer} int_width
The maximum width to set

setMinWidth(int_width)
Set the minimum width of the column in the table.
Parameters:
{Integer} int_width
The minimum width to set

setModelIndex(int_index)
Set the model index.
Parameters:
{Integer} int_index
The model index to set

setPreferredWidth(int_preferredWidth)
Set the preferred width of the column in the table.
Parameters:
{Integer} int_preferredWidth
The preferred width to set

setResizable(boolean_resizable)
Make this column resizable
Parameters:
{Boolean} boolean_resizable
true to make this column resizable, false otherwise

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