bitreeviewselectionmodel.html
来自「ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.」· HTML 代码 · 共 465 行
HTML
465 行
<!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>BiTreeViewSelectionModel</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="BiTreeViewSelectionModel">BiTreeViewSelectionModel</h1><p>Selection model for<code><a href="BiTreeView.html">BiTreeView</a></code>. The selection model can operate in 2 modes: cell or row. The selected cells/rows are identified by the row index/column index in the data model. The items in the selectedItems hash are of type<code><a href="BiTreeViewSelectionModelItem.html">BiTreeViewSelectionModelItem</a></code> </p><p>This class extends <code><a href="BiSelectionModel.html">BiSelectionModel</a></code> and therefore all methods and fields available for <code><a href="BiSelectionModel.html">BiSelectionModel</a></code> are also available for <code>BiTreeViewSelectionModel</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="BiSelectionModel.html">BiSelectionModel</a></code><ul><li><code>BiTreeViewSelectionModel</code><ul id="api-derived-classes"></ul></li></ul></li></ul></li></ul></li></ul><h2>Constructor</h2><p><code> new BiTreeViewSelectionModel(<span class="methodArgument">oOwner</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>oOwner</code></td><td><code class="type"> <code><a href="BiTreeView.html">BiTreeView</a></code> </code></td><td class="optional-column"></td><td></td><td>The tree view that the selection is working with</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="dataModel"></a><code>dataModel</code></td><td><code class="type"> <code><a href="BiTreeViewDataModel.html">BiTreeViewDataModel</a></code> </code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The view manager used with the tree view</td></tr><tr><td><a name="selectionMode"></a><code>selectionMode</code></td><td><code class="type">String</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 use row selection or cell selection. Valid values are "row" and "cell"</td></tr><tr><td><a name="viewManager"></a><code>viewManager</code></td><td><code class="type"> <code><a href="BiTreeViewViewManager.html">BiTreeViewViewManager</a></code> </code></td><td class="get-column"><img src="check.png" alt="checked"></td><td class="set-column"></td><td>The view manager used with the tree view</td></tr></tbody></table><h2>Methods</h2><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><code><a href="#adjustSelection">adjustSelection</a></code></td><td>This method is called before items are inserted/removed into/from the data model so that the selected rows can be updated. If nCount is negative nRow to nRow - nCount -1 are removed. If nCount is positive nCount rows are added at nRow</td></tr><tr><td><code><a href="#containsSelectedNodes">containsSelectedNodes</a></code></td><td>Checks whether the item has any selected descendants</td></tr><tr><td><code><a href="#getCellIsAnchor">getCellIsAnchor</a></code></td><td>Returns whether the cell at (x, y) is the anchor item</td></tr><tr><td><code><a href="#getCellIsLead">getCellIsLead</a></code></td><td>Returns whether the cell at (x, y) is the lead item</td></tr><tr><td><code><a href="#getCellSelected">getCellSelected</a></code></td><td>Returns whether the cell at (x, y) is selected</td></tr><tr><td><code><a href="#getRowIsLead">getRowIsLead</a></code></td><td>Returns whether the row at y is the lead item</td></tr><tr><td><code><a href="#getRowSelected">getRowSelected</a></code></td><td>Returns whether the row at y is selected</td></tr><tr><td><code><a href="#setCellSelected">setCellSelected</a></code></td><td>Sets the selected state for the cell at x, y</td></tr><tr><td><code><a href="#setRowSelected">setRowSelected</a></code></td><td>Sets the selected state for the row at y</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> </p><h2>Method Details</h2><h3><a name="adjustSelection"></a>adjustSelection</h3><p>This method is called before items are inserted/removed into/from the data model so that the selected rows can be updated. If nCount is negative nRow to nRow - nCount -1 are removed. If nCount is positive nCount rows are added at nRow</p><h4>Syntax</h4><pre class="method-syntax">object.adjustSelection(<span class="methodArgument">nRow</span>, <span class="methodArgument">nCount</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>nRow</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The index of the row where the change starts</td></tr><tr><td><code>nCount</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The number of rows added (use negative numbers when removing)</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="containsSelectedNodes"></a>containsSelectedNodes</h3><p>Checks whether the item has any selected descendants</p><h4>Syntax</h4><pre class="method-syntax">object.containsSelectedNodes(<span class="methodArgument">oItem</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>oItem</code></td><td><code class="type"> <code><a href="BiTreeViewSelectionModelItem.html">BiTreeViewSelectionModelItem</a></code> </code></td><td class="optional-column"></td><td></td><td>The item of the check the descendants for</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="getCellIsAnchor"></a>getCellIsAnchor</h3><p>Returns whether the cell at (x, y) is the anchor item</p><h4>Syntax</h4><pre class="method-syntax">object.getCellIsAnchor(<span class="methodArgument">x</span>, <span class="methodArgument">y</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>x</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The column index of the cell to check</td></tr><tr><td><code>y</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The row index of the cell to check</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="getCellIsLead"></a>getCellIsLead</h3><p>Returns whether the cell at (x, y) is the lead item</p><h4>Syntax</h4><pre class="method-syntax">object.getCellIsLead(<span class="methodArgument">x</span>, <span class="methodArgument">y</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>x</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The column index of the cell to check</td></tr><tr><td><code>y</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The row index of the cell to check</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="getCellSelected"></a>getCellSelected</h3><p>Returns whether the cell at (x, y) is selected</p><h4>Syntax</h4><pre class="method-syntax">object.getCellSelected(<span class="methodArgument">x</span>, <span class="methodArgument">y</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>x</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The column index of the cell to check</td></tr><tr><td><code>y</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The row index of the cell to check</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="getRowIsLead"></a>getRowIsLead</h3><p>Returns whether the row at y is the lead item</p><h4>Syntax</h4><pre class="method-syntax">object.getRowIsLead(<span class="methodArgument">y</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>y</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The index of the row to check</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="getRowSelected"></a>getRowSelected</h3><p>Returns whether the row at y is selected</p><h4>Syntax</h4><pre class="method-syntax">object.getRowSelected(<span class="methodArgument">y</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>y</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The index of the row to check</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</code></p><h3><a name="setCellSelected"></a>setCellSelected</h3><p>Sets the selected state for the cell at x, y</p><h4>Syntax</h4><pre class="method-syntax">object.setCellSelected(<span class="methodArgument">x</span>, <span class="methodArgument">y</span>, <span class="methodArgument">b</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>x</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The column index of the cell to select or deselect</td></tr><tr><td><code>y</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The row index of the cell to select or deselect</td></tr><tr><td><code>b</code></td><td><code class="type">Boolean</code></td><td class="optional-column"></td><td></td><td>Whether to select or deselect the cell</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p><h3><a name="setRowSelected"></a>setRowSelected</h3><p>Sets the selected state for the row at y</p><h4>Syntax</h4><pre class="method-syntax">object.setRowSelected(<span class="methodArgument">y</span>, <span class="methodArgument">b</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>y</code></td><td><code class="type">Number</code></td><td class="optional-column"></td><td></td><td>The index of the row to select or deselect</td></tr><tr><td><code>b</code></td><td><code class="type">Boolean</code></td><td class="optional-column"></td><td></td><td>Whether to select or deselect the row</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">void</code></p></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?