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

org.bklab.flow.base.FocusableFactory Maven / Gradle / Ivy

There is a newer version: 22.0.1
Show newest version
package org.bklab.flow.base;

import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.Focusable;
import com.vaadin.flow.component.Key;
import com.vaadin.flow.component.KeyModifier;
import org.bklab.flow.IFlowFactory;

@SuppressWarnings("unchecked")
public interface FocusableFactory, E extends FocusableFactory> extends
        IFlowFactory,
        BlurNotifierFactory,
        FocusNotifierFactory,
        HasEnabledFactory {

    default E focusShortcut(Key key, KeyModifier... keyModifiers) {
        get().addFocusShortcut(key, keyModifiers);
        return (E) this;
    }

    default E tabIndex(int tabIndex) {
        get().setTabIndex(tabIndex);
        return (E) this;
    }

    default E blur() {
        get().blur();
        return (E) this;
    }

    default E focus() {
        get().focus();
        return (E) this;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy