📄 bitreeviewdatamodel.html
字号:
</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 cell row containing the icon</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="getRowHeaderCellStyle"></a>getRowHeaderCellStyle</h3><p>This allows a custom CSS text to be applied to a row header cell. This allows more detailed control over the rendering of the row header cell.</p><h4>Syntax</h4><pre class="method-syntax">object.getRowHeaderCellStyle(<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="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="getRowIsAnchor"></a>getRowIsAnchor</h3><p>Returns whether the row is acting as the anchor item in the selection</p><h4>Syntax</h4><pre class="method-syntax">object.getRowIsAnchor(<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="getRowIsLead"></a>getRowIsLead</h3><p>Returns whether the row is acting as the lead item in the selection</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 for the row</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 for the row</td></tr></tbody></table><h4>Return Type</h4><p><code class="type">Boolean</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 + -