?? bitreeviewdatamodel.html
字號:
<h3><a name="getHasChildren"></a>getHasChildren</h3>
<p>Returns whether the row has any children</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getHasChildren(<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 for the row</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Boolean</code></p>
<h3><a name="getHasIcon"></a>getHasIcon</h3>
<p>Returns whether the cell should display an icon. If this is the case the actual image URI is returned using getIcon</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getHasIcon(<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 for the cell</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 for the cell</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Boolean</code></p>
<h3><a name="getHeaderCellText"></a>getHeaderCellText</h3>
<p>This should return the text (HTML string) to show for the header cell at x</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getHeaderCellText(<span class="methodArgument">x</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 for the header cell</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">String</code></p>
<h3><a name="getIcon"></a>getIcon</h3>
<p>Returns the path to the image to show on the cell. This is only called for cells that should have an icon accordingly to getHasIcon</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getIcon(<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 for the cell</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 for the cell</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">String</code></p>
<h3><a name="getParent"></a>getParent</h3>
<p>Returns the row index for the parent. If this represents a flat structure and the the row has no parent then this should return -1</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getParent(<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 for the row</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Number</code></p>
<h3><a name="getRowHeaderCellText"></a>getRowHeaderCellText</h3>
<p>This should return the text (HTML string) to show for the row header cell at y</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getRowHeaderCellText(<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 row index for the row header cell</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">String</code></p>
<h3><a name="getRowStyle"></a>getRowStyle</h3>
<p>This allows a custom CSS text to be applied to the row. This allows more detailed control over the rendering of the row.</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getRowStyle(<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 for the row</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">String</code></p>
<h3><a name="getShownChildrenCount"></a>getShownChildrenCount</h3>
<p>Returns the number of shown descendants. If the data model represents a tree then this is the sum all descendants that are shown.</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getShownChildrenCount(<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 for the row</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Number</code></p>
<h3><a name="getSortFunction"></a>getSortFunction</h3>
<p>Returns a function that compares two rows, looking at column x. The returned function should take 2 arguments and return a number depending on the relative order of the arguments.</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getSortFunction(<span class="methodArgument">x</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 index of the column to compare the rows by</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">Function</code></p>
<h3><a name="getToolTip"></a>getToolTip</h3>
<p>This should return the tool tip to use for the cell</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getToolTip(<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 for the cell</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 for the cell</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">
<code><a href="BiToolTip.html">BiToolTip</a></code>
</code></p>
<h3><a name="setExpanded"></a>setExpanded</h3>
<p>Sets whether the row is expanded. The data model is responsible for taking care of the expanded state. The data model should fire the following <code><a href="BiTreeViewDataModelEvent.html">BiTreeViewDataModelEvent</a></code> events, "beforeexpand", "beforecollapse", "expand" and "collapse" so that the <code><a href="BiTreeView.html">BiTreeView</a></code> can be updated</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.setExpanded(<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 for the row</td>
</tr>
<tr>
<td><code>b</code></td>
<td><code class="type">Boolean</code></td>
<td class="optional-column"></td>
<td></td>
<td>Whether the row is expanded or collapsed</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="sort"></a>sort</h3>
<p>This sorts the data model by column x. This should fire a <code><a href="BiTreeViewDataModelEvent.html">BiTreeViewDataModelEvent</a></code> called "datachanged" if the data changed (or was reordered) so that the <code><a href="BiTreeView.html">BiTreeView</a></code> is correctly redrawn</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.sort(<span class="methodArgument">x</span> [, <span class="methodArgument">bAscending</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</td>
</tr>
<tr>
<td><code>bAscending</code></td>
<td><code class="type">Boolean</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td></td>
<td>Optional. Whether to sort ascending. If left out this toggles the current sort or sorts ascending if the column was not sorted before</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -