?? bitreenode2.html
字號:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><!--
Generated using api.website.xsl version 2003-07-17
-->
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>BiTreeNode2</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link type="text/css" rel="stylesheet" href="api.css"><script type="text/javascript">
function showDerivedClasses() {
var ul = document.getElementById("api-derived-classes");
var lis = ul.childNodes;
var l = lis.length;
for (var i = 1; i < l; i++)
lis[i].style.display = "";
lis[0].style.display = "none";
}
</script></head>
<body>
<h1 id="BiTreeNode2">BiTreeNode2</h1>
<p>This class is used to build up the tree for the tree model to use
with the <code><a href="BiTreeView.html">BiTreeView</a></code> and <code><a href="BiTreeModel.html">BiTreeModel</a></code>
</p>
<p>This class extends
<code><a href="BiObject.html">BiObject</a></code>
and therefore all methods and fields available for
<code><a href="BiObject.html">BiObject</a></code>
are also available for <code>BiTreeNode2</code>.</p>
<ul class="partial-class-tree">
<li><code><a href="BiObject.html">BiObject</a></code><ul>
<li><code>BiTreeNode2</code><ul id="api-derived-classes"></ul></li></ul>
</li>
</ul>
<h2>Constructor</h2>
<p><code>
new BiTreeNode2(<span class="methodArgument">oData</span>)</code></p>
<h3>Parameters</h3>
<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>oData</code></td>
<td><code class="type">Object</code></td>
<td class="optional-column"></td>
<td></td>
<td>The data to associate with the node</td>
</tr>
</tbody>
</table>
<h2>Properties</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="get-header">get</td>
<td class="set-header">set</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><a name="children"></a><code>children</code></td>
<td><code class="type">
<code><a href="BiTreeNode2.html">BiTreeNode2[]</a></code>
</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>The child nodes of the tree node</td>
</tr>
<tr>
<td><a name="data"></a><code>data</code></td>
<td><code class="type">Object[]</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"><img src="check.png" alt="checked"></td>
<td>The data that is associated to the node</td>
</tr>
<tr>
<td><a name="hasChildren"></a><code>hasChildren</code></td>
<td><code class="type">Boolean</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>whether the tree node has any children</td>
</tr>
<tr>
<td><a name="parent"></a><code>parent</code></td>
<td><code class="type">
<code><a href="BiTreeNode2.html">BiTreeNode2</a></code>
</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>The parent tree node</td>
</tr>
</tbody>
</table>
<h2>Methods</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="#add">add</a></code></td>
<td>Adds a child node to the current node</td>
</tr>
<tr>
<td><code><a href="#remove">remove</a></code></td>
<td>Removes a child node from the current node</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>None.</p>
<h2>Method Details</h2>
<h3><a name="add"></a>add</h3>
<p>Adds a child node to the current node</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.add(<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="BiTreeNode2.html">BiTreeNode2</a></code>
</code></td>
<td class="optional-column"></td>
<td></td>
<td>The node to add</td>
</tr>
<tr>
<td><code>oBefore</code></td>
<td><code class="type">
<code><a href="BiTreeNode2.html">BiTreeNode2</a></code>
</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td></td>
<td>Optional argument that gives the child that the new child should be added before</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="remove"></a>remove</h3>
<p>Removes a child node from the current node</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.remove(<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="BiTreeNode2.html">BiTreeNode2</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="BiTreeNode2.html">BiTreeNode2</a></code>
</code></p>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -