org.bklab.flow.factory.NumberFieldFactory 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.
package org.bklab.flow.factory;
import com.vaadin.flow.component.AbstractField;
import com.vaadin.flow.component.HasValue;
import com.vaadin.flow.component.textfield.NumberField;
import org.bklab.flow.FlowFactory;
import org.bklab.flow.base.AbstractNumberFieldFactory;
public class NumberFieldFactory extends FlowFactory implements AbstractNumberFieldFactory {
public NumberFieldFactory() {
this(new NumberField());
}
public NumberFieldFactory(String label) {
this(new NumberField(label));
}
public NumberFieldFactory(String label, String placeholder) {
this(new NumberField(label, placeholder));
}
public NumberFieldFactory(HasValue.ValueChangeListener super AbstractField.ComponentValueChangeEvent> listener) {
this(new NumberField(listener));
}
public NumberFieldFactory(String label, HasValue.ValueChangeListener super AbstractField.ComponentValueChangeEvent> listener) {
this(new NumberField(label, listener));
}
public NumberFieldFactory(String label, Double initialValue, HasValue.ValueChangeListener super AbstractField.ComponentValueChangeEvent> listener) {
this(new NumberField(label, initialValue, listener));
}
public NumberFieldFactory(NumberField component) {
super(component);
}
public NumberFieldFactory min(double min) {
get().setMin(min);
return this;
}
@Deprecated
public NumberFieldFactory pattern(String pattern) {
get().setPattern(pattern);
return this;
}
@Deprecated
public NumberFieldFactory minLength(int minLength) {
get().setMinLength(minLength);
return this;
}
@Deprecated
public NumberFieldFactory maxLength(int maxLength) {
get().setMaxLength(maxLength);
return this;
}
public NumberFieldFactory step(double step) {
get().setStep(step);
return this;
}
public NumberFieldFactory max(double max) {
get().setMax(max);
return this;
}
@Deprecated
public NumberFieldFactory preventInvalidInput(boolean preventInvalidInput) {
get().setPreventInvalidInput(preventInvalidInput);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy