Class zwt.ui.table.CellSelectionModel
Extends
zwt.ui.table.TableSelectionModel.
A cell selection model represents the current state of the selection for a table. The selection is modeled as an array of cells, each cell is an array containing the row index and the column index from the table model.
This implementation is used to enable cell selection in a Table.
Defined in: CellSelectionModel.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Construct a cell selection model.
|
Method Attributes | Method Name and Description |
---|---|
addSelection(array_cells, boolean_exclusive)
Add the specified array of cells to the selection.
|
|
Change the selection to the empty set.
|
|
Return the selected cells.
|
|
isCellSelected(int_rowIndex, int_colIndex)
Return true if the specified cell is selected.
|
|
removeSelection(array_cells)
Remove the specified array of cells from the selection.
|
|
setSelection(array_cells, boolean_exclusive)
Change the selection to be 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, isColumnSelected, isRowSelected, isSelectable, onEvent
Author: Jeremy KUHN.
If this selection is exclusive, then the intersection of the current selection and the specified 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
If this represents a change to the current selection then an event is emitted to notify the change.
- Returns:
- The selected cells
- Parameters:
- {Integer} int_rowIndex
- The index of the row in the data model
- {Integer} int_colIndex
- The index of the column in the data model
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.
If this selection is exclusive, then the intersection of the current selection and the specified 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
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