Java 类com.vaadin.ui.Component.Focusable 实例源码

项目:holon-vaadin    文件:InputFieldWrapper.java   
@Override
public void focus() {
    if (field instanceof Focusable) {
        ((Focusable) field).focus();
    } else if (component instanceof Focusable) {
        ((Focusable) component).focus();
    }
}
项目:hypothesis    文件:SlideDocument.java   
/**
 * Remove focus from any component and focus to root if possible
 */
public void focus() {
    Component component = presenter.getSlideContainer();
    while (component != null && !(component instanceof Focusable)) {
        component = component.getParent();
    }

    if (component != null && component instanceof Focusable) {
        ((Focusable) component).focus();
    }
}
项目:holon-vaadin    文件:DefaultTabBuilder.java   
@Override
public TabBuilder<C> defaultFocusComponent(Focusable component) {
    tab.setDefaultFocusComponent(component);
    return this;
}
项目:holon-vaadin    文件:TabsBuilder.java   
/**
 * Set the component that should automatically focused when the tab is selected.
 * @param component the component to focus
 * @return this
 */
TabBuilder<C> defaultFocusComponent(Focusable component);