?? bitreehelper.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>BiTreeHelper</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="BiTreeHelper">BiTreeHelper</h1>
<p>
This class contains some static methods that are usufull when working
with trees.
</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>BiTreeHelper</code>.</p>
<ul class="partial-class-tree">
<li><code><a href="BiObject.html">BiObject</a></code><ul>
<li><code>BiTreeHelper</code><ul id="api-derived-classes"></ul></li></ul>
</li>
</ul>
<h2>Constructor</h2>
<p><code>
new BiTreeHelper()</code></p>
<h3>Parameters</h3>
<p>No parameters.</p>
<h2>Properties</h2>
<p>None.</p>
<h2>Methods</h2>
<p>None.</p>
<h2>Events</h2>
<p>None.</p>
<h2>Static Methods</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="#getLastShownDescendant">getLastShownDescendant</a></code></td>
<td>Returns the last shown node in the sub tree of the node</td>
</tr>
<tr>
<td><code><a href="#getNextShownNode">getNextShownNode</a></code></td>
<td>
Returns the next shown node. This is the next node in the
preorder traversal. This can also be seen as the next row.
</td>
</tr>
<tr>
<td><code><a href="#getPreorderShownNodes">getPreorderShownNodes</a></code></td>
<td>
Returns all shown descendants in preorder. This mean that they are
ordered in the same order as the rows are shown. (Document order)
</td>
</tr>
<tr>
<td><code><a href="#getPreviousShownNode">getPreviousShownNode</a></code></td>
<td>
Returns the previous shown node. This is the previous node in the
preorder traversal. This can also be seen as the previous row.
</td>
</tr>
<tr>
<td><code><a href="#isBefore">isBefore</a></code></td>
<td>
Returns whether the first node comes before the second node. This
is done using preorder. This means a node comes before another node
if its row is displayed above the others in the visual tree. A node
is not before itself.
</td>
</tr>
</tbody>
</table>
<h2>Static Fields</h2>
<p>None.</p>
<h2>Remarks</h2>
<p>
All the methods that contain "shown" operates on the visual state of
the tree. This means that a node with children that is collapsed is
seen as a leaf.
</p>
<h2>Static Method Details</h2>
<h3><a name="getLastShownDescendant"></a>getLastShownDescendant</h3>
<p>Returns the last shown node in the sub tree of the node</p>
<h4>Syntax</h4>
<pre class="method-syntax">BiTreeHelper.getLastShownDescendant(<span class="methodArgument">oNode</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>oNode</code></td>
<td><code class="type"><code><a href="BiTreeNode.html">BiTreeNode</a></code>/<code><a href="BiTree.html">BiTree</a></code></code></td>
<td class="optional-column"></td>
<td></td>
<td>The node to get the last shown descendant for</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="getNextShownNode"></a>getNextShownNode</h3>
<p>
Returns the next shown node. This is the next node in the
preorder traversal. This can also be seen as the next row.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">BiTreeHelper.getNextShownNode(<span class="methodArgument">oNode</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>oNode</code></td>
<td><code class="type"><code><a href="BiTreeNode.html">BiTreeNode</a></code>/<code><a href="BiTree.html">BiTree</a></code></code></td>
<td class="optional-column"></td>
<td></td>
<td>The node to get the next shown node after</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="getPreorderShownNodes"></a>getPreorderShownNodes</h3>
<p>
Returns all shown descendants in preorder. This mean that they are
ordered in the same order as the rows are shown. (Document order)
</p>
<h4>Syntax</h4>
<pre class="method-syntax">BiTreeHelper.getPreorderShownNodes(<span class="methodArgument">oNode</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>oNode</code></td>
<td><code class="type"><code><a href="BiTreeNode.html">BiTreeNode</a></code>/<code><a href="BiTree.html">BiTree</a></code></code></td>
<td class="optional-column"></td>
<td></td>
<td>The node to get the descendants of</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="getPreviousShownNode"></a>getPreviousShownNode</h3>
<p>
Returns the previous shown node. This is the previous node in the
preorder traversal. This can also be seen as the previous row.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">BiTreeHelper.getPreviousShownNode(<span class="methodArgument">oNode</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>oNode</code></td>
<td><code class="type"><code><a href="BiTreeNode.html">BiTreeNode</a></code>/<code><a href="BiTree.html">BiTree</a></code></code></td>
<td class="optional-column"></td>
<td></td>
<td>The node to get the previous shown node before</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="isBefore"></a>isBefore</h3>
<p>
Returns whether the first node comes before the second node. This
is done using preorder. This means a node comes before another node
if its row is displayed above the others in the visual tree. A node
is not before itself.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">BiTreeHelper.isBefore(<span class="methodArgument">oNode1</span>, <span class="methodArgument">oNode2</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>oNode1</code></td>
<td><code class="type"><code><a href="BiTreeNode.html">BiTreeNode</a></code>/<code><a href="BiTree.html">BiTree</a></code></code></td>
<td class="optional-column"></td>
<td></td>
<td>The node to see if it comes first</td>
</tr>
<tr>
<td><code>oNode2</code></td>
<td><code class="type"><code><a href="BiTreeNode.html">BiTreeNode</a></code>/<code><a href="BiTree.html">BiTree</a></code></code></td>
<td class="optional-column"></td>
<td></td>
<td>The node to see if it comes last</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Boolean</code></p>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -