image


Name space rialto.widget
FILE rialtoEngine\javascript\components\controls\image.js
NAME image
INHERITS AbstractComponent
VERSION 0.86
update
DESCRIPTION This object create an image

The image can be defined by two ways: -with name of a classname wich contains thos three css properties; background: url(path of the image file); width:width of the image; height:height of the image; -by using directly the path of the image file


CONSTRUCTOR


Name Type Description Default
imageOut String Name of a classname or path of an image
left int Left position (in pixel) 0
top int Top position (in pixel) 0
parent String or reference Reference of an HTML or a javascript element parent of the image html element
alternateText String text in tooltip
imageOver String Name of a classname or path of an image to use for a rollover
objPar.imageDisabled String alternate image for inactive state : path or className imageOut
objPar.boolFloatRight boolean right floating style of image false
objPar.boolFloatLeft boolean left floating style of image false
objPar.onerror function function to call when there is a error on the load false

Example:
          logo = new rialto.widget.Image('/rialto/rialtoEngine/images/imagesRialto/transparent3.gif',30,15,
          splitFC.div1,"logo of Rialto",'clsImgLogoOver',{imageDisabled:null,boolFloatRight:false,boolFloatLeft:true});
        

PUBLIC METHODS


Method Arguments list Return value Inherits To redefine
setLimReac int left,int top,int width,int height void no no
setVisible boolean isVisible void no no
setEnable boolean isEnable void no no
setImageReference String imageOut,String imageOver void no no
setImages String imageOut,String imageOver,String imageDisabled void no no
setAlt String text void no no
onclick no yes

setLimReac

this method will allow to fix reactive limits on the image
Parameters:
int left:left of the reactive area
int top:top of the reactive area
int width:width of the reactive area
int height:height of the reactive area
Example:
with an image of 100*100 we want to be reactive only on the center: myImg.setLimReac(25,25,50,50)
reactive area

setVisible

this method will allow to display or hide the image according to the parameter
Parameters:
boolean isVisible:True to display

setEnable

this method will allow to enable or disable the image according to the parameter
Parameters:
boolean isEnable:True to enable

setImageReference

this method will allow to change the imageOut and imageOver references
Parameters:
String imageOut:Name of a classname or path of an image
String imageOver:Name of a classname or path of an image to use for a rollover

setImages

this method will allow to change the imageOut, imageOver and imageDisabled references
Parameters:
String imageOut:Name of a classname or path of an image
String imageOver:Name of a classname or path of an image to use for a rollover
String imageDisabled:alternate image for inactive state : path or className

setAlt

this method will allow to change the tootip text
Parameters:
String text:new text to display in a tooltip

onclick

this method will be raise afert clicking on the image
Parameters:

The code must be redefine after the instanciation of the component. By default this method does nothing.