Class Index | File Index

Classes


Class zwt.ui.Utils

A utility class with some useful methods for UI components.


Defined in: Utils.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
zwt.ui.Utils.addStyle(Element_element, string_style)
Add the specified style to the specified element class name if it doesn't already have it.
<static>  
zwt.ui.Utils.getScrollWidth()
Determine the width of a scroll bar.
<static>  
zwt.ui.Utils.hasStyle(Element_element, string_style)
Determine whether the element has the specified style.
<static>  
zwt.ui.Utils.removeStyle(Element_element, string_style)
Remove the specified style from the specified element class name.
<static>  
zwt.ui.Utils.replaceStyle(string_style, string_newStyle, string_newStyle)
Replace the specified style from the element class name by the specified new style if the element doesn't already have it.
<static>  
zwt.ui.Utils.toWindowSize(element, int_xoffset, int_yoffset)
Resize the specified element to fit the window.
Class Detail
zwt.ui.Utils()

Author: Jeremy KUHN.
Method Detail
<static> zwt.ui.Utils.addStyle(Element_element, string_style)
Add the specified style to the specified element class name if it doesn't already have it.
Parameters:
{Element} Element_element
The element
{String} string_style
The CSS style to add

<static> {Integer} zwt.ui.Utils.getScrollWidth()
Determine the width of a scroll bar.
Returns:
The scroll bar width

<static> {Boolean} zwt.ui.Utils.hasStyle(Element_element, string_style)
Determine whether the element has the specified style.
Parameters:
{Element} Element_element
The element
{String} string_style
The CSS style to add
Returns:
true if the element has the specified style

<static> zwt.ui.Utils.removeStyle(Element_element, string_style)
Remove the specified style from the specified element class name.
Parameters:
{Element} Element_element
The element
{String} string_style
The CSS style to remove

<static> zwt.ui.Utils.replaceStyle(string_style, string_newStyle, string_newStyle)
Replace the specified style from the element class name by the specified new style if the element doesn't already have it.
Parameters:
{String} string_style
The CSS style to replace
{String} string_newStyle
The new CSS style
string_newStyle

<static> zwt.ui.Utils.toWindowSize(element, int_xoffset, int_yoffset)
Resize the specified element to fit the window.
Parameters:
{Element} element
The HTML element to resize
{Integer} int_xoffset
The horizontal offset
{Integer} int_yoffset
The vertical offset

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Nov 09 2011 19:29:09 GMT+0100 (CET)