ABSTRACTCOMPONENT


Name space rialto.widget
FILE rialtoEngine\javascript\rialto\widget\abstractComponent.js
NAME ABSTRACTCOMPONENT
INHERITS
VERSION 1.0
update
DESCRIPTION This object is an abstraction which inherits all the widgets



CONSTRUCTOR


Name Type Description Default
name String Name of the HTML element "rialto_"+ type
dataname String Name use in http request "rialto_"+type
type String type of widget
top int Top position (in pixel) 0
left int Left position (in pixel) 0
width string Width (in pixel) 100%
height int Height (in pixel) 100%
position String position absolute or relative absolute
visible boolean indicate if the object is visible or not true
enable boolean indicate if the object is enable or not true
draggable boolean indicate if the object is draggable or not false
resizable boolean indicate if the object is resizable or not false
classname String ndicate the prefix to use to make custom component

Example:
This object is instanciate in the constructor of the widgets

PUBLIC METHODS


Method Arguments list Return value Inherits To redefine
getId string no no
setName String name void no no
setDataName String dataname void no no
getDataName String no no
setFormatter Object formatter void no no
getFormatter Object no no
getType String no no
setProperty String key,String value void no no
getProperty String value String no no
setVisible booelan visible void no no
isVisible boolean no no
setEnable booelan enable void no no
isEnable boolean no no
setVisible boolean isVisible void no no
isVisible boolean no no
setEnable boolean isEnable void no no
isEnable boolean no no
setDraggable int isDraggable boolean no no
isAttached boolean no no
isAttachedInDomTree boolean no no
getRialtoParent Object no no
getDOMParent Object no no
setFormParent Object form Object no no
attach object parent void no no
detach void no no
remove void no no
setStyleName classname String void no no
getStyleName String no no
setStyle object objeStyle void no no
getStyle object or string objeStyle string or object no no
setWidth int width void no no
getWidth int no no
getOffsetWidth int no no
modWidth int deltaWidth void no no
setHeight int height void no no
getHeight int no no
getOffsetHeight int no no
modHeight int deltaHeight void no no
setSize object objSize void no no
getSize object no no
moveBy int deltaTop,int deltaLeft void no no
moveTo int top,int left void no no
setLeft int left void no no
setTop int top void no no
setPosition string position void no no
addEvent Object oHtml,string event,Object method null no yes
removeAllEvent void no no
onattach null no yes
ondetach null no yes
onremove null no yes
getHtmlExt HTML object no no
getHtmlImp HTML object no no
getHtmlDD HTML object no no
getHtmlRZ HTML object no no
getAjaxArea HTML object no no
getAjaxArea HTML object no no
getAjaxIndicator Object no no
setAjaxIndicator String path void no no
startAjaxIndicator int top,int left void no no
stopAjaxIndicator void no no

getId

this method return the id of the object
Parameters:

setName

this method will allow to change the name property
Parameters:
String name:new name

setDataName

this method will allow to change the dataname property
Parameters:
String dataname:new dataname

getDataName

return the dataname value
Parameters:

setFormatter

this method will allow to bind a formatter to the component
Parameters:
Object formatter:the formatter object to bind to the component

getFormatter

return the formatter bind to the component
Parameters:

getType

return the type property
Parameters:

setProperty

this method will allow to add a property to the component
Parameters:
String key:name of the property
String value:value of the property

getProperty

return the value of the given property
Parameters:
String value:value of the property

setVisible

this method will allow to set the visible state of the component
Parameters:
booelan visible:visible value

isVisible

return the visible state of the component
Parameters:

setEnable

this method will allow to set the enable state of the component
Parameters:
booelan enable:enable value

isEnable

return the enable state of the component
Parameters:

setVisible

this method will allow to change the display
Parameters:
boolean isVisible:True to set the object visible

isVisible

return the visible state of the object
Parameters:

setEnable

this method will allow to change the enable state of the object
Parameters:
boolean isEnable:True to enable the object

