Examples of HorizontalSplitPanel


Examples of com.vaadin.ui.HorizontalSplitPanel

@Theme("tests-responsive")
public class ResponsiveUI extends AbstractTestUI {
    @Override
    protected void setup(VaadinRequest request) {
        HorizontalSplitPanel split = new HorizontalSplitPanel();
        setContent(split);
        split.setSplitPosition(50, Unit.PERCENTAGE);
        split.setMinSplitPosition(100, Unit.PIXELS);
        split.setMaxSplitPosition(1200, Unit.PIXELS);
        setStyleName("responsive-test");

        CssLayout firstGrid = makeGrid("first");
        CssLayout secondGrid = makeGrid("second");
        CssLayout grids = new CssLayout();
        grids.setSizeFull();
        grids.addComponent(firstGrid);
        grids.addComponent(secondGrid);
        split.addComponent(grids);

        Label description = new Label(
                "<h3>This application demonstrates the Responsive extension in Vaadin.</h3>"
                        + "<p>Drag the splitter to see how the boxes on the left side adapt to "
                        + "different widths. They maintain a width of 100-200px, and always "
                        + "span the entire width of the container.</p><p>This label will "
                        + "adapt its font size and line height for different widths.</p>"
                        + "<p><a href=\"http://vaadin.com/download\">Download "
                        + "Vaadin</a></p>", ContentMode.HTML);
        description.addStyleName("description");
        split.addComponent(description);

        // Add the responsive capabilities to the components
        Responsive.makeResponsive(firstGrid);
        Responsive.makeResponsive(secondGrid);
        Responsive.makeResponsive(description);
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

    public void init() {
        mainWindow = new LegacyWindow();
        setTheme("tests-components");
        mainWindow.getContent().setSizeFull();
        setMainWindow(mainWindow);
        sp = new HorizontalSplitPanel();
        sp.setSizeFull();
        VerticalLayout naviLayout = new VerticalLayout();
        naviLayout
                .addComponent(new Label(
                        "Click to open a test case.<br/>Right click to open test in a new window<br/><br/>",
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

                tab.setHeight(100, TabSheet.UNITS_PERCENTAGE);
            }

        });

        final HorizontalSplitPanel sp = new HorizontalSplitPanel();
        sp.setSplitPosition(290, Sizeable.UNITS_PIXELS);

        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);
        table.setPageLength(15);
        table.setSelectable(true);
        table.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);
        table.setColumnCollapsingAllowed(true);
        table.setColumnReorderingAllowed(true);
        table.setSortDisabled(false);
        table.setSizeFull();
        table.addStyleName("table-inline");
        sp2.setSecondComponent(table);

        tab.addTab(new Label("Tab1"), "Summary", null);
        tab.addTab(sp2, "Reports", null);
        tab.addTab(new Label("Tab 3"), "Statistics", null);
        tab.addTab(new Label("Tab 4"), "Error Tracking", null);
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

    final Table table = new Table();

    @Override
    protected void setup() {
        HorizontalSplitPanel split = new HorizontalSplitPanel();
        table.addContainerProperty("name", Integer.class, 0);
        Button button = new Button("Add items", new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                for (int i = 0; i < 5; i++) {
                    Object id = table.addItem();
                    table.getItem(id).getItemProperty("name").setValue(i);
                }
            }
        });
        table.setEnabled(false);
        table.setSizeFull();
        split.setFirstComponent(table);
        split.setSecondComponent(button);
        getLayout().setSizeFull();
        split.setSizeFull();
        addComponent(split);
    }
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

    public void init() {
        mainWindow = new LegacyWindow("SQLContainer Test");
        setMainWindow(mainWindow);
        mainWindow.getContent().setSizeFull();

        panel = new HorizontalSplitPanel();
        panel.setSecondComponent(label);

        final DatabaseHelper helper = new DatabaseHelper();
        table = new Table();
        table.setSizeFull();
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

        hl.addComponent(panel);
        hl.addComponent(panel2);
        mainw.addComponent(hl);

        HorizontalSplitPanel sp = new HorizontalSplitPanel();

        VerticalLayout first = new VerticalLayout();
        first.addComponent(new Label("first"));
        VerticalLayout second = new VerticalLayout();
        second.addComponent(new Label("second"));

        sp.setFirstComponent(first);
        sp.setSecondComponent(second);

        VerticalSplitPanel sp2 = new VerticalSplitPanel();
        Label label = new Label("first");
        label.setSizeFull();
        sp2.setFirstComponent(label);
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

        leftComponent.addComponent(tables[2]);
        leftComponent.setExpandRatio(tables[2], 1.0f);

        leftComponent.setWidth("100%");

        HorizontalSplitPanel split = new HorizontalSplitPanel();
        split.setFirstComponent(leftComponent);

        VerticalLayout rightComponent = new VerticalLayout();
        rightComponent.setMargin(true);
        rightComponent.addComponent(new Label("Left blank!"));
        split.setSecondComponent(rightComponent);

        split.setSizeFull();

        VerticalLayout mainLayout = new VerticalLayout();
        mainLayout.setSizeFull();
        mainLayout.addComponent(split);
        mainLayout.setExpandRatio(split, 1.0f);
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

        rootLayout.addComponent(new Label("header"));

        firstLevelSplit = new VerticalSplitPanel();

        final HorizontalSplitPanel secondSplitPanel = new HorizontalSplitPanel();
        secondSplitPanel.setFirstComponent(new Label("left"));

        final VerticalLayout topRight = new VerticalLayout();
        topRight.addComponent(new Label("topright header"));

        final Table t = TestForTablesInitialColumnWidthLogicRendering
                .getTestTable(4, 100);
        t.setSizeFull();
        topRight.addComponent(t);
        topRight.setExpandRatio(t, 1);

        topRight.addComponent(new Label("topright footer"));

        secondSplitPanel.setSecondComponent(topRight);

        final VerticalLayout el = new VerticalLayout();
        el.addComponent(new Label("B��"));

        firstLevelSplit.setFirstComponent(secondSplitPanel);
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

        return 3065;
    }

    @Override
    protected void setup() {
        HorizontalSplitPanel sp = new HorizontalSplitPanel();
        sp.setWidth("100%");
        sp.setHeight("100px");

        Accordion acc = new Accordion();

        Tab tab1 = acc.addTab(new TextField("first field"));
        tab1.setCaption("First tab");

        Tab tab2 = acc.addTab(new TextField("second field"));
        tab2.setCaption("Second tab");

        acc.setSizeFull();

        sp.addComponent(acc);
        addComponent(sp);

    }
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

    protected void setup() {
        instance = this; // Note, test only works with single app per server if
        // get()
        // not converted to thread local

        sp = new HorizontalSplitPanel();
        sp.setSplitPosition(20);
        CssLayout l = new CssLayout();
        sp.setFirstComponent(l);

        tree1 = new Tree("Volume 1");
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.