Package com.vaadin.ui

Examples of com.vaadin.ui.Panel


    public UsingCustomNewItemHandlerInSelect() {

        VerticalLayout pl = new VerticalLayout();
        pl.setMargin(true);
        final Panel panel = new Panel("Select demo", pl);
        pl.addComponent(select);

        select.setCaption("Select component");
        select.setImmediate(true);
        select.addContainerProperty("CAPTION", String.class, "");
View Full Code Here


        final HorizontalSplitPanel sp2 = new HorizontalSplitPanel();
        sp2.setSplitPosition(255, Sizeable.UNITS_PIXELS);

        VerticalLayout pl = new VerticalLayout();
        pl.setMargin(true);
        final Panel p = new Panel("Accordion Panel", pl);
        p.setSizeFull();

        tab = new TabSheet();
        tab.setSizeFull();

        VerticalLayout reportLayout = new VerticalLayout();
        final Panel report = new Panel("Monthly Program Runs", reportLayout);
        final VerticalLayout controls = reportLayout;
        controls.setMargin(true);
        controls.addComponent(new Label("Report tab"));
        controls.addComponent(click);
        controls.addComponent(click2);
        reportLayout.addComponent(controls);
        final DateField cal = new DateField();
        cal.setResolution(DateField.RESOLUTION_DAY);
        cal.setLocale(new Locale("en", "US"));
        reportLayout.addComponent(cal);
        reportLayout.setExpandRatio(controls, 1);
        report.addStyleName(Reindeer.PANEL_LIGHT);
        report.setHeight(100, Sizeable.UNITS_PERCENTAGE);

        sp2.setFirstComponent(report);

        final Table table = TestForTablesInitialColumnWidthLogicRendering
                .getTestTable(5, 200);
View Full Code Here

                "This label changes its size between the breakpoints, allowing more space for the adjacent component.");
        label.addStyleName("change-width");
        label.setSizeUndefined();
        layout.addComponent(label);

        Panel panel = new Panel("Panel");
        panel.setContent(new Label(
                "This Panel should be maximized in both breakpoints."));
        panel.setSizeFull();
        layout.addComponent(panel);
        layout.setExpandRatio(panel, 1);
    }
View Full Code Here

        root.addComponent(getDateField());
        root.addComponent(getSelect());
        root.addComponent(getDateField());

        final VerticalLayout p1Layout = createPanelLayout();
        final Panel p1 = getPanel(p1Layout);
        p1.setContent(p1Layout);
        root.addComponent(p1);

        p1Layout.addComponent(getSelect());
        p1Layout.addComponent(getDateField());
        p1Layout.addComponent(getSelect());
        p1Layout.addComponent(getDateField());

        final AbstractOrderedLayout l1 = getOrderedLayout();
        p1Layout.addComponent(l1);

        l1.addComponent(getSelect());
        l1.addComponent(getDateField());
        l1.addComponent(getSelect());
        l1.addComponent(getDateField());

        final VerticalLayout p2Layout = createPanelLayout();
        final Panel p2 = getPanel(p2Layout);
        l1.addComponent(p2);

        p2Layout.addComponent(getSelect());
        p2Layout.addComponent(getDateField());
        p2Layout.addComponent(getSelect());
View Full Code Here

        layout.setMargin(true);
        return layout;
    }

    Panel getPanel(ComponentContainer content) {
        final Panel panel = new Panel(content);
        panel.setCaption(getCaption("panel"));
        return panel;
    }
View Full Code Here

        t.setImmediate(true);
        t.addActionHandler(this);
        final AbstractOrderedLayout ol = (AbstractOrderedLayout) createTestBench(t);
        al = new VerticalLayout();
        al.setMargin(true);
        ol.addComponent(new Panel("action log", al));
        main.addComponent(ol);
        contextTree = t;

        final Button b = new Button("refresh view", new Button.ClickListener() {
            @Override
View Full Code Here

        ol.addComponent(t);

        final VerticalLayout statusLayout = new VerticalLayout();
        statusLayout.setMargin(true);
        final Panel status = new Panel("Events", statusLayout);
        final Button clear = new Button("c");
        clear.addClickListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                statusLayout.removeAllComponents();
                statusLayout.addComponent(clear);
            }
        });
        statusLayout.addComponent(clear);

        status.setHeight("300px");
        status.setWidth("400px");

        ol.addComponent(status);

        t.addListener(new Listener() {
            @Override
View Full Code Here

        mainw.addComponent(new Label(
                "This test has somewhat invalid layouts in it to detect analyzy layout function in debug dialog"));

        HorizontalLayout hl = new HorizontalLayout();
        Panel panel = buildPanel("p1");
        Panel panel2 = buildPanel("p2");
        hl.addComponent(panel);
        hl.addComponent(panel2);

        mainw.addComponent(hl);

        hl = new HorizontalLayout();
        panel = buildPanel("p1");
        panel.setSizeUndefined();
        panel.setHeight("100%");
        panel2 = buildPanel("p2");
        panel2.setSizeUndefined();
        panel2.setHeight("100%");

        hl.addComponent(panel);
        hl.addComponent(panel2);
        mainw.addComponent(hl);
View Full Code Here

    }

    private Panel buildPanel(String caption) {
        VerticalLayout pl = new VerticalLayout();
        pl.setMargin(true);
        return new Panel(caption, pl);
    }
View Full Code Here

        Form form = new Form(formLayout);

        VerticalLayout vl = new VerticalLayout();
        vl.setMargin(true);
        vl.setSizeFull();
        Panel p = new Panel("Form " + w + "x" + h, vl);

        p.setWidth(w);
        p.setHeight(h);

        parentLayout.addComponent(p);
        vl.addComponent(form);
        formLayout.setSizeFull();
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Panel

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.