Package com.vaadin.ui

Examples of com.vaadin.ui.VerticalSplitPanel


                .getContent();
        mainLayout.setSizeFull();
        mainLayout.setMargin(false);
        setMainWindow(mainWindow);

        VerticalSplitPanel sp = new VerticalSplitPanel();
        sp.setSizeFull();
        sp.setSplitPosition(20, Sizeable.UNITS_PIXELS);

        VerticalLayout pl = new VerticalLayout();
        pl.setMargin(true);
        p = new Panel("This is a panel", pl);
        p.setSizeFull();
        Label label1 = new Label("This is a table!");
        label1.setHeight("1500px");
        label1.setWidth("1500px");
        pl.addComponent(label1);
        p.setScrollTop(50);
        // MyTable table1 = new MyTable(24, "table1");
        // table1.loadTable(1000);

        // MyTable table2 = new MyTable(24, "table2");
        // table2.loadTable(1000);

        // MyTable table3 = new MyTable(24, "table3");
        // table3.loadTable(1000);

        // MyAccordion accordion = new MyAccordion(new Component[] { table1,
        // table2 }, "Test");

        Label a = new Label("abc123");
        TextField tf = new TextField("A large textfield");
        tf.setHeight("2500px");
        tf.setWidth("2500px");

        TabsAcc tab = new TabsAcc(new Component[] { p, a, tf });
        tab.addListener(this);

        mainLayout.addComponent(sp);
        sp.addComponent(new Label("C 1"));
        // sp.addComponent(new Label("C 2"));
        // sp.setHeight("100px");

        sp.addComponent(tab);
        // mainLayout.addComponent(new Label("Filler"));
        // mainLayout.addComponent(tab);
        // mainLayout.setExpandRatio(tab, 1.0f);
        // sp.addComponent(new Label("Filler"));
        // sp.addComponent(tab);
View Full Code Here


        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);
        sp2.setSecondComponent(sp);

        sp2.setHeight("200px");

        mainw.addComponent(sp2);

        mainw.addComponent(new Button("click me to save split panel state"));
    }
View Full Code Here

        private String previousFragment = null;

        public TestToppingsView() {
            setSizeFull();

            VerticalSplitPanel mainLayout = new VerticalSplitPanel();
            mainLayout.setSplitPosition(30);
            setCompositionRoot(mainLayout);

            table.setSizeFull();
            table.setImmediate(true);
            table.setSelectable(true);

            mainLayout.setFirstComponent(table);
            mainLayout.setSecondComponent(form);

            form.setImmediate(true);
            // this is critical for the problem to occur
            form.setBuffered(true);
View Full Code Here

        final LegacyWindow mainWin = new LegacyWindow(
                "Test app to break layout in IE6");
        setMainWindow(mainWin);

        VerticalSplitPanel sp = new VerticalSplitPanel();

        VerticalLayout l = new VerticalLayout();
        for (int i = 0; i < 100; i++) {
            l.addComponent(new Label("Label" + i));
        }
        sp.setFirstComponent(l);

        mainWin.setContent(sp);

    }
View Full Code Here

        item.getItemProperty("t2").setValue("Row2 t2");

        MyForm form = new MyForm();
        MyTable table = new MyTable(form, container);

        VerticalSplitPanel splitPanel = new VerticalSplitPanel();
        splitPanel.setWidth(100, Unit.PERCENTAGE);
        splitPanel.setHeight(400, Unit.PIXELS);
        splitPanel.setFirstComponent(table);
        splitPanel.setSecondComponent(form);
        splitPanel.setSplitPosition(50, Unit.PERCENTAGE);

        addComponent(splitPanel);
    }
View Full Code Here

        rootLayout = new VerticalLayout();
        main.setContent(rootLayout);

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

        firstLevelSplit = new VerticalSplitPanel();

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

        final VerticalLayout topRight = new VerticalLayout();
