?? bigridcell.html
字號(hào):
<!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>BiGridCell</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="BiGridCell">BiGridCell</h1>
<p>
This class represents a cell in a <code><a href="BiGridRow.html">grid row</a></code>.
</p>
<p>This class extends
<code><a href="BiObject.html">BiObject</a></code>
and therefore all methods and fields available for
<code><a href="BiObject.html">BiObject</a></code>
are also available for <code>BiGridCell</code>.</p>
<ul class="partial-class-tree">
<li><code><a href="BiObject.html">BiObject</a></code><ul>
<li><code>BiGridCell</code><ul id="api-derived-classes"><li><code><a href="BiGridChartCell.html">BiGridChartCell</a></code></li></ul></li></ul>
</li>
</ul>
<h2>Constructor</h2>
<p><code>
new BiGridCell(<span class="methodArgument">oData</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>oData</code></td>
<td><code class="type">Object</code></td>
<td class="optional-column"></td>
<td></td>
<td>
The data describing the cell. This is by default displayed as text on the cell.
</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="backColor"></a><code>backColor</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>The background color name</td>
</tr>
<tr>
<td><a name="columnIndex"></a><code>columnIndex</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 column index of the cell</td>
</tr>
<tr>
<td><a name="created"></a><code>created</code></td>
<td><code class="type">Boolean</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
This is true when the cell has been drawn and has a visual
representation. For this to be <code>true</code> the grid must have been
created and drawn.
</td>
</tr>
<tr>
<td><a name="cssClassName"></a><code>cssClassName</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the CSS class name used for the cell.
</td>
</tr>
<tr>
<td><a name="data"></a><code>data</code></td>
<td><code class="type">Object</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>Returns the data</td>
</tr>
<tr>
<td><a name="foreColor"></a><code>foreColor</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>The foreground color name</td>
</tr>
<tr>
<td><a name="grid"></a><code>grid</code></td>
<td><code class="type"><code><a href="BiGrid.html">BiGrid</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>Returns the grid component that the cell is part of</td>
</tr>
<tr>
<td><a name="height"></a><code>height</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>
Returns the height of the cell.
</td>
</tr>
<tr>
<td><a name="html"></a><code>html</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the HTML for the cell. This is used by the
<code><a href="BiAbstractGrid.html#treeBodyHtml">BiAbstractGrid treeBodyHtml
property</a></code> when drawing the grid.
</td>
</tr>
<tr>
<td><a name="icon"></a><code>icon</code></td>
<td><code class="type"><code><a href="BiImage.html">BiImage</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the icon for the row. If you need different icons for different
cells you should override this getter.
</td>
</tr>
<tr>
<td><a name="iconHtml"></a><code>iconHtml</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the HTML used to draw the icon.
</td>
</tr>
<tr>
<td><a name="labelHtml"></a><code>labelHtml</code></td>
<td><code class="type">String</code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>
Returns the actual HTML to show on the cell. Override this to handle specific
data. The default implementation uses <code>String(cell.getData())</code>
</td>
</tr>
<tr>
<td><a name="row"></a><code>row</code></td>
<td><code class="type"><code><a href="BiGridRow.html">BiGridRow</a></code></code></td>
<td class="get-column"><img src="check.png" alt="checked"></td>
<td class="set-column"></td>
<td>The row that the cell is part of</td>
</tr>
<tr>
<td><a name="rowIndex"></a><code>rowIndex</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 index of the row that the cell is part of</td>
</tr>
<tr>
<td><a name="selected"></a><code>selected</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 cell is selected or not. This should not be set when
the selection mode for the grid is set to row selection.
</td>
</tr>
<tr>
<td><a name="top"></a><code>top</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>
Returns the top position relative to the grid.
</td>
</tr>
<tr>
<td><a name="top"></a><code>top</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>
Returns the left position relative to the grid.
</td>
</tr>
<tr>
<td><a name="width"></a><code>width</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>
Returns the width of the cell.
</td>
</tr>
</tbody>
</table>
<h2>Methods</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="#isIconCell">isIconCell</a></code></td>
<td>
Returns <code>true</code> when the cell should display an icon. This
asks the grid for the <code><a href="BiAbstractGrid.html#iconColumn">icon column</a></code>
to decide whether this cell should show the icon.
</td>
</tr>
<tr>
<td><code><a href="#scrollIntoView">scrollIntoView</a></code></td>
<td>Scrolls the grid component viewport so that the
cell becomes visible inside the viewport if possible. The
argument can be used to tell what edge of the viewport the cell
should be aligned to.
</td>
</tr>
<tr>
<td><code><a href="#scrollIntoViewX">scrollIntoViewX</a></code></td>
<td>Scrolls the grid component viewport horizontally so that the
cell becomes visible inside the viewport if possible. The
argument can be used to tell what edge of the viewport the cell
should be aligned to.
</td>
</tr>
<tr>
<td><code><a href="#scrollIntoViewY">scrollIntoViewY</a></code></td>
<td>Scrolls the grid component viewport vertically so that the
cell becomes visible inside the viewport if possible. The
argument can be used to tell what edge of the viewport the cell
should be aligned to.
</td>
</tr>
<tr>
<td><code><a href="#update">update</a></code></td>
<td>
Updates the cell. This allows the grid to redraw only the current
cell of the grid. This is useful when only a few items have
changed and therefore the whole data of the grid does not need
to be redrawn.
</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>
To change the way the cell is displayed after the grid is drawn use the
<code><a href="#update">update</a></code> method.<br>
<br>
To change the way the cell displays the data override the <code><a href="#labelHtml">labelHtml</a></code>
getter.
</p>
<h2>Method Details</h2>
<h3><a name="isIconCell"></a>isIconCell</h3>
<p>
Returns <code>true</code> when the cell should display an icon. This
asks the grid for the <code><a href="BiAbstractGrid.html#iconColumn">icon column</a></code>
to decide whether this cell should show the icon.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.isIconCell()</pre>
<h4>Parameters</h4>
<p>No arguments.</p>
<h4>Return Type</h4>
<p><code class="type">Boolean</code></p>
<h3><a name="scrollIntoView"></a>scrollIntoView</h3>
<p>Scrolls the grid component viewport so that the
cell becomes visible inside the viewport if possible. The
argument can be used to tell what edge of the viewport the cell
should be aligned to.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.scrollIntoView([<span class="methodArgument">bTopLeft</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>bTopLeft</code></td>
<td><code class="type">void</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td><code>null</code></td>
<td>
This describes the value to align the cell to relative
to the viewport of the grid.<br>
<br>
<code>null</code> - Scroll as little as possible to make
the cell visible in the grid viewport.<br>
<code>true</code> - try to align the cell with the
upper left edge of the grid viewport.<br>
<code>false</code> - try to align the cell with the
lower right edge of the grid viewport.
</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="scrollIntoViewX"></a>scrollIntoViewX</h3>
<p>Scrolls the grid component viewport horizontally so that the
cell becomes visible inside the viewport if possible. The
argument can be used to tell what edge of the viewport the cell
should be aligned to.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.scrollIntoViewX([<span class="methodArgument">bLeft</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>bLeft</code></td>
<td><code class="type">void</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td><code>null</code></td>
<td>
This describes the value to align the cell to relative
to the viewport of the grid.<br>
<br>
<code>null</code> - Scroll as little as possible to make
the cell visible in the parent viewport.<br>
<code>true</code> - try to align the cell with the
left edge of the grid viewport.<br>
<code>false</code> - try to align the cell with the
right edge of the grid viewport.
</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="scrollIntoViewY"></a>scrollIntoViewY</h3>
<p>Scrolls the grid component viewport vertically so that the
cell becomes visible inside the viewport if possible. The
argument can be used to tell what edge of the viewport the cell
should be aligned to.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.scrollIntoViewY([<span class="methodArgument">bTop</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>bTop</code></td>
<td><code class="type">void</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td><code>null</code></td>
<td>
This describes the value to align the cell to relative
to the viewport of the grid.<br>
<br>
<code>null</code> - Scroll as little as possible to make
the cell visible in the parent viewport.<br>
<code>true</code> - try to align the cell with the
upper edge of the grid viewport.<br>
<code>false</code> - try to align the cell with the
lower edge of the grid viewport.
</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
<h3><a name="update"></a>update</h3>
<p>
Updates the cell. This allows the grid to redraw only the current
cell of the grid. This is useful when only a few items have
changed and therefore the whole data of the grid does not need
to be redrawn.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.update()</pre>
<h4>Parameters</h4>
<p>No arguments.</p>
<h4>Return Type</h4>
<p><code class="type">void</code></p>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -