Search in sources :

Example 11 with TextField

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

the class NotificationComponent method buildNotifyObjectValues.

/**
 * Notify Object Values
 */
private void buildNotifyObjectValues() {
    notifyObjectValues = new TextField(String.format("Notif.: subject values (Default: %s)", Notification.DEFAULT_SUBJECT_VALUES));
    notifyObjectValues.setWidth("24%");
    UIS.setTooltip(notifyObjectValues, String.format("Values injected in the pattern [PatientID StudyDescription StudyDate StudyInstanceUID]. Default value: %s", Notification.DEFAULT_SUBJECT_VALUES));
}
Also used : TextField(com.vaadin.flow.component.textfield.TextField)

Example 12 with TextField

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

the class SourceView method buildComponentsLayout.

/**
 * Create components, layout and add the layout of the view
 */
private void buildComponentsLayout() {
    setSizeFull();
    gridSourceNode = new GridSourceNode();
    filter = new TextField();
    newSourceNode = new Button(LABEL_NEW_SOURCE_NODE);
    layoutFilterButton = new HorizontalLayout(filter, newSourceNode);
    layoutFilterButton.setVerticalComponentAlignment(Alignment.START, filter);
    layoutFilterButton.expand(filter);
    setTextFieldFilter();
    setButtonNewDestinationDICOM();
    add(UIS.setWidthFull(layoutFilterButton), UIS.setWidthFull(gridSourceNode));
}
Also used : Button(com.vaadin.flow.component.button.Button) TextField(com.vaadin.flow.component.textfield.TextField) GridSourceNode(org.karnak.frontend.forwardnode.edit.source.component.GridSourceNode) HorizontalLayout(com.vaadin.flow.component.orderedlayout.HorizontalLayout)

Example 13 with TextField

use of com.vaadin.flow.component.textfield.TextField in project WebComponentKit by itsoulltd.

the class AbstractBeanEditor method getValueField.

protected HasValue getValueField(Property prop) {
    HasValue hasValue = null;
    if (prop.getType() == DataType.BOOL) {
        Checkbox box = new Checkbox();
        box.setLabel(prop.getKey());
        if (prop.getValue() != null)
            box.setValue((Boolean) prop.getValue());
        else
            box.setIndeterminate(true);
        hasValue = box;
    } else if (prop.getType() == DataType.SQLDATE) {
        DatePicker datePicker = new DatePicker();
        datePicker.setValue(LocalDate.now());
        datePicker.setClearButtonVisible(true);
        hasValue = datePicker;
    } else if (prop.getType() == DataType.SQLTIMESTAMP) {
        TimePicker timePicker = new TimePicker();
        timePicker.setValue(LocalTime.now());
        timePicker.setClearButtonVisible(true);
        hasValue = timePicker;
    } else {
        TextField field = new TextField();
        field.setLabel(prop.getKey());
        hasValue = field;
    }
    return hasValue;
}
Also used : TimePicker(com.vaadin.flow.component.timepicker.TimePicker) Checkbox(com.vaadin.flow.component.checkbox.Checkbox) TextField(com.vaadin.flow.component.textfield.TextField) DatePicker(com.vaadin.flow.component.datepicker.DatePicker)

Example 14 with TextField

use of com.vaadin.flow.component.textfield.TextField 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 15 with TextField

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

the class FeatureList method createMenuBar.

private Component createMenuBar() {
    val result = new MenuBar();
    result.addThemeVariants(MenuBarVariant.LUMO_SMALL, MenuBarVariant.LUMO_ICON, MenuBarVariant.LUMO_TERTIARY_INLINE);
    searchField = new TextField();
    searchField.setPlaceholder("Search");
    searchField.setClearButtonVisible(true);
    searchField.setPrefixComponent(VaadinIcon.SEARCH.create());
    searchField.setValueChangeMode(ValueChangeMode.EAGER);
    searchField.addValueChangeListener(this);
    result.addItem(searchField);
    val addButton = new Button("Add Feature Flag", VaadinIcon.PLUS.create());
    addButton.addClickListener(click -> {
        val overlay = Overlays.open(this, AddFeatureFlagOverlay.class);
        overlay.addOverlayClosedEventListener(event -> {
            if (!event.isCancelled()) {
                featureManager.registerFeature(overlay.getValue());
                grid.getDataProvider().refreshAll();
            }
        });
    });
    result.addItem(addButton);
    return result;
}
Also used : lombok.val(lombok.val) Button(com.vaadin.flow.component.button.Button) MenuBar(com.vaadin.flow.component.menubar.MenuBar) TextField(com.vaadin.flow.component.textfield.TextField)

Aggregations

TextField (com.vaadin.flow.component.textfield.TextField)227 Test (org.junit.jupiter.api.Test)61 Button (com.vaadin.flow.component.button.Button)54 Div (com.vaadin.flow.component.html.Div)38 HorizontalLayout (com.vaadin.flow.component.orderedlayout.HorizontalLayout)32 FormLayout (com.vaadin.flow.component.formlayout.FormLayout)29 Binder (com.vaadin.flow.data.binder.Binder)29 GeneratedVaadinTextField (com.vaadin.flow.component.textfield.GeneratedVaadinTextField)28 Element (com.vaadin.flow.dom.Element)26 VerticalLayout (com.vaadin.flow.component.orderedlayout.VerticalLayout)23 Route (com.vaadin.flow.router.Route)21 Component (com.vaadin.flow.component.Component)16 Checkbox (com.vaadin.flow.component.checkbox.Checkbox)15 BinderCrudEditor (com.vaadin.flow.component.crud.BinderCrudEditor)15 Grid (com.vaadin.flow.component.grid.Grid)15 Span (com.vaadin.flow.component.html.Span)15 List (java.util.List)15 EmailField (com.vaadin.flow.component.textfield.EmailField)14 TextArea (com.vaadin.flow.component.textfield.TextArea)14 Test (org.junit.Test)14