Search in sources :

Example 1 with VariableTextfieldWidget

use of org.archcnl.ui.inputview.rulesormappingeditorview.architectureruleeditor.components.textfieldwidgets.VariableTextfieldWidget in project ArchCNL by Mari-Wie.

the class ConditionStatementComponent method createVariableTextfield.

private void createVariableTextfield() {
    Set<String> regexSet = new HashSet<>();
    regexSet.add(CHAR_REGEX);
    regexSet.add(INTEGER_REGEX);
    variableTextfield = new VariableTextfieldWidget(regexSet);
    variableTextfield.setLabel("Interger, String (or Concept)");
    variableTextfield.setPlaceholder("Interger, String (or Concept)");
}
Also used : VariableTextfieldWidget(org.archcnl.ui.inputview.rulesormappingeditorview.architectureruleeditor.components.textfieldwidgets.VariableTextfieldWidget) HashSet(java.util.HashSet)

Example 2 with VariableTextfieldWidget

use of org.archcnl.ui.inputview.rulesormappingeditorview.architectureruleeditor.components.textfieldwidgets.VariableTextfieldWidget in project ArchCNL by Mari-Wie.

the class FactStatementComponent method createTextfieldWidget.

private VariableTextfieldWidget createTextfieldWidget() {
    Set<String> regexSet = new HashSet<>();
    regexSet.add(CHAR_REGEX);
    regexSet.add(INTEGER_REGEX);
    VariableTextfieldWidget freeTextVariable = new VariableTextfieldWidget(regexSet);
    freeTextVariable.setPlaceholder("+/- [0-9] / String");
    freeTextVariable.setLabel("Integer or String");
    return freeTextVariable;
}
Also used : VariableTextfieldWidget(org.archcnl.ui.inputview.rulesormappingeditorview.architectureruleeditor.components.textfieldwidgets.VariableTextfieldWidget) HashSet(java.util.HashSet)

Example 3 with VariableTextfieldWidget

use of org.archcnl.ui.inputview.rulesormappingeditorview.architectureruleeditor.components.textfieldwidgets.VariableTextfieldWidget in project ArchCNL by Mari-Wie.

the class DefaultStatementComponent method initializeLayout.

private void initializeLayout() {
    createCondtionComponent();
    horizontalRowLayout = new HorizontalLayout();
    componentRuleLayout = new HorizontalLayout();
    initializeFirstCombobox();
    createRelationComboBox();
    three_secondCombobox = new ComboBox<String>("Modifier", secondModifierList);
    three_secondCombobox.setValue("a");
    three_secondCombobox.addValueChangeListener(e -> {
        determineState();
    });
    Set<String> regexSet = new HashSet<>();
    regexSet.add(CHAR_REGEX);
    regexSet.add(INTEGER_REGEX);
    four_secondVariable = new VariableTextfieldWidget(regexSet);
    four_secondVariable.setPlaceholder("+/- [0-9] / String");
    four_secondVariable.setLabel("Integer or String");
    createConceptComboBox();
    six_addConditionCheckbox = new Checkbox("that... (add condition)");
    six_addConditionCheckbox.addClickListener(e -> showConditionBlock(six_addConditionCheckbox.getValue()));
    componentRuleLayout.setVerticalComponentAlignment(Alignment.END, six_addConditionCheckbox);
    buildingBlock = new Component[6];
    buildingBlock[0] = one_firstCombobox;
    buildingBlock[1] = two_firstVariable;
    buildingBlock[2] = three_secondCombobox;
    buildingBlock[3] = four_secondVariable;
    buildingBlock[4] = five_thirdVariable;
    buildingBlock[5] = six_addConditionCheckbox;
    horizontalRowLayout.add(componentRuleLayout);
    initializeAndOrButtons();
    add(horizontalRowLayout);
}
Also used : VariableTextfieldWidget(org.archcnl.ui.inputview.rulesormappingeditorview.architectureruleeditor.components.textfieldwidgets.VariableTextfieldWidget) Checkbox(com.vaadin.flow.component.checkbox.Checkbox) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout) HashSet(java.util.HashSet)

Aggregations

HashSet (java.util.HashSet)3 VariableTextfieldWidget (org.archcnl.ui.inputview.rulesormappingeditorview.architectureruleeditor.components.textfieldwidgets.VariableTextfieldWidget)3 Checkbox (com.vaadin.flow.component.checkbox.Checkbox)1 HorizontalLayout (com.vaadin.flow.component.orderedlayout.HorizontalLayout)1