@Override public void focus() { if (field instanceof Focusable) { ((Focusable) field).focus(); } else if (component instanceof Focusable) { ((Focusable) component).focus(); } }
/** * 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(); } }
@Override public TabBuilder<C> defaultFocusComponent(Focusable component) { tab.setDefaultFocusComponent(component); return this; }
/** * 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);