isEnable

return the enable state of the object
Parameters:

setDraggable

this method will allow to change the draggable
Parameters:
int isDraggable:True to set the object draggable

isAttached

return true if the component is attach to a parent
Parameters:

isAttachedInDomTree

return true if the component is attach in the dom tree
Parameters:

getRialtoParent

return the first Rialto Parent (that can be the body)
Parameters:

getDOMParent

return the DOM element parent
Parameters:

setFormParent

set the form on which the component is link without changing dom hierarchy
Parameters:
Object form:Rialto form on which we attach the element

attach

this method will allow to add the object in a parent
Parameters:
object parent:javascript or HTML object in which we add the object

detach

this method will allow to detach the object from his parent
Parameters:

remove

this method will allow to remove the object from his parent and to release memory
Parameters:

setStyleName

set the classname property that will be use to get css rules
Parameters:
classname String:classname value

getStyleName

return the classname property
Parameters:

setStyle

this method will allow to change any style attribute of the object
Parameters:
object objeStyle:object which properties reperesenting style properties to set
Example:
setStyle({color:red,border:1px solid black});

getStyle

this method will allow to change any style attribute of the object
Parameters:
object or string objeStyle: If obStyle is an object with style attribute return obStyle with all attributes set with the style attributes of the external div of the object. If obStyle is a string representing a name attribute return the value of this style atribute of the external div of the object
Example:
getStyle({color:,border:}); or getStyle("color"); 

setWidth

this method will allow to change the width
Parameters:
int width:new width of the object

getWidth

return the width property
Parameters:

getOffsetWidth

return the real width property
Parameters:

modWidth

this method will allow to change the width
Parameters:
int deltaWidth:delta with the current width of the object

setHeight

this method will allow to change the height
Parameters:
int height:new height of the object

getHeight

return the height property
Parameters:

getOffsetHeight

return the real height property
Parameters:

modHeight

this method will allow to change the height
Parameters:
int deltaHeight:delta with the current height of the object

setSize

this method will allow to change both height and width
Parameters:
object objSize:object with 2 properties height and width

getSize

return an object with 2 properties height and width
Parameters:

moveBy

this method will allow to change the top and the left of the object
Parameters:
int deltaTop:delta with the current top of the object
int deltaLeft:delta with the current left of the object

moveTo

this method will allow to change the top and the left of the object
Parameters:
int top:new top of the object
int left:new left of the object

setLeft

this method will allow to change the left
Parameters:
int left:new left of the object

setTop

this method will allow to change the top
Parameters:
int top:new top of the object

setPosition

this method will allow to change the position attribute
Parameters:
string position:value of the position

addEvent

register the listener on the given event name on the given html object
Parameters:
Object oHtml:HTML element on which the event is attached
string event:name of the event
Object method:Method of the component that will be execute when the event is fired

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

removeAllEvent

this method will remove all event listener
Parameters:

onattach

call when the component is attach to make specific action
Parameters:

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

ondetach

call when the component is detach to make specific action
Parameters:

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

onremove

call when the component is remove to make specific action
Parameters:

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

getHtmlExt

return the first HTML element of the object
Parameters:

getHtmlImp

return the HTML element of the object to use for printing
Parameters:

getHtmlDD

return the HTML element of the object to use for start the drag and drop
Parameters:

getHtmlRZ

return the HTML element of the object to use for start the resize
Parameters:

getAjaxArea

return the HTML element where in te ajax indicator is put
Parameters:

getAjaxArea

return the HTML element where in te ajax indicator is put
Parameters:

getAjaxIndicator

return the rialto image use as ajax indicator
Parameters:

setAjaxIndicator

this method will allow set the ajax image
Parameters:
String path:path or classname of the ajax indicator

startAjaxIndicator

display the ajax indicator
Parameters:
int top:top position in the ajax area
int left:left position in the ajax area

stopAjaxIndicator

hide the ajax indicator
Parameters: