Package com.vaadin.ui

Examples of com.vaadin.ui.FormLayout.addComponent()


    @Override
    protected void setup() {
        FormLayout layout = new FormLayout();

        TextField field = new TextField("Field 1");
        layout.addComponent(field);

        addComponent(layout);
    }

    @Override
View Full Code Here


                    public void buttonClick(ClickEvent event) {
                        event.getButton().setVisible(false);
                    }
                }));

        formLayout.addComponent(new TextField(null, "____pqjgy____"));

        dialog.setContent(formLayout);

        getUI().addWindow(dialog);
    }
View Full Code Here

            public void buttonClick(ClickEvent event) {
                final FormLayout content = new FormLayout();
                ComboBox cb = new ComboBox();
                cb.addItem("foo");
                cb.addItem("bar");
                content.addComponent(cb);
                window.setContent(content);
                window.setCloseShortcut(KeyCode.ESCAPE);
                UI.getCurrent().addWindow(window);
            }
        });
View Full Code Here

                    replaceComponent(textField, textArea);
                    activeComponent = textArea;
                }
            }
        });
        fl.addComponent(ml);

        Button b = new Button("Select all ( selectAll() )");
        b.addListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
View Full Code Here

            @Override
            public void buttonClick(ClickEvent event) {
                activeComponent.selectAll();
            }
        });
        fl.addComponent(b);

        HorizontalLayout selectRange = new HorizontalLayout();
        selectRange
                .setCaption("Select range of text ( setSelectionRange(int start, int lengt) )");
        final TextField start = new TextField("From:");
View Full Code Here

        });

        selectRange.addComponent(start);
        selectRange.addComponent(length);
        selectRange.addComponent(b);
        fl.addComponent(selectRange);

        HorizontalLayout setCursorPosition = new HorizontalLayout();
        final TextField pos = new TextField("Position:");
        b = new Button("set");
        b.addListener(new ClickListener() {
View Full Code Here

        setCursorPosition.addComponent(pos);
        setCursorPosition.addComponent(b);
        setCursorPosition
                .setCaption("Set cursor position ( setCursorPosition(int pos) )");
        fl.addComponent(setCursorPosition);

        getLayout().addComponent(textField);
        getLayout().addComponent(panel);

    }
View Full Code Here

    @Override
    protected void setup(VaadinRequest request) {
        FormLayout formLayout = new FormLayout();
        PopupDateField fromDate = new PopupDateField("Date");
        fromDate.setImmediate(true);
        formLayout.addComponent(fromDate);

        addComponent(formLayout);
    }

    @Override
View Full Code Here

        FormLayout fl = new FormLayout();

        TextField f1 = createTextField("Text field 1", "");
        final TextField f2 = createTextField("Text field 2", "bold");

        fl.addComponent(f1);
        fl.addComponent(new Button("Toggle Text field 2 bold style",
                new Button.ClickListener() {

                    @Override
                    public void buttonClick(ClickEvent event) {
View Full Code Here

        TextField f1 = createTextField("Text field 1", "");
        final TextField f2 = createTextField("Text field 2", "bold");

        fl.addComponent(f1);
        fl.addComponent(new Button("Toggle Text field 2 bold style",
                new Button.ClickListener() {

                    @Override
                    public void buttonClick(ClickEvent event) {
                        if ("bold".equals(f2.getStyleName())) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.