View Full Code Here

        gl.addComponent(new Label("Some content"));
        gl.setId("layout" + debugIdCounter++);

        addComponent(gl);

        VerticalSplitPanel vert = new VerticalSplitPanel();
        vert.setCaption("VertSplitPan");
        vert.setFirstComponent(new Label("Some content 1"));
        vert.setSecondComponent(new Label("Some content 2"));
        vert.setComponentError(new UserError("A error message..."));
        vert.setSplitPosition(50);
        vert.setEnabled(false);
        vert.setHeight("50px");
        vert.setId("layout" + debugIdCounter++);

        addComponent(vert);

        HorizontalSplitPanel horiz = new HorizontalSplitPanel();
        horiz.setSplitPosition(50);
        horiz.setFirstComponent(new Label("Some content 1"));
        horiz.setSecondComponent(new Label("Some content 2"));
        horiz.setIcon(new ThemeResource(parent.ICON_URL));
        horiz.setCaption("HorizSplitPan");
        horiz.setId("layout" + debugIdCounter++);

        addComponent(horiz);

        VerticalSplitPanel smallSplitPanel = new VerticalSplitPanel();
        smallSplitPanel.setCaption("SmallVertSplitPan");
        smallSplitPanel.setFirstComponent(new Label("Some content 1"));
        smallSplitPanel.setSecondComponent(new Label("Some content 2"));
        smallSplitPanel.setComponentError(new UserError("A error message..."));
        smallSplitPanel.setSplitPosition(50);
        smallSplitPanel.addStyleName(Reindeer.SPLITPANEL_SMALL);
        smallSplitPanel.setEnabled(false);
        smallSplitPanel.setHeight("50px");
        smallSplitPanel.setId("layout" + debugIdCounter++);
        addComponent(smallSplitPanel);

        String customLayoutSrc = "<html><div location='pos1' class='customclass'> </div></html>";

        CustomLayout custom;
View Full Code Here

        final LegacyWindow mainWin = new LegacyWindow(
                "Test app to break layout fuction in IE7");
        setMainWindow(mainWin);

        VerticalSplitPanel sp = new VerticalSplitPanel();

        sp.setFirstComponent(new Label("First"));

        VerticalLayout el = new VerticalLayout();

        sp.setSecondComponent(el);
        el.setMargin(true);
        el.setSizeFull();

        el.addComponent(new Label("Top"));
View Full Code Here

            table1.addItem(new Object[] { "Value " + i }, i);
        }
        left.addComponent(table1);
        left.setExpandRatio(table1, 1);

        VerticalSplitPanel split2 = new VerticalSplitPanel();
        split2.setSizeFull();
        split1.setSecondComponent(split2);

        Table table2 = new Table();
        table2.setSizeFull();
        table2.addContainerProperty("Column 1", String.class, "");
        table2.addContainerProperty("Column 2", String.class, "");
        table2.addContainerProperty("Column 3", String.class, "");
        table2.addContainerProperty("Column 4", String.class, "");
        for (int i = 1; i <= 100; i++) {
            table2.addItem(new Object[] { "Value " + i, "Value " + i,
                    "Value " + i, "Value " + i }, i);
        }
        split2.setFirstComponent(table2);

        VerticalLayout rows = new VerticalLayout();
        rows.setWidth("100%");
        rows.setSpacing(true);
        rows.setMargin(true);
        for (int i = 1; i <= 100; i++) {
            rows.addComponent(getRow(i));
        }
        split2.setSecondComponent(rows);
    }
View Full Code Here

        label.setWidth(null);
        l.addComponent(label);
        final HorizontalSplitPanel sp = new HorizontalSplitPanel();
        sp.setWidth("100%");
        sp.setHeight("100px");
        final VerticalSplitPanel sp2 = new VerticalSplitPanel();
        sp2.setSizeFull();
        sp.setSecondComponent(sp2);
        l.addComponent(sp);

        label = new Label(
                "Small Style<br />(<code>LiferayTheme.SPLITPANEL_SMALL</code>)",
                ContentMode.HTML);
        label.setWidth(null);
        l.addComponent(label);

        final HorizontalSplitPanel sp3 = new HorizontalSplitPanel();
        sp3.setStyleName(LiferayTheme.SPLITPANEL_SMALL);
        sp3.setWidth("100%");
        sp3.setHeight("100px");
        final VerticalSplitPanel sp4 = new VerticalSplitPanel();
        sp4.setStyleName(LiferayTheme.SPLITPANEL_SMALL);
        sp4.setSizeFull();
        sp3.setSecondComponent(sp4);
        l.addComponent(sp3);

        lockCheckBox.addListener(new Property.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                sp.setLocked((Boolean) event.getProperty().getValue());
                sp2.setLocked((Boolean) event.getProperty().getValue());
                sp3.setLocked((Boolean) event.getProperty().getValue());
                sp4.setLocked((Boolean) event.getProperty().getValue());
            }
        });

        return l;
    }
View Full Code Here

TOP

Related Classes of com.vaadin.ui.VerticalSplitPanel

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.