?? biimage.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>BiImage</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="BiImage">BiImage</h1>
<p>This class is used for showing images.<br>
<br>
Supported image types are GIF, JPEG and PNG (including support for 32-bit RGBA).
</p>
<p>This class extends
<code><a href="BiComponent.html">BiComponent</a></code>
and therefore all methods and fields available for
<code><a href="BiComponent.html">BiComponent</a></code>
are also available for <code>BiImage</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="BiComponent.html">BiComponent</a></code><ul><li><code>BiImage</code><ul id="api-derived-classes"></ul></li></ul></li></ul></li></ul>
</li>
</ul>
<h2>Constructor</h2>
<p><code>
new BiImage([<span class="methodArgument">oUri</span> [, <span class="methodArgument">width</span> [, <span class="methodArgument">height</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>oUri</code></td>
<td><code class="type">String/<code><a href="BiUri.html">BiUri</a></code></code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td></td>
<td>
The location of the file relative to the <code><a href="BiApplication.html#adfPath">ADF path</a></code>.
</td>
</tr>
<tr>
<td><code>width</code></td>
<td><code class="type">Number/String</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td><code>null</code></td>
<td>
The width of the image in pixels. A value of null gives the component its desired width.
</td>
</tr>
<tr>
<td><code>height</code></td>
<td><code class="type">Number/String</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td><code>null</code></td>
<td>
The height of the image in pixels. A value of null gives the component its desired height.
</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="loaded"></a><code>loaded</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>Whether the image file is loaded</td>
</tr>
<tr>
<td><a name="preferredHeight"></a><code>preferredHeight</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 natural height of the image file</td>
</tr>
<tr>
<td><a name="preferredWidth"></a><code>preferredWidth</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 natural width of the image file</td>
</tr>
<tr>
<td><a name="uri"></a><code>uri</code></td>
<td><code class="type"><code><a href="BiUri.html">BiUri</a></code></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 location of the image file. If this is set to a string a
new URI is created from that string relative to the
<code><a href="BiApplication.html#adfPath">ADF path</a></code>.
</td>
</tr>
</tbody>
</table>
<h2>Methods</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td><code><a href="#getIconHtml">getIconHtml</a></code></td>
<td>
This method is used to generate the HTML code used as the icon for
<code><a href="BiLabel.html">labels</a></code>. The label is passed as an
argument so that the text icon gap can be set as well as the icon
position.
</td>
</tr>
</tbody>
</table>
<h2>Events</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td class="bubbles-header">Bubbles</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><a name="error"></a><code>error</code></td>
<td><code class="type"><code><a href="BiEvent.html">BiEvent</a></code></code></td>
<td class="bubbles-column"></td>
<td>
Fires when the image failed to load.
</td>
</tr>
<tr>
<td><a name="load"></a><code>load</code></td>
<td><code class="type"><code><a href="BiEvent.html">BiEvent</a></code></code></td>
<td class="bubbles-column"></td>
<td>
Fires when the image loads. Note that the iamge file may be
loaded before the constructor finishes and you should not only
rely on this event but also use <code><a href="#loaded">loaded</a></code> property.
</td>
</tr>
</tbody>
</table>
<h2>Static Methods</h2>
<p>None.</p>
<h2>Static Fields</h2>
<table>
<thead>
<tr>
<td>Name</td>
<td>Type</td>
<td>Descripton</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>BLANK_IMAGE_URI</code></td>
<td><code class="type">String</code></td>
<td>The location of a blank image</td>
</tr>
</tbody>
</table>
<h2>Remarks</h2>
<p>
When using PNG images it is recommended not to change the <code><a href="BiComponent.html">opacity</a></code>
because Internet Explorer cannot support the combination of these.
</p>
<h2>Method Details</h2>
<h3><a name="getIconHtml"></a>getIconHtml</h3>
<p>
This method is used to generate the HTML code used as the icon for
<code><a href="BiLabel.html">labels</a></code>. The label is passed as an
argument so that the text icon gap can be set as well as the icon
position.
</p>
<h4>Syntax</h4>
<pre class="method-syntax">object.getIconHtml(<span class="methodArgument">bHasText</span>, <span class="methodArgument">bEnabled</span>, <span class="methodArgument">sIconPosition</span>, <span class="methodArgument">nIconTextGap</span> [, <span class="methodArgument">sClassName</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>bHasText</code></td>
<td><code class="type">Boolean</code></td>
<td class="optional-column"></td>
<td></td>
<td>Whether the icon should be used with text</td>
</tr>
<tr>
<td><code>bEnabled</code></td>
<td><code class="type">Boolean</code></td>
<td class="optional-column"></td>
<td></td>
<td>Whether the icon is enabled</td>
</tr>
<tr>
<td><code>sIconPosition</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"></td>
<td></td>
<td>
The position of the icon. Valid values are "left", "right"
"top" and "bottom".
</td>
</tr>
<tr>
<td><code>nIconTextGap</code></td>
<td><code class="type">Number</code></td>
<td class="optional-column"></td>
<td></td>
<td>
The gap between the text and the icon.
</td>
</tr>
<tr>
<td><code>sClassName</code></td>
<td><code class="type">String</code></td>
<td class="optional-column"><img src="check.png" alt="checked"></td>
<td></td>
<td>
Optional class name to put on the HTML element representing
the icon.
</td>
</tr>
</tbody>
</table>
<h4>Return Type</h4>
<p><code class="type">String</code></p>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -