Section C.2. Web Controls


C.2. Web Controls

Atlas implements the Sys.UI namespace, which contains several web controls useful to the Atlas developer. Every control in Sys.UI supports the following two properties:

Property

Description

element

The associated Atlas client-side control

element.control

The associated HTML element


C.2.1. Sys.UI.Control (General Class)

Method

Description

Sys.UI.Control(associatedElement)

Constructor, providing the associated HTML element

get_accesskey()

Returns the element's access key

set_accesskey(value)

Sets the element's access key

get_associatedElement()

Returns the element's associated element

get_behaviors()

Returns a list of all behaviors attached to the element

get_cssClass()

Returns the element's CSS class

set_cssClass(value)

Sets the element's CSS class

get_dataContext()

Returns the element's data context

get_enabled()

Whether the element is enabled or not

set_enabled(value)

Enables or disables the element

get_parent()

Returns the element's parent element

set_parent(value)

Sets the element's parent element

get_style()

Returns the element's style property

get_tabIndex()

Returns the element's tabindex property

set_tabIndex(value)

Sets the element's tabindex property

get_visibilityMode()

Returns the element's display mode

set_visibilityMode(value)

Sets the element's display mode

get_visible()

Whether the element is visible or not

set_visible(value)

Makes the element visible or invisible

addCssClass(className)

Adds a CSS class to the element

containsCssClass(className)

Whether the element's style information contains the given CSS class

dispose()

Removes the element from memory

findObject(id)

Finds an object by its ID

focus()

Puts the focus to an element

removeCssClass(className)

Removes the given CSS class from the element's style information

scrollIntoView()

Scrolls the browser to the element's position

toggleCssClass(className)

Switches a CSS class on or off

Sys.UI.Control.parseFrom Markup(type, node, markupContext)

Creates markup into an HTML control

Sys.UI.Control.setLocation(element, position)

Positions an element

Sys.UI.Control.overlaps(r1, r2)

Whether two elements overlap or not

Sys.UI.Control.getLocation(element)

Returns the location of an element (as an object with properties x and y)

Sys.UI.Control.getBounds(element)

Returns position and dimension of an element (as an object with properties x, y, width, and height)

Sys.UI.Control.removeCssClass(element, className)

Removes a CSS class from an element's style information

Sys.UI.Control.addCssClass(element, className)

Adds a CSS class to an element's style information

Sys.UI.Control.containsCssClass(element, className)

Whether an element contains a CSS class or not


C.2.2. Sys.UI.Window

Method

Description

messageBox(text, style)

Opens a modal JavaScript window

inputBox(promptText, defaultValue)

Opens a modal JavaScript window with a text input field


C.2.3. Sys.UI.Label

Method

Description

get_text()

Returns the text in the label

set_text(value)

Sets the text in the label


C.2.4. Sys.UI.Image

Method

Description

get_alternateText()

Returns the alternate text of the image

set_alternateText(value)

Sets the alternate text of the image

get_height()

Returns the height of the image

set_height(value)

Sets the height of the image

get_imageURL()

Returns the URL of the image

set_imageURL(value)

Sets the URL of the image

get_width()

Returns the width of the image

set_width(value)

Sets the width of the image


C.2.5. Sys.UI.HyperLink

Method

Description

get_navigateURL()

Returns the URL of the link

set_navigateURL(value)

Sets the URL of the link


C.2.6. Sys.UI.Button

Method

Description

get_argument()

Returns the argument of the button

set_argument(value)

Sets the argument of the button

get_command()

Returns the command of the button

set_command(value)

Sets the command of the button


C.2.7. Sys.UI.CheckBox

Method

Description

get_checked()

Returns the state of the checkbox

set_checked(value)

Sets the state of the link


C.2.8. Sys.UI.Select

Method

Description

get_data()

Returns the data (DataTable) in the selection list

set_data(value)

Sets the data (DataTable) in the selection list

get_firstItemText()

Returns the text of the first list item

set_firstItemText(value)

Sets the text of the first list item

get_selectedValue()

Returns the value of the (first) selected list item

set_selectedValue(value)

Sets the value of the (first) selected list item

get_textProperty()

Returns the text property of the list

set_textProperty(value)

Sets the text property of the list

get_valueProperty()

Returns the value property of the list

set_valueProperty(value)

Sets the value property of the list

dataBind()

Binds data to the list


C.2.9. Sys.UI.TextBox

Method

Description

get_text()

Returns the text in the field

set_text(value)

Sets the text in the field





Programming Atlas
Programming Atlas
ISBN: 0596526725
EAN: 2147483647
Year: 2006
Pages: 146

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net