org.bklab.flow.factory.RadioButtonGroupFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluent-vaadin-flow Show documentation
Show all versions of fluent-vaadin-flow Show documentation
Broderick Labs for fluent vaadin flow. Inherits common Vaadin components.
/*
* Copyright (c) 2008 - 2020. - Broderick Labs.
* Author: Broderick Johansson
* E-mail: [email protected]
* Modify date:2020-07-01 12:53:31
* _____________________________
* Project name: fluent-vaadin-flow
* Class name:org.bklab.flow.factory.RadioButtonGroupFactory
* Copyright (c) 2008 - 2020. - Broderick Labs.
*/
package org.bklab.flow.factory;
import com.vaadin.flow.component.AbstractField;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.HasValue;
import com.vaadin.flow.component.radiobutton.RadioButtonGroup;
import com.vaadin.flow.component.radiobutton.dataview.RadioButtonGroupDataView;
import com.vaadin.flow.component.radiobutton.dataview.RadioButtonGroupListDataView;
import com.vaadin.flow.data.provider.DataProvider;
import com.vaadin.flow.data.renderer.ComponentRenderer;
import com.vaadin.flow.function.SerializablePredicate;
import org.bklab.flow.FlowFactory;
import org.bklab.flow.base.*;
public class RadioButtonGroupFactory extends FlowFactory, RadioButtonGroupFactory> implements
GeneratedVaadinRadioGroupFactory, RadioButtonGroupFactory>,
HasItemComponentsFactory, RadioButtonGroupFactory>,
HasListDataViewFactory, RadioButtonGroup, RadioButtonGroupFactory>,
HasDataViewFactory, RadioButtonGroup, RadioButtonGroupFactory>,
SingleSelectFactory, RadioButtonGroupFactory>,
HasHelperFactory, RadioButtonGroupFactory>,
HasValidationFactory, RadioButtonGroupFactory> {
public RadioButtonGroupFactory() {
super(new RadioButtonGroup<>());
}
public RadioButtonGroupFactory(RadioButtonGroup component) {
super(component);
}
public RadioButtonGroupFactory readOnly(boolean readOnly) {
get().setReadOnly(readOnly);
return this;
}
public RadioButtonGroupFactory itemEnabledProvider(SerializablePredicate itemEnabledProvider) {
get().setItemEnabledProvider(itemEnabledProvider);
return this;
}
public RadioButtonGroupFactory errorMessage(String errorMessage) {
get().setErrorMessage(errorMessage);
return this;
}
public RadioButtonGroupFactory label(String label) {
get().setLabel(label);
return this;
}
public RadioButtonGroupFactory invalid(boolean invalid) {
get().setInvalid(invalid);
return this;
}
public RadioButtonGroupFactory dataProvider(DataProvider dataProvider) {
get().setDataProvider(dataProvider);
return this;
}
public RadioButtonGroupFactory required(boolean required) {
get().setRequired(required);
return this;
}
public RadioButtonGroupFactory renderer(ComponentRenderer extends Component, T> renderer) {
get().setRenderer(renderer);
return this;
}
@Override
public RadioButtonGroupFactory value(T value) {
get().setValue(value);
return this;
}
@Override
public RadioButtonGroupFactory valueChangeListener(HasValue.ValueChangeListener super AbstractField.ComponentValueChangeEvent, T>> valueChangeListener) {
get().addValueChangeListener(valueChangeListener);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy