Package com.vaadin.ui

Examples of com.vaadin.ui.HorizontalLayout


    private static Layout createOL() {
        GridLayout layout = new GridLayout(1, 5);

        GridLayout l1 = new GridLayout(1, 3);
        createLayout(l1, new HorizontalLayout(), "1000px", "150px", "100%",
                null, true);
        createLayout(l1, new HorizontalLayout(), "1000px", "150px", "50px",
                null, false);
        GridLayout l2 = new GridLayout(6, 1);
        createLayout(l2, new VerticalLayout(), "200px", "500px", true);
        createLayout(l2, new VerticalLayout(), "200px", "500px", "100%", null,
                true);
View Full Code Here


        setMainWindow(new LegacyWindow("", content));
    }

    private HorizontalLayout createButtonLayout(String style) {
        HorizontalLayout layout = new HorizontalLayout();
        layout.setSpacing(true);
        layout.addComponent(createButton(style));
        layout.addComponent(createButton(style));
        layout.addComponent(createButton(style));
        return layout;
    }
View Full Code Here

    @Override
    public void init() {
        LegacyWindow main = new LegacyWindow("Quick test");
        setMainWindow(main);

        HorizontalLayout base = new HorizontalLayout();
        main.setContent(base);

        VerticalLayout content = new VerticalLayout();

        content.addComponent(new Label("Content."));
        content.setWidth("500px");

        Table table = new Table();

        table.setPageLength(10);

        table.setWidth("100%");

        table.addContainerProperty("Lähettäjä", String.class, "");
        table.addContainerProperty("Viestin tyyppi", String.class, "");

        for (int i = 0; i < 15; i++) {

            table.addItem(new Object[] { i + " Joku Ihminen", "Testiviesti" },

            new Object());

        }

        content.addComponent(table);

        Panel right = new Panel("Panel");

        right.setContent(new Label("Some basic text might show up here."));

        base.addComponent(content);

        base.addComponent(right);

    }
View Full Code Here

        addButtons(ol);
        pl.addComponent(ol);

        /* VERTICAL */

        ol = new HorizontalLayout();
        ol.setMargin(true);
        // ol.setCaption("Vertical");
        ol.setHeight("200px");
        addButtons(ol);
        // Button b = new Button("High button");
View Full Code Here

        addButtons(el);
        panelLayout.addComponent(el);

        /* VERTICAL */

        el = new HorizontalLayout();
        // el.setHeight(400);
        // el.setWidth("100%");
        // el.setCaption("Vertical");

        addButtons(el);
View Full Code Here

            Button ok = new Button("Confirm Delete", confirmClickListener);
            ok.setId(CONFIRM_BUTTON);
            ok.setData(itemId);
            Button cancel = new Button("Cancel", cancelClickListener);

            HorizontalLayout l = new HorizontalLayout();
            l.addComponent(ok);
            l.addComponent(cancel);

            setContent(l);

            UI.getCurrent().addWindow(this);
        }
View Full Code Here

            getMainWindow().addComponent(l2);
        }

        final Component x9 = l2;

        HorizontalLayout horizontalLayout = new HorizontalLayout();

        Component l = null;
        for (int i = 0; i < 10; i++) {
            l = l("Y" + i);
            horizontalLayout.addComponent(l);
        }

        getMainWindow().addComponent(horizontalLayout);
        final Component y9 = l;

        VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        final Window window = new Window();
        window.setHeight("500px");
        window.setWidth("500px");
        window.setPositionX(200);
        window.setPositionY(200);

        layout.addComponent(new Button("Scroll mainwin to X9",
                new ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        getMainWindow().scrollIntoView(x9);

                    }
                }));
        layout.addComponent(new Button("Scroll mainwin to Y9",
                new ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        getMainWindow().scrollIntoView(y9);

                    }
                }));

        VerticalLayout panelLayout = new VerticalLayout();
        panelLayout.setMargin(true);
        Panel panel = new Panel("scrollable panel", panelLayout);
        panel.setHeight(400, Panel.UNITS_PIXELS);
        panel.setScrollLeft(50);
        panel.setScrollTop(50);
        panelLayout.setSizeUndefined();
        layout.addComponent(l("Spacer", 500, 500));

        l2 = null;
        for (int i = 0; i < 10; i++) {
            l2 = l("X" + i);
            panelLayout.addComponent(l2);
        }

        final Component x29 = l2;

        horizontalLayout = new HorizontalLayout();

        l = null;
        for (int i = 0; i < 10; i++) {
            l = l("Y" + i);
            horizontalLayout.addComponent(l);
        }
        panelLayout.addComponent(horizontalLayout);
        final Component y29 = l;

        ((VerticalLayout) getMainWindow().getContent()).addComponent(
View Full Code Here

            Window.class);

    @Override
    protected void setup() {
        UI mainWindow = getMainWindow();
        HorizontalLayout controlpanels = new HorizontalLayout();
        for (int i = 1; i <= 5; i++) {
            VerticalLayout layout = new VerticalLayout();
            layout.setMargin(true);
            Window dialog = new Window("Dialog " + i, layout);
            layout.setSizeUndefined();
            windowlist.addBean(dialog);
            layout.addComponent(new Label("this is dialog number " + i));
            layout.addComponent(new ControlPanel());
            mainWindow.addWindow(dialog);
        }
        controlpanels.addComponent(new ControlPanel());
        getLayout().setSizeFull();
        getLayout().addComponent(controlpanels);
        getLayout().setComponentAlignment(controlpanels, Alignment.BOTTOM_LEFT);

    }
View Full Code Here

        for (int i = 0; i < 100; ++i) {
            table.addItem();
        }

        HorizontalLayout hl = new HorizontalLayout();
        hl.addComponent(new Button("Add first", new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                Item item = container.addItemAt(0, new Object());
                item.getItemProperty("column1").setValue("0");
            }
        }));
        hl.addComponent(new Button("Add at position 50",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        Item item = container.addItemAt(50, new Object());
                        item.getItemProperty("column1").setValue("50");
                    }
                }));
        hl.addComponent(new Button("Add at position 100",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        Item item = container.addItemAt(100, new Object());
                        item.getItemProperty("column1").setValue("100");
View Full Code Here

        ((SpacingHandler) w.getContent()).setSpacing(true);

        Layout layout = new GridLayout(3, 3);
        populateLayout(layout);
        w.addComponent(layout);
        layout = new HorizontalLayout();
        populateLayout(layout);
        w.addComponent(layout);

    }
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.