Echo
FocusManager
Class Hierarchy:

Provides focus management tools for an application.

Constructor Summary
Public Echo.FocusManager()
Focus management handler for a specific application instance.

Instance Field Summary
Internal _application
The managed application.

Instance Method Summary
Public find()
Searches the component hierarchy for the next component that should be focused (based on the currently focused component).
Public findInParent()
Finds next (or previous) focusable descendant of a parent component.
Internal _getDescendantIndex()
Determines the index of the child of parent in which descendant is contained.

Constructor Detail
Echo.FocusManager()
Focus management handler for a specific application instance. One FocusManager is created for each application.
Parameters:
the (Echo.Application) - managed application

Instance Method Detail
find
Searches the component hierarchy for the next component that should be focused (based on the currently focused component). Container components are queried to determine the order in which their children should naturally be focused (certain components, e.g., SplitPanes, will have a child focus order that may be different from the order of their children). This search is depth first. Search order (FORWARD): (Start on Component) First Child, next sibling, parent Search order (REVERSE): Last Child, previous sibling, parent
Returns:
(Echo.Component) the Component which should be focused

findInParent
Finds next (or previous) focusable descendant of a parent component. This method requires that the application's currently focused component be a descendant of the specified parent component. The search will be limited to descendants of the parent component, i.e., if a suitable descendant component cannot be found, null will be returned. The minimumDistance property may be used to skip a number of siblings. This is used by components such as "Grid" which may want to find a focusable component in the next row, skipping over all columns of the current row. If omitted the default value of this property is 1. As an example, a value of 2 would skip the immediately adjacent sibling of the current focused component.
Parameters:
parentComponent (Echo.Component) - the parent component to search
reverse (Boolean) - the search direction, false indicating to search forward, true indicating reverse
minimumDistance (Number) - the fewest number of lateral focus moves to make before returning a focusable component (optional, default value of 1)
Returns:
(Echo.Component) the focusable descendant, or null if one cannot be found

_getDescendantIndex
Determines the index of the child of parent in which descendant is contained.
Parameters:
parent (Echo.Component) - the parent component
descendant (Echo.Component) - the descendant component
Returns:
(Number) the descendant index, or -1 if the component is not a descendant of parent