Search in sources :

Example 1 with ValueChangeEvent

use of com.vaadin.flow.component.HasValue.ValueChangeEvent in project karnak by OsiriX-Foundation.

the class MonitorView method buildwadoNodeListSelector.

private void buildwadoNodeListSelector() {
    wadoNodeListSelector = new Select<>();
    wadoNodeListSelector.setEmptySelectionAllowed(false);
    WadoNodeList pacsProdWadoNodeList = Util.readWadoNodes(this.getClass().getResource("/config/pacs-wado-web.csv"), "Public web");
    wadoNodeListSelector.setItems(pacsProdWadoNodeList);
    wadoNodeListSelector.addValueChangeListener((ValueChangeListener<ValueChangeEvent<WadoNodeList>>) event -> logic.wadoNodeListSelected(event.getValue()));
    if (!pacsProdWadoNodeList.isEmpty()) {
        wadoNodeListSelector.setValue(pacsProdWadoNodeList);
    }
}
Also used : DicomNodeList(org.karnak.backend.model.dicom.DicomNodeList) Html(com.vaadin.flow.component.Html) Select(com.vaadin.flow.component.select.Select) Util(org.karnak.frontend.dicom.Util) ValueChangeEvent(com.vaadin.flow.component.HasValue.ValueChangeEvent) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout) VerticalLayout(com.vaadin.flow.component.orderedlayout.VerticalLayout) Div(com.vaadin.flow.component.html.Div) AbstractView(org.karnak.frontend.dicom.AbstractView) H6(com.vaadin.flow.component.html.H6) ValueChangeListener(com.vaadin.flow.component.HasValue.ValueChangeListener) WadoNodeList(org.karnak.backend.model.dicom.WadoNodeList) Alignment(com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment) Button(com.vaadin.flow.component.button.Button) ValueChangeEvent(com.vaadin.flow.component.HasValue.ValueChangeEvent) WadoNodeList(org.karnak.backend.model.dicom.WadoNodeList)

Example 2 with ValueChangeEvent

use of com.vaadin.flow.component.HasValue.ValueChangeEvent in project Akros-Marketplace by AkrosAG.

the class CategoryView method createEditorFormComponents.

private Component createEditorFormComponents() {
    Div div = new Div();
    FormLayout formLayout = new FormLayout();
    formLayout.setResponsiveSteps(new ResponsiveStep("0", 1, LabelsPosition.TOP));
    txtCategoryId = new NumberField("categoryId (Column: CATEGORY_ID)");
    txtCategoryId.setReadOnly(true);
    ValueChangeListener<ValueChangeEvent<?>> listener = getUpdateSaveButtonValueChangeListener();
    txtDescription = new TextArea("description (Column: DESCRIPTION)");
    txtDescription.setId(TEXT_CONTROL_DESCRIPTION);
    txtDescription.setClassName("full-width");
    txtDescription.setRequired(true);
    txtDescription.setHeightFull();
    txtDescription.setValueChangeMode(ValueChangeMode.LAZY);
    txtDescription.addValueChangeListener(listener);
    txtShortDescription = new TextField("shortDescription (Column: SHORT_DESCRIPTON)");
    txtShortDescription.setClassName("full-width");
    txtShortDescription.setRequired(true);
    txtShortDescription.setValueChangeMode(ValueChangeMode.LAZY);
    txtShortDescription.addValueChangeListener(listener);
    formLayout.add(txtCategoryId, txtDescription, txtShortDescription);
    div.add(formLayout);
    return div;
}
Also used : Div(com.vaadin.flow.component.html.Div) FormLayout(com.vaadin.flow.component.formlayout.FormLayout) ValueChangeEvent(com.vaadin.flow.component.HasValue.ValueChangeEvent) TextArea(com.vaadin.flow.component.textfield.TextArea) TextField(com.vaadin.flow.component.textfield.TextField) NumberField(com.vaadin.flow.component.textfield.NumberField) ResponsiveStep(com.vaadin.flow.component.formlayout.FormLayout.ResponsiveStep)

Example 3 with ValueChangeEvent

use of com.vaadin.flow.component.HasValue.ValueChangeEvent in project Akros-Marketplace by AkrosAG.

the class FieldTypeChooserView method createEditorFormComponents.

