Class Index | File Index

Classes


Class zwt.ui.table.RowSelectionModel


Extends zwt.ui.table.TableSelectionModel.

This class represents the current state of the selection for a Table. The selection is modeled as an array of rows.

This implementation is used to enable row selection in a Table.


Defined in: RowSelectionModel.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Construct a row selection model.
Method Summary
Method Attributes Method Name and Description
 
addSelection(array_cells, boolean_exclusive)
Add the set of rows in the specified array of cells to the selection.
 
Change the selection to the empty set.
 
Return the selected rows.
 
isRowSelected(int_rowIndex)
Return true if the specified row is selected.
 
removeSelection(array_cells)
Remove the set of rows in the specified array of cells from the selection.
 
setSelection(array_cells, boolean_exclusive)
Change the selection to be the set of rows in the specified array of cells.
 
shiftRows(array_rows, boolean_remove)
Shift the row indices of current selection.
Methods borrowed from class zwt.ui.table.TableSelectionModel:
getTableSelectionModelEventManager, isCellSelected, isColumnSelected, isSelectable, onEvent
Class Detail
zwt.ui.table.RowSelectionModel()
Construct a row selection model.
Author: Jeremy KUHN.
See:
zwt.ui.table.TableSelectionModel
Method Detail
addSelection(array_cells, boolean_exclusive)
Add the set of rows in the specified array of cells to the selection.

If this selection is exclusive, then the intersection of the current selection and the new rows in the array of cells is removed from the selection.

If this represents a change to the current selection then an event is emitted to notify the change.

Parameters:
{Integer[][]} array_cells
An array of cells
{Boolean} boolean_exclusive
If true, the selection is exclusive

clearSelection()
Change the selection to the empty set.

If this represents a change to the current selection then an event is emitted to notify the change.


{Integer[]} getSelectedRows()
Return the selected rows.
Returns:
The selected rows

isRowSelected(int_rowIndex)
Return true if the specified row is selected.
Parameters:
{Integer} int_rowIndex
The index of the row in the data model

removeSelection(array_cells)
Remove the set of rows in the specified array of cells from the selection.

If this represents a change to the current selection then an event is emitted to notify the change.

Parameters:
{Integer[][]} array_cells
An array of cells

setSelection(array_cells, boolean_exclusive)
Change the selection to be the set of rows in the specified array of cells.

If this selection is exclusive, then the intersection of the current selection and the new rows is removed from the selection.

If this represents a change to the current selection then an event is emitted to notify the change.

Parameters:
{Integer[][]} array_cells
An array of cells
{Boolean} boolean_exclusive
If true, the selection is exclusive

shiftRows(array_rows, boolean_remove)
Shift the row indices of current selection.

This method is called to sync the selection model with a corresponding change in the data model.

Parameters:
{Integer[]} array_rows
the list of rows (indices) to consider for the shift
{Boolean} boolean_remove
If true, remove from the row indices, otherwise add to the row indices

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