BiSingleTreeNode

This class is used as the data for rows in the BiTree2 component

This class extends BiObject and therefore all methods and fields available for BiObject are also available for BiSingleTreeNode .

Constructor

new BiSingleTreeNode ( oData )

Parameters

NameTypeOptionalDefaultDescripton
oDataObjectOptional object containing the data for the cell

Properties

NameTypegetsetDescripton
dataObjectcheckedcheckedData to display for the node
depthNumbercheckedReturns the depth of the node
expandedBooleancheckedWhether the node is expanded
expandedIconStringcheckedcheckedIcon to show for an expanded node
firstNodeBiSingleTreeNodecheckedReturns the first child node
iconStringcheckedcheckedUri of image icon. Used for collapsed/leaf nodes and expanded nodes without expandedIcon set.
labelHtmlStringcheckedReturns the HTML string that should be displayed for the node
lastNodeBiSingleTreeNodecheckedReturns the last child node
leadBooleancheckedcheckedWhether the node is the lead item
levelNumbercheckedReturns the indent level of this node
nextSiblingNodeBiSingleTreeNodecheckedReturns the next sibiling (if any)
nodesBiSingleTreeNode[]checkedThe nodes that are children to the current node
parentNodeBiSingleTreeNodecheckedThe parent tree node
previousSiblingNodeBiSingleTreeNodecheckedReturns the previous sibling (if any)
selectedBooleancheckedcheckedWhether the node is selected
treeBiSingleTreecheckedThe BSingleTree the node is part of

Methods

NameDescription
addNodeAdds a node to the tree
containsNodeReturns whether this node contains a supplied node.
hasNodesReturns whether the node has any child nodes
isLastSiblingNodeReturns whether the node is the last sibling
isLeafReturns whether the node is a leaf node.
removeAllThis removes and disposes all the nodes
removeNodeRemoves a node item from the tree
revealExpands parent nodes so that this node becomes visible

Events

None.

Static Methods

None.

Static Fields

None.

Remarks

None.

Method Details

addNode

Adds a node to the tree

Syntax

object.addNode ( oChild [ ,oBefore ] )

Parameters

NameTypeOptionalDefaultDescripton
oChildBiSingleTreeNodeThe node to add to the tree
oBeforeBiSingleTreeNodecheckedOptional argument telling what node to insert before

Return Type

void

containsNode

Returns whether this node contains a supplied node.

Syntax

object.containsNode ( oNode )

Parameters

NameTypeOptionalDefaultDescripton
oNodeBiSingleTreeNodeNode to check

Return Type

Boolean

hasNodes

Returns whether the node has any child nodes

Syntax

object.hasNodes ( )

Parameters

No arguments.

Return Type

Boolean

isLastSiblingNode

Returns whether the node is the last sibling

Syntax

object.isLastSiblingNode ( )

Parameters

No arguments.

Return Type

Boolean

isLeaf

Returns whether the node is a leaf node.

Syntax

object.isLeaf ( )

Parameters

No arguments.

Return Type

Boolean

removeAll

This removes and disposes all the nodes

Syntax

object.removeAll ( )

Parameters

No arguments.

Return Type

void

removeNode

Removes a node item from the tree

Syntax

object.removeNode ( oChild )

Parameters

NameTypeOptionalDefaultDescripton
oChildBiSintleTreeNodeThe node to remove

Return Type

void

reveal

Expands parent nodes so that this node becomes visible

Syntax

object.reveal ( [ bNoUpdate ] )

Parameters

NameTypeOptionalDefaultDescripton
bNoUpdateBooleancheckedWhether to not update the tree.

Return Type

void