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

org.bklab.flow.factory.CheckboxFactory Maven / Gradle / Ivy

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

import com.vaadin.flow.component.AbstractField;
import com.vaadin.flow.component.HasValue;
import com.vaadin.flow.component.checkbox.Checkbox;
import org.bklab.flow.FlowFactory;
import org.bklab.flow.base.GeneratedVaadinCheckboxFactory;
import org.bklab.flow.base.HasSizeFactory;

public class CheckboxFactory extends FlowFactory implements
        GeneratedVaadinCheckboxFactory, HasSizeFactory {
    public CheckboxFactory() {
        super(new Checkbox());
    }

    public CheckboxFactory(boolean initialValue) {
        super(new Checkbox(initialValue));
    }

    public CheckboxFactory(String labelText, boolean initialValue) {
        super(new Checkbox(labelText, initialValue));
    }

    public CheckboxFactory(String label, HasValue.ValueChangeListener> listener) {
        super(new Checkbox(label, listener));
    }

    public CheckboxFactory(String label) {
        super(new Checkbox(label));
    }

    public CheckboxFactory labelAsHtml(String labelAsHtml) {
        get().setLabelAsHtml(labelAsHtml);
        return this;
    }

    public CheckboxFactory ariaLabel(String ariaLabel) {
        get().setAriaLabel(ariaLabel);
        return this;
    }

    public CheckboxFactory label(String label) {
        get().setLabel(label);
        return this;
    }

    public CheckboxFactory autofocus(boolean autofocus) {
        get().setAutofocus(autofocus);
        return this;
    }

    public CheckboxFactory indeterminate(boolean indeterminate) {
        get().setIndeterminate(indeterminate);
        return this;
    }

    public CheckboxFactory autofocus() {
        get().setAutofocus(true);
        return this;
    }

    public CheckboxFactory indeterminate() {
        get().setIndeterminate(true);
        return this;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy