ABSTRACTCOMPONENT
| Name space |
rialto.widget |
| FILE |
rialtoEngine\javascript\core\coreComponents\abstractComponent.js |
| NAME |
ABSTRACTCOMPONENT |
| INHERITS |
|
| VERSION |
0.86 |
| update |
|
| DESCRIPTION |
This object is an abstraction which inherits all the widgets |
CONSTRUCTOR
| Name |
Type |
Description |
Default |
| name |
String |
Name of the HTML element |
element type |
| type |
String |
type of widget |
checkbox |
| 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 |
false |
| draggable |
boolean |
indicate if the object is draggable or not |
false |
| resizable |
boolean |
indicate if the object is resizable or not |
false |
Example:
This object is instanciate in the constructor of the widgets
PUBLIC METHODS
getId
this method return the id of the object
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
setWidth
this method will allow to change the width
Parameters:
int width:new width of the object
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
modHeight
this method will allow to change the height
Parameters:
int deltaHeight:delta with the current height of the object
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
setPosition
this method will allow to change the position attribute
Parameters:
string position:value of the position
setStyle
this method will allow to change any style attribute of the object
Parameters:
object objeStyle:object which properties reperesents 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");
placeIn
this method will allow to add the object in a parent
Parameters:
object parent:javascript or HTML object in which we add the object
remove
this method will allow to remove the object from his parent and to release memory
Parameters:
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: