Zapatec.Button

Overview | File | Class | Tree | Index | Help

Zapatec Utils

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class Zapatec.Button

    Object
       |
       +--Zapatec.Button

class Zapatec.Button

Method Summary
`void` | `_pauseRepeat()` Makes a pause in down action repeats.
`void` | `_repeatDownAction(ev)` Executes down action, and schedules another one.
`void` | `applyStyle(style)` \internal apply given style to button \param style - [string] string value
`void` | `createButton()` \internal creates button object
`Object` | `destroy()`
`void` | `disable()` Disable button
`void` | `enable()` Enable button
`Object` | `getContainer()` Get reference to button main DOM object
`string` | `getText()` Gets the button text.
`void` | `init(objArgs)` Init function.
`Object` | `isEnabled()` Returns true if button is currently enabled
`Object` | `onclick(ev)` \internal Handler for click event
`Object` | `onmousedown(ev)` \internal Handler for mousedown event
`Object` | `onmouseout(ev)` \internal Handler for mouseout event
`Object` | `onmouseover(ev, mouseup)` \internal Handler for mouseover event
`void` | `preloadImages()` \internal Preload button images
`void` | `setPressed(isPressed)` Sets the button in a pressed state
`void` | `setText(text)` Sets the button text.
`void` | `toggleClass(className)` \internal Removes all classes from buttons and adds given class.
`<static> Object` | `setup(elRef, config)` Takes given element (input type=”image|button|submit|reset”, button, image, div or span) and replaces it with Zapatec.Button with given config.
`<static> Object` | `setupAll(elRef, config)` Takes all suitable elements (input type=”image|button|submit|reset” or button) from elRef childs and makes Zapatec.Button.setup() for each of them.

Method Detail

### _pauseRepeat

    void _pauseRepeat()

Makes a pause in down action repeats.

### _repeatDownAction

    void _repeatDownAction(ev)

Executes down action, and schedules another one.

### applyStyle

    void applyStyle(style)

\internal apply given style to button \param style - [string] string value

### createButton

    void createButton()

\internal creates button object

### destroy

    Object destroy()

### disable

    void disable()

Disable button

### enable

    void enable()

Enable button

### getContainer

    Object getContainer()

Get reference to button main DOM object

### getText

    string getText()

Gets the button text.

Returns:

button text.

### init

    void init(objArgs)

Init function. Actually this function does the creation of element itself, not the constructor.

### isEnabled

    Object isEnabled()

Returns true if button is currently enabled

### onclick

    Object onclick(ev)

\internal Handler for click event

### onmousedown

    Object onmousedown(ev)

\internal Handler for mousedown event

### onmouseout

    Object onmouseout(ev)

\internal Handler for mouseout event

### onmouseover

    Object onmouseover(ev, mouseup)

\internal Handler for mouseover event

### preloadImages

    void preloadImages()

\internal Preload button images

### setPressed

    void setPressed(isPressed)

Sets the button in a pressed state

Parameters:

`isPressed` - [boolean] if button is to be pressed or not

### setText

    void setText(text)

Sets the button text.

Parameters:

`text` - {string} text to be set.

### toggleClass

    void toggleClass(className)

\internal Removes all classes from buttons and adds given class.

### setup

    <static> Object setup(elRef, config)

Takes given element (input type=”image|button|submit|reset”, button, image, div or span) and replaces it with Zapatec.Button with given config. Original element will be hided.

### setupAll

    <static> Object setupAll(elRef, config)

Takes all suitable elements (input type=”image|button|submit|reset” or button) from elRef childs and makes Zapatec.Button.setup() for each of them.

Overview | File | Class | Tree | Index | Help

Zapatec Utils

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Thu Aug 16 12:18:39 2007