Search in sources :

Example 1 with TextField

use of com.storedobject.vaadin.TextField in project SODevelopment by syampillai.

the class ManageJettyApplication method buildFields.

@Override
protected void buildFields() {
    server = new TextField("Application");
    setRequired(server);
    addField(server);
    ELabel warning = new ELabel("Your action may affect other live users!", "red");
    warning.update();
    addField(new CompoundField("Warning", warning));
}
Also used : ELabel(com.storedobject.ui.ELabel) TextField(com.storedobject.vaadin.TextField) CompoundField(com.storedobject.vaadin.CompoundField)

Example 2 with TextField

use of com.storedobject.vaadin.TextField in project SODevelopment by syampillai.

the class ObjectGetField method createPrefixComponent.

@Override
protected Component createPrefixComponent() {
    if (searchField != null) {
        return searchField;
    }
    searchField = new TextField();
    searchField.setWidth(w() + "px");
    ButtonLayout buttonLayout = new ButtonLayout();
    ImageButton search = new ImageButton("Search", e -> doSearch()).withBox();
    if (addButton != null) {
        buttonLayout.add(addButton);
    }
    ImageButton b = new ImageButton("Cancel", e -> {
        setValue((Id) null);
        searchField.focus();
    }).withBox();
    buttonLayout.add(b);
    buttonLayout.add(search);
    searchField.setPrefixComponent(buttonLayout);
    return searchField;
}
Also used : com.storedobject.core(com.storedobject.core) Consumer(java.util.function.Consumer) Component(com.vaadin.flow.component.Component) SORuntimeException(com.storedobject.common.SORuntimeException) TextField(com.storedobject.vaadin.TextField) Modifier(java.lang.reflect.Modifier) VaadinIcon(com.vaadin.flow.component.icon.VaadinIcon) ImageButton(com.storedobject.vaadin.ImageButton) Method(java.lang.reflect.Method) ButtonLayout(com.storedobject.vaadin.ButtonLayout) ImageButton(com.storedobject.vaadin.ImageButton) ButtonLayout(com.storedobject.vaadin.ButtonLayout) TextField(com.storedobject.vaadin.TextField)

Example 3 with TextField

use of com.storedobject.vaadin.TextField in project SODevelopment by syampillai.

the class ManageTomcatApplication method buildFields.

@Override
protected void buildFields() {
    server = new TextField("Application");
    server.setRequired(true);
    addField(server);
    action = new RadioField<>("Action", new String[] { "Reload", "Stop", "Start" });
    addField(action);
    warning = new ELabel("Your action may affect other live users!", "red");
    warning.update();
    addField(new CompoundField("Warning", warning));
}
Also used : ELabel(com.storedobject.ui.ELabel) TextField(com.storedobject.vaadin.TextField) CompoundField(com.storedobject.vaadin.CompoundField)

Example 4 with TextField

use of com.storedobject.vaadin.TextField in project SODevelopment by syampillai.

the class MoneyField method customizeTextField.

@Override
protected void customizeTextField(HasTextValue textField) {
    if (symbol == null) {
        symbol = new Span();
    }
    TextField textField1 = (TextField) textField;
    textField1.setSuffixComponent(symbol);
}
Also used : CustomTextField(com.storedobject.vaadin.CustomTextField) TextField(com.storedobject.vaadin.TextField) Span(com.vaadin.flow.component.html.Span)

Aggregations

TextField (com.storedobject.vaadin.TextField)4 ELabel (com.storedobject.ui.ELabel)2 CompoundField (com.storedobject.vaadin.CompoundField)2 SORuntimeException (com.storedobject.common.SORuntimeException)1 com.storedobject.core (com.storedobject.core)1 ButtonLayout (com.storedobject.vaadin.ButtonLayout)1 CustomTextField (com.storedobject.vaadin.CustomTextField)1 ImageButton (com.storedobject.vaadin.ImageButton)1 Component (com.vaadin.flow.component.Component)1 Span (com.vaadin.flow.component.html.Span)1 VaadinIcon (com.vaadin.flow.component.icon.VaadinIcon)1 Method (java.lang.reflect.Method)1 Modifier (java.lang.reflect.Modifier)1 Consumer (java.util.function.Consumer)1