Search in sources :

Example 1 with TextArea

use of com.vaadin.flow.component.textfield.TextArea in project karnak by OsiriX-Foundation.

the class FormSTOW method init.

public void init(Binder<DestinationEntity> binder, ButtonSaveDeleteCancel buttonSaveDeleteCancel) {
    setSizeFull();
    this.binder = binder;
    this.deIdentificationComponent.init(this.binder);
    this.filterBySOPClassesForm.init(this.binder);
    this.destinationCondition.init(binder);
    notificationComponent.init(binder);
    transferSyntaxComponent.init(this.binder);
    transcodeOnlyUncompressedComponent.init(this.binder);
    this.description = new TextField("Description");
    this.url = new TextField("URL");
    this.urlCredentials = new TextField("URL credentials");
    this.headers = new TextArea("Headers");
    this.switchingAlbumsView = new SwitchingAlbumsView();
    this.activate = new Checkbox("Enable destination");
    // Define layout
    VerticalLayout destinationLayout = new VerticalLayout(UIS.setWidthFull(new HorizontalLayout(description)), destinationCondition, UIS.setWidthFull(new HorizontalLayout(url, urlCredentials)), UIS.setWidthFull(headers));
    VerticalLayout transferLayout = new VerticalLayout(new HorizontalLayout(transferSyntaxComponent, transcodeOnlyUncompressedComponent));
    VerticalLayout activateLayout = new VerticalLayout(activate);
    VerticalLayout switchingLayout = new VerticalLayout(switchingAlbumsView);
    // Set padding
    transferLayout.setPadding(true);
    destinationLayout.setPadding(true);
    activateLayout.setPadding(true);
    activateLayout.setPadding(true);
    // Add components
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(destinationLayout))));
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(transferLayout))));
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(notificationComponent))));
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(deIdentificationComponent))));
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(filterBySOPClassesForm))));
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(switchingLayout))));
    add(UIS.setWidthFull(new BoxShadowComponent(UIS.setWidthFull(activateLayout))));
    add(UIS.setWidthFull(buttonSaveDeleteCancel));
    setElements();
    setBinder();
}
Also used : TextArea(com.vaadin.flow.component.textfield.TextArea) Checkbox(com.vaadin.flow.component.checkbox.Checkbox) TextField(com.vaadin.flow.component.textfield.TextField) VerticalLayout(com.vaadin.flow.component.orderedlayout.VerticalLayout) BoxShadowComponent(org.karnak.frontend.component.BoxShadowComponent) SwitchingAlbumsView(org.karnak.frontend.kheops.SwitchingAlbumsView) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout)

Example 2 with TextArea

use of com.vaadin.flow.component.textfield.TextArea in project aire-components by aire-ux.

the class AddFeatureFlagOverlay method addContent.

private void addContent() {
    val form = new FormLayout();
    keyInputField = new TextField("Key");
    nameInputField = new TextField("Name");
    descriptionInput = new TextArea("Description");
    pathInputField = new Select<>();
    pathInputField.setLabel("Extension Path");
    pathInputField.setItems(getExtensionKeys());
    tagInputField = new TextField("Tags");
    enabledSwitch = new Switch("Enabled");
    form.add(keyInputField, nameInputField, pathInputField, enabledSwitch, tagInputField, descriptionInput);
    form.setColspan(descriptionInput, 2);
    addContent(form);
}
Also used : lombok.val(lombok.val) FormLayout(com.vaadin.flow.component.formlayout.FormLayout) Switch(io.sunshower.zephyr.ui.controls.Switch) TextArea(com.vaadin.flow.component.textfield.TextArea) TextField(com.vaadin.flow.component.textfield.TextField)

Example 3 with TextArea

use of com.vaadin.flow.component.textfield.TextArea in project flow-components by vaadin.

the class TextAreaPage method addMinHeightFeature.

private void addMinHeightFeature() {
    Div message = new Div();
    TextArea textArea = new TextArea();
    textArea.setLabel("Text area won't shrink under 125px");
    textArea.getStyle().set("minHeight", "125px");
    textArea.getStyle().set("padding", "0");
    textArea.setId("text-area-with-min-height");
    add(textArea, message);
}
Also used : Div(com.vaadin.flow.component.html.Div) TextArea(com.vaadin.flow.component.textfield.TextArea)

Example 4 with TextArea

use of com.vaadin.flow.component.textfield.TextArea in project flow-components by vaadin.

the class ValueChangeModePage method initView.

private void initView() {
    message = new Div();
    message.setId("message");
    add(message);
    Stream.of(new TextField(), new TextArea(), new PasswordField(), new NumberField(), new EmailField(), new IntegerField(), new BigDecimalField()).forEach(this::setupTestComponent);
}
Also used : Div(com.vaadin.flow.component.html.Div) TextArea(com.vaadin.flow.component.textfield.TextArea) EmailField(com.vaadin.flow.component.textfield.EmailField) TextField(com.vaadin.flow.component.textfield.TextField) IntegerField(com.vaadin.flow.component.textfield.IntegerField) PasswordField(com.vaadin.flow.component.textfield.PasswordField) NumberField(com.vaadin.flow.component.textfield.NumberField) BigDecimalField(com.vaadin.flow.component.textfield.BigDecimalField)

Example 5 with TextArea

use of com.vaadin.flow.component.textfield.TextArea in project flow-components by vaadin.

the class TextAreaPage method addDisabledField.

private void addDisabledField() {
    TextArea textArea = new TextArea();
    textArea.setLabel("Text area label");
    textArea.setPlaceholder("placeholder text");
    textArea.setEnabled(false);
    textArea.setId("disabled-text-area");
    Div message = new Div();
    message.setId("disabled-text-area-message");
    textArea.addValueChangeListener(change -> message.setText("Value changed"));
    add(textArea, message);
}
Also used : Div(com.vaadin.flow.component.html.Div) TextArea(com.vaadin.flow.component.textfield.TextArea)

Aggregations

TextArea (com.vaadin.flow.component.textfield.TextArea)52 TextField (com.vaadin.flow.component.textfield.TextField)14 Test (org.junit.jupiter.api.Test)13 Div (com.vaadin.flow.component.html.Div)8 VerticalLayout (com.vaadin.flow.component.orderedlayout.VerticalLayout)6 Test (org.junit.Test)6 Button (com.vaadin.flow.component.button.Button)5 HorizontalLayout (com.vaadin.flow.component.orderedlayout.HorizontalLayout)5 Checkbox (com.vaadin.flow.component.checkbox.Checkbox)4 FormLayout (com.vaadin.flow.component.formlayout.FormLayout)4 H3 (com.vaadin.flow.component.html.H3)3 EmailField (com.vaadin.flow.component.textfield.EmailField)3 NumberField (com.vaadin.flow.component.textfield.NumberField)3 ValueChangeEvent (com.vaadin.flow.component.HasValue.ValueChangeEvent)2 ResponsiveStep (com.vaadin.flow.component.formlayout.FormLayout.ResponsiveStep)2 H2 (com.vaadin.flow.component.html.H2)2 NativeButton (com.vaadin.flow.component.html.NativeButton)2 StringLengthValidator (com.vaadin.flow.data.validator.StringLengthValidator)2 Route (com.vaadin.flow.router.Route)2 EFieldTypeDefinition (ch.akros.marketplace.administration.constants.EFieldTypeDefinition)1