bitree.xml

来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· XML 代码 · 共 286 行

XML
286
字号
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="api.xsl"?><class name="BiTree" extends="BiAbstractGrid">	<description>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</description>	<arguments>	</arguments>	<staticMethods>	</staticMethods>	<staticFields>	</staticFields>	<methods>		<method name="addNode">			<description>Adds a tree node as a child to the tree</description>			<arguments>				<argument name="oChild">					<description>The tree node child to add</description>					<type>						<link class="BiTreeNode">BiTreeNode</link>					</type>				</argument>				<argument name="oBefore" optional="true">					<description>If provided, the child is added before this node </description>					<type>						<link class="BiTreeNode">BiTreeNode</link>					</type>				</argument>			</arguments>			<returns>				<type>void</type>			</returns>		</method>		<method name="removeNode">			<description>Removes a tree node child</description>			<arguments>				<argument name="oChild">					<description>The node to remove</description>					<type>						<link class="BiTreeNode">BiTreeNode</link>					</type>				</argument>			</arguments>			<returns>				<type>					<link class="BiTreeNode">BiTreeNode</link>				</type>			</returns>		</method>		<method name="containsNode">			<description>Whether the tree contains the node</description>			<arguments>				<argument name="oDescendant">					<description>The node to test if it is contained</description>					<type>						<link class="BiTreeNode">BiTreeNode</link>					</type>				</argument>			</arguments>			<returns>				<type>Boolean</type>			</returns>		</method>		<method name="hasNodes">			<description>Returns true if the tree has any child nodes</description>			<arguments>			</arguments>			<returns>				<type>Boolean</type>			</returns>		</method>		<method name="isLeaf">			<description>Returns true if the tree has no child nodes</description>			<arguments>			</arguments>			<returns>				<type>Boolean</type>			</returns>		</method>		<method name="isLastSiblingNode">			<description>Returns true if the node has no next sibling node. This is always true for the tree component.</description>			<arguments>			</arguments>			<returns>				<type>Boolean</type>			</returns>		</method>		<method name="removeAll">			<description>Removes all child nodes (and disposes them)</description>			<arguments>			</arguments>			<returns>				<type>void</type>			</returns>		</method>		<method name="reveal">			<description>Expands all parent tree nodes to make this item visible This doesn't really do anything for<link class="BiTree">BiTree</link> but it is provided to have the same interface as<link class="BiTreeNode">BiTreeNode</link>			</description>			<arguments>			</arguments>			<returns>				<type>void</type>			</returns>		</method>		<method name="getRowAtPoint">			<description>Returns the row at the given point. If no node is found this returns null. This is the same as <link>getNodeAtPoint</link>			</description>			<arguments>				<argument name="nClientX">					<description>The left position relative to the browser window</description>					<type>Number</type>				</argument>				<argument name="nClientY">					<description>The top position relative to the browser window</description>					<type>Number</type>				</argument>			</arguments>			<returns>				<type>					<link class="BiTreeNode">BiTreeNode</link>				</type>			</returns>		</method>		<method name="getNodeAtPoint">			<description>Returns the tree node at the given point. If no node is found this returns null.</description>			<arguments>				<argument name="nClientX">					<description>The left position relative to the browser window</description>					<type>Number</type>				</argument>				<argument name="nClientY">					<description>The top position relative to the browser window</description>					<type>Number</type>				</argument>			</arguments>			<returns>				<type>					<link class="BiTreeNode">BiTreeNode</link>				</type>			</returns>		</method>	</methods>	<properties>		<property name="indentWidth" get="true" set="true">			<description>The amount to indent child nodes</description>			<type>Number</type>		</property>		<property name="showPlusMinus" get="true" set="true">			<description>Whether to show the expand and collapse icons</description>			<type>Boolean</type>		</property>		<property name="showRootLines" get="true" set="true">			<description>Whether to show lines on the top most level</description>			<type>Boolean</type>		</property>		<property name="level" get="true">			<description>The level of indention for the tree. This is -1 for the actual tree</description>			<type>Number</type>		</property>		<property name="firstNode" get="true">			<description>Returns the first child node.</description>			<type>				<link class="BiTreeNode">BiTreeNode</link>			</type>		</property>		<property name="lastNode" get="true">			<description>Returns the last child node.</description>			<type>				<link class="BiTreeNode">BiTreeNode</link>			</type>		</property>		<property name="nodes" get="true">			<description>Returns all the child nodes.</description>			<type>				<link class="BiTreeNode">BiTreeNode[]</link>			</type>		</property>		<property name="nextSiblingNode" get="true">			<description>Returns the next tree node sibling. This is <code>null</code> for the actual tree control.</description>			<type>				<link class="BiTreeNode">BiTreeNode</link>			</type>		</property>		<property name="previousSiblingNode" get="true">			<description>Returns the previous tree node sibling. This is <code>null</code> for the actual tree control.</description>			<type>				<link class="BiTreeNode">BiTreeNode</link>			</type>		</property>		<property name="parentNode" get="true">			<description>Returns the parent tree node. This is <code>null</code> for the actual tree control.</description>			<type>				<link class="BiTreeNode">BiTreeNode</link>			</type>		</property>		<property name="indentColumn" get="true" set="true">			<description>The column to indent by. Setting this to -1 (or a value greater than the column count) removes the indentation.</description>			<type>Number</type>		</property>		<property name="showLines" get="true" set="true">			<description>Whether to show the lines in the tree</description>			<type>Boolean</type>		</property>		<property name="depth" get="true">			<description>The depth of the tree</description>			<type>Number</type>		</property>		<property name="expanded" get="true" set="true">			<description>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 <link class="BiTreeNode">tree nodes</link>.</description>			<type>Boolean</type>		</property>	</properties>	<events>		<event name="change">			<description>Fires when the selected row/cell changes</description>			<type>				<link class="BiEvent">BiEvent</link>			</type>		</event>	</events>	<remarks>Before drawing the tree you need to set the <link>columnCount</link>. You 					most likely also want to set the <link>columnWidths</link>, <link>columnSortTypes</link>,                     <link>columnNames</link>, <link>indentColumn</link> and the <link>iconColumn</link>. Below is a                     typical tree:<br>		</br>		<br>		</br>		<code>                     var tree = new<link class="BiTree">BiTree</link>;<br>			</br>                     tree.setColumnCount(3);<br>			</br>                     tree.setColumnWidths([100,50,150]);<br>			</br>			<br>			</br>                     tree.setColumnNames(["Name", "Size", "Date"]);<br>			</br>                     tree.setColumnSortTypes(["CaseInsensitiveString", "Number", "Date"]);<br>			</br>                     tree.setColumnAligns(["left", "right", "left"]);<br>			</br>			<br>			</br>                     tree.setIndentColumn(0);<br>			</br>                     tree.setIconColumn(0);<br>			</br>			<br>			</br>                     // add tree nodes<br>			</br>			<br>			</br>                     parentComponent.add(tree);<br>			</br>                     tree.update();<br>			</br>		</code>		<br>		</br>                     Make sure that the tree is <link class="BiComponent" field="created">created</link>                     when you call the update methods or the they will not do anything. The tree                     must be updated or it will not show the tree body and/or the columns                     correctly.<br>		</br>		<br>		</br>                     You should also be careful not to update the tree when not necessary because                     the update methods are expansive.</remarks></class>

⌨️ 快捷键说明

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