Search in sources :

Example 1 with ValueChangeMode

use of com.vaadin.flow.data.value.ValueChangeMode in project flow-components by vaadin.

the class ValueChangeModeButtonProvider method getValueChangeModeRadios.

public Component getValueChangeModeRadios() {
    Div container = new Div();
    RadioButtonGroup<ValueChangeMode> group = new RadioButtonGroup<>();
    group.setItems(ValueChangeMode.values());
    group.setValue(elementWithChangeMode.getValueChangeMode());
    group.addValueChangeListener(event -> elementWithChangeMode.setValueChangeMode(event.getValue()));
    container.add(group, getTimeoutInput());
    return container;
}
Also used : Div(com.vaadin.flow.component.html.Div) HasValueChangeMode(com.vaadin.flow.data.value.HasValueChangeMode) ValueChangeMode(com.vaadin.flow.data.value.ValueChangeMode) RadioButtonGroup(com.vaadin.flow.component.radiobutton.RadioButtonGroup)

Aggregations

Div (com.vaadin.flow.component.html.Div)1 RadioButtonGroup (com.vaadin.flow.component.radiobutton.RadioButtonGroup)1 HasValueChangeMode (com.vaadin.flow.data.value.HasValueChangeMode)1 ValueChangeMode (com.vaadin.flow.data.value.ValueChangeMode)1