?? bitreenode.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>BiTreeNode</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="BiTreeNode">BiTreeNode</h1>
<p>
This represents a tree node for a <code><a href="BiTree.html">tree</a></code> or a
row for a <code><a href="BiTree.html">tree</a></code>. A tree node is not a component
but it has some visual properties that are similar to a
<code><a href="BiComponent.html">component</a></code>.<br>
<br>
When working with trees and column list it is usually suitable to extend
this class instead of using it directly because this gives better control
over what data is bound to the node and what text to show on the row.
</p>
<p>This class extends
<code><a href="BiAbstractGridRow.html">BiAbstractGridRow</a></code>
and therefore all methods and fields available for
<code><a href="BiAbstractGridRow.html">BiAbstractGridRow</a></code>
are also available for <code>BiTreeNode</code>.</p>
<ul class="partial-class-tree">
<li><code><a href="BiObject.html">BiObject</a></code><ul>
<li><code><a href="BiAbstractGridRow.html">BiAbstractGridRow</a></code><ul><li><code>BiTreeNode</code><ul id="api-derived-classes"></ul></li></ul></li></ul>
</li>
</ul>
<h2>Constructor</h2>
<p><code>
new BiTreeNode(<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>
This is an array containing the data to be used for each column.
</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="cssClassName"></a><code>cssClassName</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the CSS class name used for the row of the node.
</td>
</tr>
<tr>
<td><a name="depth"></a><code>depth</code></td>
<td><code class="type">Number</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>The depth of the tree</td>
</tr>
<tr>
<td><a name="expanded"></a><code>expanded</code></td>
<td><code class="type">Boolean</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>
Whether the node is expanded or not.
</td>
</tr>
<tr>
<td><a name="expandIconHtml"></a><code>expandIconHtml</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the HTML used to draw the expand icon.
</td>
</tr>
<tr>
<td><a name="expandIconSrc"></a><code>expandIconSrc</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the URI to the image file that should be used for the
expand icon.
</td>
</tr>
<tr>
<td><a name="firstNode"></a><code>firstNode</code></td>
<td><code class="type"><code><a href="BiTreeNode.html">BiTreeNode</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the first child node.
</td>
</tr>
<tr>
<td><a name="html"></a><code>html</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the HTML for the node and all its children. This is used
by the <code><a href="BiTree.html#treeBodyHtml">BiTree treeBodyHtml
property</a></code> when drawing the tree.
</td>
</tr>
<tr>
<td><a name="iconHtml"></a><code>iconHtml</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the HTML used to draw the icon.
</td>
</tr>
<tr>
<td><a name="lastNode"></a><code>lastNode</code></td>
<td><code class="type"><code><a href="BiTreeNode.html">BiTreeNode</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the last child node.
</td>
</tr>
<tr>
<td><a name="level"></a><code>level</code></td>
<td><code class="type">Number</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>The level of indention
for the tree. This is -1 for the actual tree</td>
</tr>
<tr>
<td><a name="nextSiblingNode"></a><code>nextSiblingNode</code></td>
<td><code class="type"><code><a href="BiTreeNode.html">BiTreeNode</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the next tree node sibling. This is <code>null</code>
for the actual tree control.
</td>
</tr>
<tr>
<td><a name="nodes"></a><code>nodes</code></td>
<td><code class="type"><code><a href="BiTreeNode.html">BiTreeNode[]</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns all the child nodes.
</td>
</tr>
<tr>
<td><a name="parentNode"></a><code>parentNode</code></td>
<td><code class="type"><code><a href="BiTreeNode.html">BiTreeNode</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the parent tree node. This is <code>null</code>
for the actual tree control.
</td>
</tr>
<tr>
<td><a name="previousSiblingNode"></a><code>previousSiblingNode</code></td>
<td><code class="type"><code><a href="BiTreeNode.html">BiTreeNode</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the previous tree node sibling. This is <code>null</code>
for the actual tree control.
</td>
</tr>
<tr>
<td><a name="rowHtml"></a><code>rowHtml</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the HTML for the row of the node. This does not include
any of the child nodes for the tree node.
</td>
</tr>
<tr>
<td><a name="tree"></a><code>tree</code></td>
<td><code class="type"><code><a href="BiTree.html">BiTree</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the top level tree control used for the tree
</td>
</tr>
</tbody>
</table>
<h2>Methods</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="#addNode">addNode</a></code></td>
<td>Adds a tre node as a child to the current tree node</td>
</tr>
<tr>
<td><code><a href="#containsNode">containsNode</a></code></td>
<td>Whether the tree node contains another node</td>
</tr>
<tr>
<td><code><a href="#getCellHtml">getCellHtml</a></code></td>
<td>
Returns the HTML for the entire cell (includes indention, expand icon and icon)
</td>
</tr>
<tr>
<td><code><a href="#getData">getData</a></code></td>
<td>
Returns the data for the given column.
</td>
</tr>
<tr>
<td><code><a href="#getLabelHtml">getLabelHtml</a></code></td>
<td>
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>
</td>
</tr>
<tr>
<td><code><a href="#hasNodes">hasNodes</a></code></td>
<td>Returns true if the tree node has any child nodes</td>
</tr>
<tr>
<td><code><a href="#isLastSiblingNode">isLastSiblingNode</a></code></td>
<td>
Returns true if the node has no next sibling node.
</td>
</tr>
<tr>
<td><code><a href="#isLeaf">isLeaf</a></code></td>
<td>Returns true if the tree node has no child nodes</td>
</tr>
<tr>
<td><code><a href="#removeNode">removeNode</a></code></td>
<td>Removes a tre node child</td>
</tr>
<tr>
<td><code><a href="#reveal">reveal</a></code></td>
<td>Expands all parent tree nodes to make this node visible</td>
</tr>
<tr>
<td><code><a href="#setData">setData</a></code></td>
<td>
Sets the data for the given column
</td>
</tr>
<tr>
<td><code><a href="#toggle">toggle</a></code></td>
<td>Toggles the expand property</td>
</tr>
<tr>
<td><code><a href="#update">update</a></code></td>
<td>
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.
</td>
</tr>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -