Search in sources :

Example 31 with Checkbox

use of com.vaadin.flow.component.checkbox.Checkbox in project ArchCNL by Mari-Wie.

the class IfStatementComponent method initializeLayout.

private void initializeLayout() {
    firstCondition = createConditionComponent();
    secondCondition = createConditionComponent();
    firstRowComponentRuleLayout = new HorizontalLayout();
    one_firstVariable = createRelationComboBox();
    two_firstModifier = new ComboBox<String>("Modifier", Arrays.asList(" ", "a", "an"));
    two_firstModifier.setValue("a");
    three_secondVariable = createConceptComboBox();
    four_firstAddConditionCheckbox = new Checkbox("that... (add condition)");
    four_firstAddConditionCheckbox.addClickListener(e -> addConditionBlock(true, four_firstAddConditionCheckbox.getValue()));
    firstRowComponentRuleLayout.setVerticalComponentAlignment(Alignment.END, four_firstAddConditionCheckbox);
    firstRowComponentRuleLayout.add(one_firstVariable, two_firstModifier, three_secondVariable, four_firstAddConditionCheckbox);
    secondRowComponentRuleLayout = new HorizontalLayout();
    five_secondModifier = new ComboBox<>("Modifier", ", then it must");
    five_secondModifier.setValue(", then it must");
    six_thirdVariable = createRelationComboBox();
    seven_thirdModifier = new ComboBox<String>("Modifier", Arrays.asList("this", "this a", "this an"));
    seven_thirdModifier.setValue("this");
    eight_fourthVariable = createConceptComboBox();
    nine_secondAddConditionCheckbox = new Checkbox("that... (add condition)");
    nine_secondAddConditionCheckbox.addClickListener(e -> addConditionBlock(false, nine_secondAddConditionCheckbox.getValue()));
    secondRowComponentRuleLayout.setVerticalComponentAlignment(Alignment.END, nine_secondAddConditionCheckbox);
    secondRowComponentRuleLayout.add(five_secondModifier, six_thirdVariable, seven_thirdModifier, eight_fourthVariable, nine_secondAddConditionCheckbox);
    add(firstRowComponentRuleLayout, secondRowComponentRuleLayout);
}
Also used : Checkbox(com.vaadin.flow.component.checkbox.Checkbox) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout)

Example 32 with Checkbox

use of com.vaadin.flow.component.checkbox.Checkbox in project SODevelopment by syampillai.

the class AbstractReceiveMaterialReturned method addExtraButtons.

@Override
protected void addExtraButtons() {
    super.addExtraButtons();
    Checkbox h = new Checkbox("Include History");
    h.addValueChangeListener(e -> setFixedFilter(e.getValue() ? null : "Status=1"));
    buttonPanel.add(h);
}
Also used : Checkbox(com.vaadin.flow.component.checkbox.Checkbox)

Example 33 with Checkbox

use of com.vaadin.flow.component.checkbox.Checkbox in project SODevelopment by syampillai.

the class AbstractReceiveMaterialTransferred method addExtraButtons.

@Override
protected void addExtraButtons() {
    super.addExtraButtons();
    Checkbox h = new Checkbox("Include History");
    h.addValueChangeListener(e -> setFixedFilter(e.getValue() ? null : "Status=1"));
    buttonPanel.add(h);
}
Also used : Checkbox(com.vaadin.flow.component.checkbox.Checkbox)

Example 34 with Checkbox

use of com.vaadin.flow.component.checkbox.Checkbox in project SODevelopment by syampillai.

the class SendItemsForRepair method addExtraButtons.

@Override
protected void addExtraButtons() {
    super.addExtraButtons();
    Checkbox h = new Checkbox("Include History");
    h.addValueChangeListener(e -> setFixedFilter(e.getValue() ? null : "Status<2"));
    buttonPanel.add(h);
    setFixedFilter("Status<2");
}
Also used : Checkbox(com.vaadin.flow.component.checkbox.Checkbox)

Example 35 with Checkbox

use of com.vaadin.flow.component.checkbox.Checkbox in project SODevelopment by syampillai.

the class ProcessCheckList method createField.

private void createField(AbstractCheckList node, int level) {
    StringBuilder sb = new StringBuilder();
    sb.append(String.valueOf((char) 187).repeat(Math.max(0, level)));
    if (sb.length() > 0) {
        sb.append(' ');
    }
    ELabel label = new ELabel(sb + node.getName());
    DateField df = new DateField();
    df.setValue(node.getCompleted() ? node.getCompletedOn() : DateUtility.today());
    Checkbox cb = new Checkbox();
    cb.setValue(node.getCompleted());
    items.add(new Object[] { node, df, cb });
    add(label);
    addField(df);
    addField(cb);
    node.listItems().forEach(n -> {
        df.setReadOnly(true);
        cb.setReadOnly(true);
        createField(n, level + 1);
    });
}
Also used : Checkbox(com.vaadin.flow.component.checkbox.Checkbox) DateField(com.storedobject.vaadin.DateField)

Aggregations

Checkbox (com.vaadin.flow.component.checkbox.Checkbox)68 HorizontalLayout (com.vaadin.flow.component.orderedlayout.HorizontalLayout)16 Div (com.vaadin.flow.component.html.Div)14 TextField (com.vaadin.flow.component.textfield.TextField)14 Route (com.vaadin.flow.router.Route)14 Button (com.vaadin.flow.component.button.Button)12 Grid (com.vaadin.flow.component.grid.Grid)12 Label (com.vaadin.flow.component.html.Label)12 Collectors (java.util.stream.Collectors)10 Component (com.vaadin.flow.component.Component)8 NativeButton (com.vaadin.flow.component.html.NativeButton)8 VerticalLayout (com.vaadin.flow.component.orderedlayout.VerticalLayout)8 Optional (java.util.Optional)8 Binder (com.vaadin.flow.data.binder.Binder)7 EmailValidator (com.vaadin.flow.data.validator.EmailValidator)7 Set (java.util.Set)7 FurmsViewComponent (io.imunity.furms.ui.components.FurmsViewComponent)6 PageTitle (io.imunity.furms.ui.components.PageTitle)6 NotificationUtils.showErrorNotification (io.imunity.furms.ui.utils.NotificationUtils.showErrorNotification)6 DateTimeFormatter (java.time.format.DateTimeFormatter)6