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);
}
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);
}
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);
}
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");
}
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);
});
}
Aggregations