⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bitreenode.html

📁 在流览器上仿CS界面的JAVASCRIPT脚本
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<tr>
<td><code><a href="#updateRow">updateRow</a></code></td>
<td>
				Updates the row of the tree node. This allows the tree to redraw
				only teh 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.
			</td>
</tr>
</tbody>
</table>
<h2>Events</h2>
<p>None.</p>
<h2>Static Methods</h2>
<p>None.</p>
<h2>Static Fields</h2>
<p>None.</p>
<h2>Remarks</h2>
<p>
		Changing the node does not automatically update the tree. The
		<code><a href="BiTree.html">tree</a></code> will have to be updated manually.
	</p>
<h2>Method Details</h2>
<h3><a name="addNode"></a>addNode</h3>
<p>Adds a tre node as a child to the current tree node</p>
<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.
			</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getData(<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 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="removeNode"></a>removeNode</h3>
<p>Removes a tre 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="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 the given column
			</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.setData(<span class="methodArgument">nCol</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>nCol</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"></td>
<td></td>
<td>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</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 teh 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -