Package com.vaadin.ui

Examples of com.vaadin.ui.HorizontalLayout


    private VerticalLayout lo2;

    @Override
    protected void setup() {

        mainContent = new HorizontalLayout();
        mainContent.setSizeFull();

        lo2 = new VerticalLayout();
        Button button1 = new Button("asdasd1");
        button1.setHeight("90%");
View Full Code Here


            boolean sized) {

        String[] buttonStyles = new String[] { "Normal", "Primary", "Small",
                "Link" };

        HorizontalLayout hl = new HorizontalLayout();
        hl.setSpacing(true);
        hl.setMargin(true);

        for (int i = 0; i < buttonStyles.length; i++) {
            Button b;
            if (nativeButtons) {
                b = new NativeButton(buttonStyles[i] + " style");
            } else {
                b = new Button(buttonStyles[i] + " style");
            }
            b.setStyleName(buttonStyles[i].toLowerCase());
            if (icon) {
                b.setIcon(new ThemeResource("../runo/icons/"
                        + (largeIcons ? "64" : "16") + "/document.png"));
            }
            if (error) {
                b.setComponentError(new UserError("Error"));
            }
            if (disabled) {
                b.setEnabled(false);
            }
            if (sized) {
                b.setWidth("250px");
                b.setCaption(b.getCaption() + " (250px)");
            }
            hl.addComponent(b);
        }

        return hl;
    }
View Full Code Here

    protected void setup(VaadinRequest request) {
        getLayout().setSpacing(true);

        createCustomStyleStringField();

        HorizontalLayout selectors = new HorizontalLayout();
        selectors.setSpacing(true);

        selectors.addComponent(customStyle);
        selectors.addComponent(setStyleName);

        addComponent(selectors);

        sampler = new TestSampler();
        addComponent(sampler);
View Full Code Here

        return 2573;
    }

    @Override
    protected void setup() {
        HorizontalLayout main = new HorizontalLayout();
        getMainWindow().setContent(main);

        RichTextArea first = new RichTextArea();
        RichTextArea second = new RichTextArea();
        RichTextArea third = new RichTextArea();

        first.setWidth("150px");
        first.setHeight("400px");
        second.setSizeFull();
        third.setSizeUndefined();

        VerticalLayout secondLayout = new VerticalLayout();
        secondLayout.setWidth("200px");
        secondLayout.setHeight("200px");
        secondLayout.addComponent(second);

        main.addComponent(first);
        main.addComponent(secondLayout);
        main.addComponent(third);
    }
View Full Code Here

        Form form2 = new Form();
        Item item2 = createItem();
        form2.setItemDataSource(item2);

        // Layout
        HorizontalLayout hl = new HorizontalLayout();
        hl.addComponent(form1);
        hl.addComponent(form2);

        addComponent(hl);
    }
View Full Code Here

        topLayout.setSpacing(true);
        Label title = new Label("Calculator");
        topLayout.addComponent(title);
        topLayout.addComponent(log);

        HorizontalLayout horizontalLayout = new HorizontalLayout();
        horizontalLayout.setSpacing(true);
        horizontalLayout.addComponent(layout);
        horizontalLayout.addComponent(log);
        topLayout.addComponent(horizontalLayout);

        // Create a result label that over all 4 columns in the first row
        layout.setSpacing(true);
        layout.addComponent(display, 0, 0, 3, 0);
View Full Code Here

        mainWindow.addComponent(root);
    }

    private Component createHeader() {
        HorizontalLayout header = new HorizontalLayout();
        header.addStyleName("header-background");
        Label title = new Label("...Title...");
        title.addStyleName("header-title");
        header.addComponent(title);
        Button logout = new Button("Logout");
        logout.addListener(new ClickListener() {
            @Override
            public void buttonClick(final ClickEvent event) {
                user = null;
                showLoginWindow();
            }

        });
        header.addComponent(logout);
        return header;
    }
View Full Code Here

                    final TextField tf = new TextField();
                    tf.setSizeFull();
                    vl.addComponent(tf);

                    HorizontalLayout hl = new HorizontalLayout();

                    Button okButton = new Button("OK");
                    okButton.setWidth("100%");
                    okButton.addClickListener(new ClickListener() {
                        @Override
                        public void buttonClick(ClickEvent event) {
                            addRow("[ " + tf.getValue() + " ]");
                            tf.setValue("");
                            w.close();
                            removeWindow(w);
                        }
                    });

                    Button cancelButton = new Button("Cancel");
                    cancelButton.setWidth("100%");
                    cancelButton.addClickListener(new ClickListener() {
                        @Override
                        public void buttonClick(ClickEvent event) {
                            tf.setValue("");
                            w.close();
                            removeWindow(w);
                        }
                    });

                    hl.addComponent(cancelButton);
                    hl.addComponent(okButton);
                    hl.setSpacing(true);
                    hl.setWidth("100%");

                    vl.addComponent(hl);
                    vl.setSpacing(true);

                    w.setContent(vl);
View Full Code Here

                    select.markAsDirty();
                }
            }
        });

        HorizontalLayout controllers = new HorizontalLayout();
        controllers.addComponent(prev);
        controllers.addComponent(select);
        controllers.addComponent(next);
        main.addComponent(controllers);

        select.setContainerDataSource(cont);
        select.addListener(new ComboBox.ValueChangeListener() {
            @Override
View Full Code Here

        createUI(layoutContainer);
        addComponent(layoutContainer);
    }

    private void createUI(Layout layout) {
        layout.addComponent(wrapLayout(layout_field_100pct_button_field(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_field_100pct_button_field(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_overfilled(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_overfilled(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_overfilled_dynamic_height(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_overfilled_dynamic_height(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_symmetric_fields(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_symmetric_fields(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_leftAndRight(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_leftAndRight(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_fixed_filled(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_fixed_filled(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_dynamic(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_dynamic(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_labels(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_labels(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_captions(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_captions(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_captions_fixed_size(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_captions_fixed_size(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_captions_fixed_size_and_relative_size(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_captions_fixed_size_and_relative_size(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_captions_fixed_size_and_fixed_size(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_captions_fixed_size_and_fixed_size(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_add_remove_components(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_add_remove_components(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_pctFilled(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_pctFilled(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_underFilled(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_underFilled(new VerticalLayout())));
        layout.addComponent(wrapLayout(layout_basic_test(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_basic_test(new VerticalLayout())));
    }
View Full Code Here

TOP

Related Classes of com.vaadin.ui.HorizontalLayout

Copyright © 2018 www.massapicom. 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.