BiTreeViewSelectionModel
Selection model for BiTreeView.
The selection model can operate in 2 modes: cell or row.
The selected cells/rows are identified by the row index/column index in the
data model.
The items in the selectedItems hash are of type BiTreeViewSelectionModelItem
This class extends
BiSelectionModel
and therefore all methods and fields available for
BiSelectionModel
are also available for
BiTreeViewSelectionModel
.
Constructor
new
BiTreeViewSelectionModel
(
oOwner
)
Parameters
| Name | Type | Optional | Default | Descripton |
oOwner |
|
The tree view that the selection is working with |
Properties
| Name | Type | get | set | Descripton |
dataModel |
|
![]() |
The view manager used with the tree view | |
selectionMode |
String |
![]() |
![]() |
Whether to use row selection or cell selection. Valid values are "row" and "cell" |
viewManager |
|
![]() |
The view manager used with the tree view |
Methods
| Name | Description |
adjustSelection |
This method is called before items are inserted/removed into/from the data model so that the selected rows can be updated. If nCount is negative nRow to nRow - nCount -1 are removed. If nCount is positive nCount rows are added at nRow |
containsSelectedNodes |
Checks whether the item has any selected descendants |
getCellIsAnchor |
Returns whether the cell at (x, y) is the anchor item |
getCellIsLead |
Returns whether the cell at (x, y) is the lead item |
getCellSelected |
Returns whether the cell at (x, y) is selected |
getRowIsLead |
Returns whether the row at y is the lead item |
getRowSelected |
Returns whether the row at y is selected |
setCellSelected |
Sets the selected state for the cell at x, y |
setRowSelected |
Sets the selected state for the row at y |
Events
None.
Static Methods
None.
Static Fields
None.
Remarks
Method Details
adjustSelection
This method is called before items are inserted/removed into/from the data model so that the selected rows can be updated. If nCount is negative nRow to nRow - nCount -1 are removed. If nCount is positive nCount rows are added at nRow
Syntax
object.adjustSelection ( nRow,nCount )
Parameters
| Name | Type | Optional | Default | Descripton |
nRow |
Number |
The index of the row where the change starts | ||
nCount |
Number |
The number of rows added (use negative numbers when removing) |
Return Type
void
containsSelectedNodes
Checks whether the item has any selected descendants
Syntax
object.containsSelectedNodes
(
oItem
)
Parameters
| Name | Type | Optional | Default | Descripton |
oItem |
|
The item of the check the descendants for |
Return Type
Boolean
getCellIsAnchor
Returns whether the cell at (x, y) is the anchor item
Syntax
object.getCellIsAnchor ( x,y )
Parameters
| Name | Type | Optional | Default | Descripton |
x |
Number |
The column index of the cell to check | ||
y |
Number |
The row index of the cell to check |
Return Type
Boolean
getCellIsLead
Returns whether the cell at (x, y) is the lead item
Syntax
object.getCellIsLead ( x,y )
Parameters
| Name | Type | Optional | Default | Descripton |
x |
Number |
The column index of the cell to check | ||
y |
Number |
The row index of the cell to check |
Return Type
Boolean
getCellSelected
Returns whether the cell at (x, y) is selected
Syntax
object.getCellSelected ( x,y )
Parameters
| Name | Type | Optional | Default | Descripton |
x |
Number |
The column index of the cell to check | ||
y |
Number |
The row index of the cell to check |
Return Type
Boolean
getRowIsLead
Returns whether the row at y is the lead item
Syntax
object.getRowIsLead
(
y
)
Parameters
| Name | Type | Optional | Default | Descripton |
y |
Number |
The index of the row to check |
Return Type
Boolean
getRowSelected
Returns whether the row at y is selected
Syntax
object.getRowSelected
(
y
)
Parameters
| Name | Type | Optional | Default | Descripton |
y |
Number |
The index of the row to check |
Return Type
Boolean
setCellSelected
Sets the selected state for the cell at x, y
Syntax
object.setCellSelected ( x,y,b )
Parameters
| Name | Type | Optional | Default | Descripton |
x |
Number |
The column index of the cell to select or deselect | ||
y |
Number |
The row index of the cell to select or deselect | ||
b |
Boolean |
Whether to select or deselect the cell |
Return Type
void
setRowSelected
Sets the selected state for the row at y
Syntax
object.setRowSelected ( y,b )
Parameters
| Name | Type | Optional | Default | Descripton |
y |
Number |
The index of the row to select or deselect | ||
b |
Boolean |
Whether to select or deselect the row |
Return Type
void