private Component createEditorFormComponents() {
    Div div = new Div();
    FormLayout formLayout = new FormLayout();
    formLayout.setResponsiveSteps(new ResponsiveStep("0", 1, LabelsPosition.TOP));
    txtFieldTypeChooseId = new NumberField("fieldTypeChooseId (Column: FIELD_TYPE_CHOOSE_ID)");
    txtFieldTypeChooseId.setReadOnly(true);
    ValueChangeListener<ValueChangeEvent<?>> listener = getUpdateSaveButtonValueChangeListener();
    txtDescription = new TextField("description (Column: DESCRIPTION)");
    txtDescription.setClassName("full-width");
    txtDescription.setRequired(true);
    txtDescription.addValueChangeListener(listener);
    txtDescription.setValueChangeMode(ValueChangeMode.LAZY);
    txtDescription.setId(TEXT_CONTROL_DESCRIPTION);
    txtSortNumber = new NumberField("sortNumber (Column: SORT_NUMBER)");
    txtSortNumber.setClassName("full-width");
    txtSortNumber.setRequiredIndicatorVisible(true);
    txtSortNumber.setValueChangeMode(ValueChangeMode.LAZY);
    txtSortNumber.addValueChangeListener(listener);
    formLayout.add(txtFieldTypeChooseId, txtDescription, txtSortNumber);
    div.add(formLayout);
    return div;
}
Also used : Div(com.vaadin.flow.component.html.Div) FormLayout(com.vaadin.flow.component.formlayout.FormLayout) ValueChangeEvent(com.vaadin.flow.component.HasValue.ValueChangeEvent) TextField(com.vaadin.flow.component.textfield.TextField) NumberField(com.vaadin.flow.component.textfield.NumberField) ResponsiveStep(com.vaadin.flow.component.formlayout.FormLayout.ResponsiveStep)

Example 4 with ValueChangeEvent

use of com.vaadin.flow.component.HasValue.ValueChangeEvent in project Akros-Marketplace by AkrosAG.

the class FieldTypeView method createEditorFormComponents.

private Component createEditorFormComponents() {
    Div div = new Div();
    FormLayout formLayout = new FormLayout();
    formLayout.setResponsiveSteps(new ResponsiveStep("0", 1, LabelsPosition.TOP));
    ValueChangeListener<ValueChangeEvent<?>> listener = getUpdateSaveButtonValueChangeListener();
    txtFieldTypeId = new NumberField("fieldTypeId (Column: FIELD_TYPE_ID)");
    txtFieldTypeId.setReadOnly(true);
    txtDescription = new TextArea("description (Column: DESCRIPTION)");
    txtDescription.setClassName("full-width");
    txtDescription.setRequired(true);
    txtDescription.setHeightFull();
    txtDescription.setValueChangeMode(ValueChangeMode.LAZY);
    txtDescription.addValueChangeListener(listener);
    txtDescription.setId(TEXT_CONTROL_DESCRIPTION);
    txtShortDescription = new TextField("shortDescription (Column: SHORT_DESCRIPTON)");
    txtShortDescription.setClassName("full-width");
    txtShortDescription.setRequired(true);
    txtShortDescription.setValueChangeMode(ValueChangeMode.LAZY);
    txtShortDescription.addValueChangeListener(listener);
    comboFieldTypeDefinitions = new ComboBox<FieldTypeDefinition>("fieldTypeDefinitionId (Column: FIELD_TYPE_DEFINITION_ID)", fieldTypeDefinitionService.list());
    comboFieldTypeDefinitions.setItemLabelGenerator(e -> String.format("%d: %s", e.getFieldTypeDefinitionId(), e.getDescription()));
    comboFieldTypeDefinitions.setRequired(true);
    comboFieldTypeDefinitions.addValueChangeListener(listener);
    txtMinValue = new NumberField("minValue (Column: MIN_VALUE)");
    txtMinValue.setClassName("full-width");
    txtMinValue.setRequiredIndicatorVisible(true);
    txtMinValue.setValueChangeMode(ValueChangeMode.LAZY);
    txtMinValue.addValueChangeListener(listener);
    txtMaxValue = new NumberField("maxValue (Column: MAX_VALUE)");
    txtMaxValue.setClassName("full-width");
    txtMaxValue.setRequiredIndicatorVisible(true);
    txtMaxValue.setValueChangeMode(ValueChangeMode.LAZY);
    txtMaxValue.addValueChangeListener(listener);
    chkOffer = new Checkbox("offer (Column: OFFER)");
    chkOffer.setClassName("full-width");
    chkSearch = new Checkbox("search (Column: SEARCH)");
    chkSearch.setClassName("full-width");
    chkRequired = new Checkbox("required (Column: REQUIRED)");
    chkRequired.setClassName("full-width");
    chkSearchable = new Checkbox("searchable (Column: SEARCHABLE)");
    chkSearchable.setClassName("full-width");
    txtSortNumber = new NumberField("sortNumber (Column: SORT_NUMBER)");
    txtSortNumber.setClassName("full-width");
    txtSortNumber.setRequiredIndicatorVisible(true);
    txtSortNumber.setValueChangeMode(ValueChangeMode.LAZY);
    txtSortNumber.addValueChangeListener(listener);
    formLayout.add(txtFieldTypeId, txtDescription, txtShortDescription, comboFieldTypeDefinitions, txtMinValue, txtMaxValue, chkOffer, chkSearch, chkRequired, chkSearchable, txtSortNumber);
    div.add(formLayout);
    return div;
}
Also used : Div(com.vaadin.flow.component.html.Div) FormLayout(com.vaadin.flow.component.formlayout.FormLayout) ValueChangeEvent(com.vaadin.flow.component.HasValue.ValueChangeEvent) TextArea(com.vaadin.flow.component.textfield.TextArea) FieldTypeDefinition(ch.akros.marketplace.administration.dataservice.entity.FieldTypeDefinition) EFieldTypeDefinition(ch.akros.marketplace.administration.constants.EFieldTypeDefinition) Checkbox(com.vaadin.flow.component.checkbox.Checkbox) TextField(com.vaadin.flow.component.textfield.TextField) NumberField(com.vaadin.flow.component.textfield.NumberField) ResponsiveStep(com.vaadin.flow.component.formlayout.FormLayout.ResponsiveStep)

