bitree.html

来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· HTML 代码 · 共 529 行 · 第 1/2 页

HTML
529
字号
<!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>BiTree</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="BiTree">BiTree</h1><p>This class is used for showing a tree, a column list and a combined tree with multiple columns. The control also provides headers that can be used to resize the columns, reorder the columns or sort the data by</p><p>This class extends		<code><a href="BiAbstractGrid.html">BiAbstractGrid</a></code>		and therefore all methods and fields available for		<code><a href="BiAbstractGrid.html">BiAbstractGrid</a></code>		are also available for <code>BiTree</code>.</p><ul class="partial-class-tree"><li><code><a href="BiObject.html">BiObject</a></code><ul><li><code><a href="BiEventTarget.html">BiEventTarget</a></code><ul><li><code><a href="BiComponent.html">BiComponent</a></code><ul><li><code><a href="BiAbstractGrid.html">BiAbstractGrid</a></code><ul><li><code>BiTree</code><ul id="api-derived-classes"></ul></li></ul></li></ul></li></ul></li></ul></li></ul><h2>Constructor</h2><p><code>	new BiTree()</code></p><h3>Parameters</h3><p>No parameters.</p><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="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. The tree control is always expanded so setting this to <code>false</code> has no effect. This is provided so that the tree has the same interface as the <code><a href="BiTreeNode.html">tree nodes</a></code>.</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="indentColumn"></a><code>indentColumn</code></td><td><code class="type">Number</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 column to indent by. Setting this to -1 (or a value greater than the column count) removes the indentation.</td></tr><tr><td><a name="indentWidth"></a><code>indentWidth</code></td><td><code class="type">Number</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 amount to indent child nodes</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="showLines"></a><code>showLines</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 to show the lines in the tree</td></tr><tr><td><a name="showPlusMinus"></a><code>showPlusMinus</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 to show the expand and collapse icons</td></tr><tr><td><a name="showRootLines"></a><code>showRootLines</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 to show lines on the top most level</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 tree node as a child to the tree</td></tr><tr><td><code><a href="#containsNode">containsNode</a></code></td><td>Whether the tree contains the node</td></tr><tr><td><code><a href="#getNodeAtPoint">getNodeAtPoint</a></code></td><td>Returns the tree node at the given point. If no node is found this returns null.</td></tr><tr><td><code><a href="#getRowAtPoint">getRowAtPoint</a></code></td><td>Returns the row at the given point. If no node is found this returns null. This is the same as <code><a href="#getNodeAtPoint">getNodeAtPoint</a></code>			</td></tr><tr><td><code><a href="#hasNodes">hasNodes</a></code></td><td>Returns true if the tree 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. This is always true for the tree component.</td></tr><tr><td><code><a href="#isLeaf">isLeaf</a></code></td><td>Returns true if the tree has no child nodes</td></tr><tr><td><code><a href="#removeAll">removeAll</a></code></td><td>Removes all child nodes (and disposes them)</td></tr><tr><td><code><a href="#removeNode">removeNode</a></code></td><td>Removes a tree node child</td></tr><tr><td><code><a href="#reveal">reveal</a></code></td><td>Expands all parent tree nodes to make this item visible This doesn't really do anything for<code><a href="BiTree.html">BiTree</a></code> but it is provided to have the same interface as<code><a href="BiTreeNode.html">BiTreeNode</a></code>			</td></tr></tbody></table><h2>Events</h2><table><thead><tr><td>Name</td><td>Type</td><td class="bubbles-header">Bubbles</td><td>Descripton</td></tr></thead><tbody><tr><td><a name="change"></a><code>change</code></td><td><code class="type">				<code><a href="BiEvent.html">BiEvent</a></code>			</code></td><td class="bubbles-column"></td><td>Fires when the selected row/cell changes</td></tr></tbody></table><h2>Static Methods</h2><p>None.</p><h2>Static Fields</h2><p>None.</p><h2>Remarks</h2><p>Before drawing the tree you need to set the <code><a href="#columnCount">columnCount</a></code>. You 					most likely also want to set the <code><a href="#columnWidths">columnWidths</a></code>, <code><a href="#columnSortTypes">columnSortTypes</a></code>,                     <code><a href="#columnNames">columnNames</a></code>, <code><a href="#indentColumn">indentColumn</a></code> and the <code><a href="#iconColumn">iconColumn</a></code>. Below is a                     typical tree:<br>				<br>		

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?