All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mantledillusion.vaadin.cotton.component.mixin.FocusableBuilder Maven / Gradle / Ivy

Go to download

Cotton is a Vaadin extension destined for the ultimate of developer convenience.

There is a newer version: 2.3.4
Show newest version
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));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy