LzFocus
出自OpenFace
目录 |
LzFocus
Handles keyboard focus.
This service manages the keyboard focus. At any time, at most one view has the keyboard focus. This is the view that receives key events when a key is pressed.
See The Software Developer's Guide for a discussion of keyboard focus.
Methods
clearFocus()
LzFocus.clearFocus()
Remove the focus from the currently focused view (if there is one). An 'onblur' event is first sent to the view.
getFocus()
LzFocus.getFocus()
Get the currently focused view. Returns Type Desc LzView The view that has the focus, or null if none does.
setFocus()
LzFocus.setFocus(newsel)
Set the focus to the given view. If this is not the currently focused view, an onblur event is sent to the currently focused view, and an onfocus event is sent to the new view. When setFocus is called as the result of an onblur or onfocus event, all the delegates registered for the event run before the next setFocus call is made. While it is not an error for multiple responders to call setFocus as the result of the same onfocus or onblur event, only one of the calls will be executed. Parameters Name Type Desc newsel LzView The view to focus
Events
Name Description
onfocus None

