ComponentWrapper
Extends:
// TODO: Integrate this concept into Control, using wrapComponent
// as the property.
ComponentWrapper is a control component which is proposed to wrap an existing
React Component in order to make it compatible with the Control class. Pass
the wrapped component as props.component. ComponentWrapper controls
won't be able to be focused but will allow its children to be focused if they
are focusable Controls.
It isn't something you'll have to use outright, as the Control's renderChild() method will actually wrap up a Component for you. In this way, you will be able to nest non-control components and control components and expect that top-most control components will work correctly when searching the control component heirarchy.
Method Summary
| Public Methods | ||
| public |
render(): * |
|
Inherited Summary
| From class Control | ||
| public static |
BLUR_DIRECTION indicates the direction a onBlur() should move focus to next. |
|
| public static |
buildControlForComponent(type: *, props: *, children: *): * |
|
| public static |
componentHasChildren(component: *): * Checks a React component to see if it has any children in props. |
|
| public static |
firstFocusableControlOf(controlOrComponent: *): * |
|
| public static |
isControl(anyComponentOrClass: *): * Returns a boolean which indicates if the provided |
|
| public static |
isReactComponent(anyComponentOrClass: *): * Returns a boolean which indicates if the provided |
|
| public static |
lastFocusableChild(controlOrComponent: *): * |
|
| public static |
|
|
| public static |
|
|
| public static |
wrapComponent(component: *): * |
|
| public |
|
|
| public |
|
|
| public |
blur() In a command line interface, where focusable controls exist (think Visual Basic for DOS) to get an idea of the concept, we can't completely blur out of EVERY single control. Something is always going to ALWAYS need to be accept / capture input, be it a Button or TextField or a Menu or a Tab or Tree. But the concept of the Control component is that it can easily allow focus to shift from one component to the next, and allow those components which extend the Control class to easily display one type of blurred output while accepting input once focused. In order to guarantee this, blur will locate the forward (or reverse component) and 'select' it instead. |
|
| public |
canBlur(): * Returns a boolean which indicates if the Control instance is un-focusable. |
|
| public |
canFocus(): * Returns a boolean which indicates if a Control instance is focusable. |
|
| public |
|
|
| public |
containsFocusable(): * |
|
| public |
focus() |
|
| public |
hasChildren(): * |
|
| public |
isBlurred(): * The |
|
| public |
isDisabled(): * The |
|
| public |
isEnabled(): * The |
|
| public |
isFocusable(): * The |
|
| public |
isFocused(): * The |
|
| public |
render(): * |
|