Example 5 with ValueChangeEvent

use of com.vaadin.flow.component.HasValue.ValueChangeEvent in project karnak by OsiriX-Foundation.

the class MonitorView method buildDicomNodeListSelector.

private void buildDicomNodeListSelector() {
    dicomEchoNodeListSelector = new Select<>();
    dicomEchoNodeListSelector.setEmptySelectionAllowed(false);
    DicomNodeList pacsProdDicomNodeList = Util.readnodes(this.getClass().getResource("/config/pacs-nodes-web.csv"), "PACS Public WEB");
    DicomNodeList newPacsProdDicomNodeList = Util.readnodes(this.getClass().getResource("/config/workstations-nodes.csv"), "Workstations");
    dicomEchoNodeListSelector.setItems(pacsProdDicomNodeList, newPacsProdDicomNodeList);
    dicomEchoNodeListSelector.addValueChangeListener((ValueChangeListener<ValueChangeEvent<DicomNodeList>>) event -> logic.dicomNodeListSelected(event.getValue()));
    if (!pacsProdDicomNodeList.isEmpty()) {
        dicomEchoNodeListSelector.setValue(pacsProdDicomNodeList);
    }
}
Also used : DicomNodeList(org.karnak.backend.model.dicom.DicomNodeList) Html(com.vaadin.flow.component.Html) Select(com.vaadin.flow.component.select.Select) Util(org.karnak.frontend.dicom.Util) ValueChangeEvent(com.vaadin.flow.component.HasValue.ValueChangeEvent) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout) VerticalLayout(com.vaadin.flow.component.orderedlayout.VerticalLayout) Div(com.vaadin.flow.component.html.Div) AbstractView(org.karnak.frontend.dicom.AbstractView) H6(com.vaadin.flow.component.html.H6) ValueChangeListener(com.vaadin.flow.component.HasValue.ValueChangeListener) WadoNodeList(org.karnak.backend.model.dicom.WadoNodeList) Alignment(com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment) Button(com.vaadin.flow.component.button.Button) DicomNodeList(org.karnak.backend.model.dicom.DicomNodeList) ValueChangeEvent(com.vaadin.flow.component.HasValue.ValueChangeEvent)

Aggregations

ValueChangeEvent (com.vaadin.flow.component.HasValue.ValueChangeEvent)6 Div (com.vaadin.flow.component.html.Div)6 FormLayout (com.vaadin.flow.component.formlayout.FormLayout)3 ResponsiveStep (com.vaadin.flow.component.formlayout.FormLayout.ResponsiveStep)3 NumberField (com.vaadin.flow.component.textfield.NumberField)3 TextField (com.vaadin.flow.component.textfield.TextField)3 ValueChangeListener (com.vaadin.flow.component.HasValue.ValueChangeListener)2 Html (com.vaadin.flow.component.Html)2 Button (com.vaadin.flow.component.button.Button)2 Checkbox (com.vaadin.flow.component.checkbox.Checkbox)2 H6 (com.vaadin.flow.component.html.H6)2 Alignment (com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment)2 HorizontalLayout (com.vaadin.flow.component.orderedlayout.HorizontalLayout)2 VerticalLayout (com.vaadin.flow.component.orderedlayout.VerticalLayout)2 Select (com.vaadin.flow.component.select.Select)2 TextArea (com.vaadin.flow.component.textfield.TextArea)2 EFieldTypeDefinition (ch.akros.marketplace.administration.constants.EFieldTypeDefinition)1 FieldTypeDefinition (ch.akros.marketplace.administration.dataservice.entity.FieldTypeDefinition)1 Component (com.vaadin.flow.component.Component)1 HasValue (com.vaadin.flow.component.HasValue)1