gridx.modules.Focus
Object » _Module » gridx.modules.Focus
dojo.require("gridx.modules.Focus");
Defined in gridx/modules/Focus.js
Method Summary
- __FocusArea()
- _doBlur(evt, area)
- _focus(evt)
- _onFocus(evt)
- _onTabDown(evt)
- _updateCurrentArea(area)
- constructor()
- currentArea() Get the name of the current focus area.
- destroy()
- focusArea(areaName, forced) Focus the area with name of *areaName*. If the current area is not this area, blur the current area. If the current area is this area, this is a no-op and return TRUE. If the area with this name does not exist, this is a no-op and return FALSE.
- getAPIPath()
- registerArea(area) Register a new focus area, so this area will be included in the TAB sequence. If there's an existing area with the same name, it is removed and replaced by the new area. This function always succeed. No exception.
- removeArea(areaName) Remove the area with name of *areaName*. If there's no such area, this is a no-op and return FALSE. If currently focused area is removed, then current area becomes empty.
- tab(step, evt) Move focus from one area to another.
Event Summary
- onBlurArea() Fired when an area is blurred.
- onFocusArea() Fired when an area is focused.
Methods
Overrides _Module
Focus the area with name of *areaName*.
If the current area is not this area, blur the current area.
If the current area is this area, this is a no-op and return TRUE.
If the area with this name does not exist, this is a no-op and return FALSE.
Parameter | Type | Description |
---|---|---|
areaName | String | |
forced |
Overrides _Module
Register a new focus area, so this area will be included in the TAB sequence.
If there's an existing area with the same name, it is removed and replaced by the new area.
This function always succeed. No exception.
Parameter | Type | Description |
---|---|---|
area | __FocusArea | A focus area definition. |
Overrides _Module
Remove the area with name of *areaName*.
If there's no such area, this is a no-op and return FALSE.
If currently focused area is removed, then current area becomes empty.
Parameter | Type | Description |
---|---|---|
areaName | String | The name of the area to be removed. return: Boolean TRUE if this operation is successful, FALSE if not. |
Overrides _Module
Move focus from one area to another.
Parameter | Type | Description |
---|---|---|
step | Integer | If positive, then move forward along the TAB sequence. If negative, then move backward along the TAB sequence (SHIFT-TAB). If zero or other invalid values, this is a no-op. The absolute value of *step* is the distance between the target area and the current area in the whole TAB sequence. |
evt | Object | This can either be a real Event object or a mock object with same information . return: String The name of currently focused area. Return "" if no area is focused. |