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

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

There is a newer version: 22.0.1
Show newest version
/*
 * Copyright (c) 2008 - 2020. - Broderick Labs.
 * Author: Broderick Johansson
 * E-mail: [email protected]
 * Modify date:2020-07-03 13:54:51
 * _____________________________
 * Project name: fluent-vaadin-flow
 * Class name:org.bklab.flow.base.AbstractNumberFieldFactory
 * Copyright (c) 2008 - 2020. - Broderick Labs.
 */

package org.bklab.flow.base;

import com.vaadin.flow.component.textfield.AbstractNumberField;
import com.vaadin.flow.data.value.ValueChangeMode;
import org.bklab.flow.IFlowFactory;

@SuppressWarnings("unchecked")
public interface AbstractNumberFieldFactory, E extends AbstractNumberFieldFactory> extends IFlowFactory,
        GeneratedVaadinNumberFieldFactory,
        HasSizeFactory,
        HasValidationFactory,
        HasValueChangeModeFactory,
        HasPrefixAndSuffixFactory,
        InputNotifierFactory,
        KeyNotifierFactory,
        CompositionNotifierFactory,
        HasHelperFactory,
        HasAutocompleteFactory,
        HasAutocapitalizeFactory,
        HasAutocorrectFactory {

    default E value(T value) {
        get().setValue(value);
        return (E) this;
    }

    default E requiredIndicatorVisible(boolean requiredIndicatorVisible) {
        get().setRequiredIndicatorVisible(requiredIndicatorVisible);
        return (E) this;
    }

    default E valueChangeTimeout(int valueChangeTimeout) {
        get().setValueChangeTimeout(valueChangeTimeout);
        return (E) this;
    }

    default E clearButtonVisible(boolean clearButtonVisible) {
        get().setClearButtonVisible(clearButtonVisible);
        return (E) this;
    }

    default E invalid(boolean invalid) {
        get().setInvalid(invalid);
        return (E) this;
    }

    default E errorMessage(String errorMessage) {
        get().setErrorMessage(errorMessage);
        return (E) this;
    }

    default E autofocus(boolean autofocus) {
        get().setAutofocus(autofocus);
        return (E) this;
    }

    default E hasControls(boolean hasControls) {
        get().setHasControls(hasControls);
        return (E) this;
    }

    default E label(String label) {
        get().setLabel(label);
        return (E) this;
    }

    default E autoselect(boolean autoselect) {
        get().setAutoselect(autoselect);
        return (E) this;
    }

    default E title(String title) {
        get().setTitle(title);
        return (E) this;
    }

    default E valueChangeMode(ValueChangeMode valueChangeMode) {
        get().setValueChangeMode(valueChangeMode);
        return (E) this;
    }

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

    default E placeholder(String placeholder) {
        get().setPlaceholder(placeholder);
        return (E) this;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy