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

NameTypeOptionalDefaultDescripton
oOwnerBiTreeViewThe tree view that the selection is working with

Properties

NameTypegetsetDescripton
dataModelBiTreeViewDataModelcheckedThe view manager used with the tree view
selectionModeStringcheckedcheckedWhether to use row selection or cell selection. Valid values are "row" and "cell"
viewManagerBiTreeViewViewManagercheckedThe view manager used with the tree view

Methods

NameDescription
adjustSelectionThis 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
containsSelectedNodesChecks whether the item has any selected descendants
getCellIsAnchorReturns whether the cell at (x, y) is the anchor item
getCellIsLeadReturns whether the cell at (x, y) is the lead item
getCellSelectedReturns whether the cell at (x, y) is selected
getRowIsLeadReturns whether the row at y is the lead item
getRowSelectedReturns whether the row at y is selected
setCellSelectedSets the selected state for the cell at x, y
setRowSelectedSets the selected state for the row at y

Events

None.

Static Methods

None.

Static Fields

None.

Remarks

None.

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

NameTypeOptionalDefaultDescripton
nRowNumberThe index of the row where the change starts
nCountNumberThe 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

NameTypeOptionalDefaultDescripton
oItemBiTreeViewSelectionModelItemThe 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

NameTypeOptionalDefaultDescripton
xNumberThe column index of the cell to check
yNumberThe 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

NameTypeOptionalDefaultDescripton
xNumberThe column index of the cell to check
yNumberThe 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

NameTypeOptionalDefaultDescripton
xNumberThe column index of the cell to check
yNumberThe 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

NameTypeOptionalDefaultDescripton
yNumberThe index of the row to check

Return Type

Boolean

getRowSelected

Returns whether the row at y is selected

Syntax

object.getRowSelected ( y )

Parameters

NameTypeOptionalDefaultDescripton
yNumberThe 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

NameTypeOptionalDefaultDescripton
xNumberThe column index of the cell to select or deselect
yNumberThe row index of the cell to select or deselect
bBooleanWhether 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

NameTypeOptionalDefaultDescripton
yNumberThe index of the row to select or deselect
bBooleanWhether to select or deselect the row

Return Type

void