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

NameTypeOptionalDefaultDescripton
oUriBiUricheckedThe location of the file relative to the ADF path.
nWidthNumbercheckedThe width of the image in pixels. A value of null gives the component its desired width.
nHeightNumbercheckedThe height of the image in pixels. A value of null gives the component its desired height.

Properties

NameTypegetsetDescripton
altStringcheckedcheckedThe alternate text which is read out instead of the image when Bindows is in accessibility mode.
loadedBooleancheckedWhether the image file is loaded
uriBiUricheckedcheckedThe 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

NameDescription
getIconHtmlThis method is used to generate the HTML code used as the icon for labels.

Events

NameTypeBubblesDescripton
errorBiEventFires when the image failed to load.
loadBiEventFires 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

NameDescription
fromUriReturns a new BiImage from the given URI

Static Fields

NameTypeDescripton
BLANK_IMAGE_URIStringThe 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

NameTypeOptionalDefaultDescripton
bHasTextBooleanWhether the icon should be used with text
bEnabledBooleanWhether the icon is enabled
sIconPositionStringThe position of the icon. Valid values are "left", "right" "top" and "bottom".
nIconTextGapNumberThe gap between the text and the icon.
sClassNameStringcheckedOptional 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

NameTypeOptionalDefaultDescripton
oUriBiUriThe location of the image file

Return Type

BiImage