Package com.vaadin.ui

Examples of com.vaadin.ui.AbstractSplitPanel$ComponentIterator


        if (cc instanceof ComponentContainer) {
            ((ComponentContainer) cc).addComponent(textArea);
        }

        if (AbstractSplitPanel.class.isAssignableFrom(c)) {
            AbstractSplitPanel sp = (AbstractSplitPanel) cc;
            sp.setWidth("300px");
            sp.setHeight("300px");
            sp.addComponent(new Label("Label"));
            textArea.setSizeFull();
        }
        if (c == Panel.class) {
            VerticalLayout layout = new VerticalLayout();
            layout.setMargin(true);
View Full Code Here


        wrap.addComponent(getSplit(true, "large"));
        wrap.addComponent(getSplit(false, "large"));
    }

    private AbstractSplitPanel getSplit(boolean horizontal, String style) {
        AbstractSplitPanel split = horizontal ? new HorizontalSplitPanel()
                : new VerticalSplitPanel();

        if (style != null) {
            split.addStyleName(style);
        }
        split.setWidth("300px");
        split.setHeight("300px");

        AbstractSplitPanel content = horizontal ? new VerticalSplitPanel()
                : new HorizontalSplitPanel();
        content.addComponent(new Label("First"));
        content.addComponent(new Label("Second"));
        split.addComponent(content);

        content = horizontal ? new VerticalSplitPanel()
                : new HorizontalSplitPanel();
        content.addComponent(new Label("First"));
        split.addComponent(content);

        // Inception level nesting, but we need to test that the first level
        // styles don't leak to a nested split panel with the same orientation
        AbstractSplitPanel content2 = horizontal ? new HorizontalSplitPanel()
                : new VerticalSplitPanel();
        content2.addComponent(new Label("First"));
        content2.addComponent(new Label("Second"));
        content.addComponent(content2);

        return split;
    }
View Full Code Here

TOP

Related Classes of com.vaadin.ui.AbstractSplitPanel$ComponentIterator

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.