Package com.vaadin.ui

Examples of com.vaadin.ui.Button.addListener()


            tab[i - 1].setEnabled(false);
        }

        layout.addComponent(tabSheet);
        Button btn = new Button("Enable and activate tab");
        btn.addListener(this);
        layout.addComponent(btn);
        return layout;
    }

    @Override
View Full Code Here


        treeLayout.addComponent(treetable);
        addComponent(treeLayout);

        Button cleanUp = new Button("clear");
        cleanUp.addListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                treeContainer.removeAllItems();
            }
        });
View Full Code Here

            }
        });
        addComponent(cleanUp);

        Button refresh = new Button("fill");
        refresh.addListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                fill();
            }
        });
View Full Code Here

    protected void setup() {

        createDataSources();

        Button b = new Button("Swap data source");
        b.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                if (combo.getContainerDataSource() == ds1) {
                    combo.setContainerDataSource(ds2);
                } else {
View Full Code Here

        for (int i = 0; i < 5; i++) {
            t.addContainerProperty("test" + i, Component.class, null);
        }

        Button fill = new Button("fill it");
        fill.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                t.removeAllItems();
                for (int i = 0; i < 200; i++) {
                    Item item = t.addItem(i);
View Full Code Here

            }

        });

        b2.addListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                toEdit.setValue("Second (edited)");
            }
View Full Code Here

            l = lo;

            setHeight("600px");

            Button componentChooser = new Button("choose component to edit");
            componentChooser.addListener(new Button.ClickListener() {
                @Override
                public void buttonClick(ClickEvent event) {
                    VerticalLayout layout = new VerticalLayout();
                    layout.setMargin(true);
                    final Window chooser = new Window("Choose component",
View Full Code Here

            });

            addComponent(componentChooser);

            Button addComp = new Button("add component");
            addComp.addListener(new Button.ClickListener() {
                @Override
                public void buttonClick(ClickEvent event) {
                    VerticalLayout layout = new VerticalLayout();
                    layout.setMargin(true);
                    final Window chooser = new Window(
View Full Code Here

        LegacyWindow w = new LegacyWindow();
        setMainWindow(w);
        VerticalLayout ol = new VerticalLayout();
        w.setContent(ol);
        Button b = new Button("close current tab");
        b.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                closeCurrentTab();

            }
View Full Code Here

            }
        });
        ol.addComponent(b);

        b = new Button("close first tab");
        b.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                closeFirstTab();

            }
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.