Package com.vaadin.ui

Examples of com.vaadin.ui.VerticalLayout.removeAllComponents()


        while (it.hasNext()) {
            components.add(it.next());
        }

        final VerticalLayout v = main;
        v.removeAllComponents();

        for (int i = components.size(); i > 0; i--) {
            final int index = (int) (Math.random() * i);
            v.addComponent(components.get(index));
            components.remove(index);
View Full Code Here


        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);
View Full Code Here

        assertOrder(layout2, new int[] { 0, 1, 2, 3 });

        layout2.addComponents(extra);
        assertSame(extra, layout2.getComponent(4));

        layout2.removeAllComponents();
        layout2.addComponents(children[3], children[2], children[1],
                children[0]);
        assertOrder(layout2, new int[] { 3, 2, 1, 0 });
    }
View Full Code Here

        final Panel status = new Panel("Events", statusLayout);
        final Button clear = new Button("clear event log");
        clear.addClickListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                statusLayout.removeAllComponents();
                statusLayout.addComponent(ol2);
            }
        });
        ol2.addComponent(clear);
        final Button commit = new Button("commit changes");
View Full Code Here

        VerticalLayout ol = new VerticalLayout();

        VerticalLayout el = new VerticalLayout();

        el.removeAllComponents();

        ol.setWidth((String) width.getValue());
        ol.setHeight((String) height.getValue());

        ol.addComponent(getTestComponent());
View Full Code Here

        Button button = new Button("Toggle");
        button.setId("toggle");
        button.addClickListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                contentLayout.removeAllComponents();
                if (state) {
                    contentLayout.addComponent(component1);
                } else {
                    contentLayout.addComponent(component2);
                }
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.