bitreenode.html
来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· HTML 代码 · 共 630 行 · 第 1/2 页
HTML
630 行
<h4>Syntax</h4><pre class="method-syntax">object.addNode(<span class="methodArgument">oChild</span> [, <span class="methodArgument">oBefore</span>])</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>oChild</code></td><td><code class="type"> <code><a href="BiTreeNode.html">BiTreeNode</a></code> </code></td><td class="optional-column"></td><td></td><td>The tree node child to add</td></tr><tr><td><code>oBefore</code></td><td><code class="type"> <code><a href="BiTreeNode.html">BiTreeNode</a></code> </code></td><td class="optional-column"><img src="check.png" alt="checked"></td><td></td><td>If provided, the child is added before this node </td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="containsNode"></a>containsNode</h3><p>Whether the tree node contains another node</p><h4>Syntax</h4><pre class="method-syntax">object.containsNode(<span class="methodArgument">oDescendant</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>oDescendant</code></td><td><code class="type"> <code><a href="BiTreeNode.html">BiTreeNode</a></code> </code></td><td class="optional-column"></td><td></td><td>The node to test if it is contained</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="getCellHtml"></a>getCellHtml</h3><p>Returns the HTML for the entire cell (includes indention, expand icon and icon)</p><h4>Syntax</h4><pre class="method-syntax">object.getCellHtml(<span class="methodArgument">nCol</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>nCol</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The column to get the cell HTML for</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">String</code></p><h3><a name="getData"></a>getData</h3><p>Returns the data for the given column index</p><h4>Syntax</h4><pre class="method-syntax">object.getData(<span class="methodArgument">x</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>x</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The column index of the column to get the data for</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Object</code></p><h3><a name="getLabelHtml"></a>getLabelHtml</h3><p>Returns the actual HTML to show on the cell. Override this to handle specific data. The default implementation uses <code>String(treeNode.getData(nCol))</code> </p><h4>Syntax</h4><pre class="method-syntax">object.getLabelHtml(<span class="methodArgument">nCol</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>nCol</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The column to get the label html for</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">String</code></p><h3><a name="hasNodes"></a>hasNodes</h3><p>Returns true if the tree node has any child nodes</p><h4>Syntax</h4><pre class="method-syntax">object.hasNodes()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="isLastSiblingNode"></a>isLastSiblingNode</h3><p>Returns true if the node has no next sibling node.</p><h4>Syntax</h4><pre class="method-syntax">object.isLastSiblingNode()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="isLeaf"></a>isLeaf</h3><p>Returns true if the tree node has no child nodes</p><h4>Syntax</h4><pre class="method-syntax">object.isLeaf()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="removeAll"></a>removeAll</h3><p>Removes all child nodes (and disposes them)</p><h4>Syntax</h4><pre class="method-syntax">object.removeAll()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="removeNode"></a>removeNode</h3><p>Removes a tree node child</p><h4>Syntax</h4><pre class="method-syntax">object.removeNode(<span class="methodArgument">oChild</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>oChild</code></td><td><code class="type"> <code><a href="BiTreeNode.html">BiTreeNode</a></code> </code></td><td class="optional-column"></td><td></td><td>The node to remove</td></tr></tbody></table><h4>Return Type</h4><p><code class="type"> <code><a href="BiTreeNode.html">BiTreeNode</a></code> </code></p><h3><a name="removeNodeAt"></a>removeNodeAt</h3><p>Removes the tree node child at the given index</p><h4>Syntax</h4><pre class="method-syntax">object.removeNodeAt(<span class="methodArgument">i</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>i</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The index of the node to remove</td></tr></tbody></table><h4>Return Type</h4><p><code class="type"> <code><a href="BiTreeNode.html">BiTreeNode</a></code> </code></p><h3><a name="reveal"></a>reveal</h3><p>Expands all parent tree nodes to make this node visible</p><h4>Syntax</h4><pre class="method-syntax">object.reveal()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="setData"></a>setData</h3><p>Sets the data for a given column index</p><h4>Syntax</h4><pre class="method-syntax">object.setData(<span class="methodArgument">x</span>, <span class="methodArgument">oData</span>)</pre><h4>Parameters</h4><table><thead><tr><td>Name</td><td>Type</td><td class="optional-header">Optional</td><td>Default</td><td>Descripton</td></tr></thead><tbody><tr><td><code>x</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The index of the column to set the data for</td></tr><tr><td><code>oData</code></td><td><code class="type">Object</code></td><td class="optional-column"></td><td></td><td>The data to set on the given column</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="toggle"></a>toggle</h3><p>Toggles the expand property</p><h4>Syntax</h4><pre class="method-syntax">object.toggle()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="update"></a>update</h3><p>Updates the node and all of its children. This allows the tree to redraw only the current branch of the tree. This is useful when only a few items have changed and therefore the whole data of the tree does not need to be redrawn.</p><h4>Syntax</h4><pre class="method-syntax">object.update()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="updateRow"></a>updateRow</h3><p>Updates the row of the tree node. This allows the tree to redraw only the current tree item row (the children are not redrawn). This is useful when only a few items have changed and therefore the whole data of the tree does not need to be redrawn.</p><h4>Syntax</h4><pre class="method-syntax">object.updateRow()</pre><h4>Parameters</h4><p>No arguments.</p><h4>Return Type</h4><p><code class="type">void</code></p></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?