BiImage
This class is used for showing images.
Supported image types are GIF, JPEG and PNG (including support for 32-bit RGBA).
This class extends BiComponent and therefore all methods and fields available for BiComponent are also available for BiImage .
Constructor
new BiImage ( [ oUri [ ,nWidth [ ,nHeight ] ] ] )
Parameters
| Name | Type | Default | Descripton |
oUri | BiUri |  | | The location of the file relative to the ADF path. |
nWidth | Number |  | | The width of the image in pixels. A value of null gives the component its desired width. |
nHeight | Number |  | | The height of the image in pixels. A value of null gives the component its desired height. |
Properties
| Name | Type | Descripton |
alt | String |  |  | The alternate text which is read out instead of the image when Bindows is in accessibility mode. |
loaded | Boolean |  | | Whether the image file is loaded |
uri | BiUri |  |  | The location of the image file. If this is set to a string a new URI is created from that string relative to the ADF path. |
Methods
| Name | Description |
getIconHtml | This method is used to generate the HTML code used as the icon for labels. |
Events
| Name | Type | Descripton |
error | BiEvent | | Fires when the image failed to load. |
load | BiEvent | | Fires when the image loads. Note that the image file may be loaded before the constructor finishes and you should not only rely on this event but also use loaded property. |
Static Methods
Static Fields
| Name | Type | Descripton |
BLANK_IMAGE_URI | String | The location of a blank image |
Remarks
When using PNG images it is recommended not to change the opacity because Internet Explorer cannot support the combination of these.
Method Details
getIconHtml
This method is used to generate the HTML code used as the icon for labels.
Syntax
object.getIconHtml ( bHasText,bEnabled,sIconPosition,nIconTextGap [ ,sClassName ] ) Parameters
| Name | Type | Default | Descripton |
bHasText | Boolean | | | Whether the icon should be used with text |
bEnabled | Boolean | | | Whether the icon is enabled |
sIconPosition | String | | | The position of the icon. Valid values are "left", "right" "top" and "bottom". |
nIconTextGap | Number | | | The gap between the text and the icon. |
sClassName | String |  | | Optional class name to put on the HTML element representing the icon. |
Return Type
String
Static Method Details
fromUri
Returns a new BiImage from the given URI
Syntax
BiImage . fromUri ( oUri ) Parameters
| Name | Type | Default | Descripton |
oUri | BiUri | | | The location of the image file |
Return Type
BiImage