com.mantledillusion.vaadin.cotton.component.mixin.FocusableBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cotton Show documentation
Show all versions of cotton Show documentation
Cotton is a Vaadin extension destined for the ultimate of developer convenience.
package com.mantledillusion.vaadin.cotton.component.mixin;
import com.mantledillusion.vaadin.cotton.component.EntityBuilder;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.Focusable;
/**
* {@link EntityBuilder} for {@link Focusable} implementing {@link Component}s.
*
* @param
* The {@link Component} type implementing {@link Focusable}.
* @param
* The final implementation type of {@link FocusableBuilder}.
*/
public interface FocusableBuilder, B extends FocusableBuilder>
extends EntityBuilder {
/**
* Builder method, configures the index in whose order the {@link Component}
* gets focused when the user is stepping through them using the TAB key.
*
* @see Focusable#setTabIndex(int)
* @param tabIndex
* The index of the {@link Component}.
* @return this
*/
default B setTabIndex(int tabIndex) {
return configure(focusable -> focusable.setTabIndex(tabIndex));
}
}