Class
zebkit.ui.web.HtmlElement
extends <zebkit.ui.Panel> |
<zebkit.ui.web> |
HTML element UI component wrapper class. The class represents an HTML element as if it is standard UI component. It helps to use some standard HTML element as zebkit UI components and embeds it in zebkit UI application layout.
zebkit.ui.web.HtmlElement
([element]
)
Parameters:
-
[element]
<String | HTMLElement>an HTML element to be represented as a standard zebkit UI component. If the passed parameter is string it denotes a name of an HTML element. In this case a new HTML element will be created.
public | void | setAttribute (name, value) |
public | void | setAttributes (attrs) |
public | void | setColor (c) |
public | void | setContent (an) |
public | void | setFont (f) |
public | void | setStyle (a, a) |
public | void | setStyles (styles) |
public | void | update (g) |
public
chainable
setAttributes (attrs )
Set the specified attributes set to the wrapped HTML element Parameters:
|
public
chainable
setColor (c )
Set the CSS color of the wrapped HTML element Parameters:
|
public
chainable
setContent (an )
Set the inner content of the wrapped HTML element Parameters:
|
public
chainable
setFont (f )
Set the CSS font of the wrapped HTML element Parameters:
|
public
chainable
setStyles (styles )
Apply the given set of CSS styles to the wrapped HTML element Parameters:
|
public
void
update (g )
Implements "update" method to be aware when the component is visible. It is used to adjust wrapped HTML element visibility and size. Update is the first rendering method that is called, so it is right place to sync HTML element visibility before paint method execution Parameters:
|












private
![]() $container
Every zebkit HTML element is wrapped with a container (div) HTML element. It is required since not all HTML elements are designed to be a container (for instance HTMLCanvas element), where every zebkit has to be a container. |