Package com.vaadin.ui

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


        main.addComponent(b);

        final GridLayout gridLayout = new GridLayout(2, 2);
        main.addComponent(gridLayout);

        b.addListener(new Button.ClickListener() {
            int counter = 0;

            @Override
            public void buttonClick(ClickEvent event) {
View Full Code Here


        Button b = new Button("b");

        main.addComponent(b);
        main.addComponent(lo);
        b.addListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {

                repopupate(lo);
View Full Code Here

        tx.setMaxLength(10);

        final Label l = new Label();

        Button b = new Button("Check value");
        b.addListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                l.setValue("Length: " + tx.getValue().toString().length()
                        + " Content: " + tx.getValue());
View Full Code Here

        tx2.setImmediate(true);
        tx2.setRows(5);
        tx2.setMaxLength(10);

        Button b2 = new Button("Check value");
        b2.addListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                l.setValue("Length: " + tx2.getValue().toString().length()
                        + " Content: " + tx2.getValue());
View Full Code Here

                Label mainComponent = new Label("Main");
                Label header = new Label("Header");
                final Label anotherComponent = new Label("another");
                layout.addComponent(mainComponent, "body");
                layout.addComponent(header, "loginUser");
                button.addListener(new Button.ClickListener() {
                    @Override
                    public void buttonClick(Button.ClickEvent event) {
                        layout.addComponent(anotherComponent, "body");
                        layout.removeComponent("loginUser");
                    }
View Full Code Here

        statusLayout.setMargin(true);
        status.setVisible(false);
        main.addComponent(status);

        Button cancel = new Button("Cancel current upload");
        cancel.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                buffer.cancel();
            }
        });
View Full Code Here

        });

        main.addComponent(cancel);

        final Button restart = new Button("Restart demo application");
        restart.addListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                TestForStyledUpload.this.close();
            }
View Full Code Here

        statusLayout.setMargin(true);
        status.setVisible(false);
        main.addComponent(status);

        final Button restart = new Button("R");
        restart.addListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                LegacyWindow window = (LegacyWindow) event.getButton().getUI();
                window.getApplication().close();
View Full Code Here

        addComponent(treeTable);

        Button refresh = new Button("Add two elements");
        addComponent(refresh);
        refresh.addListener(new ClickListener() {
            public void buttonClick(ClickEvent event) {
                addTwoElements();
            }
        });
View Full Code Here

            }
        });

        Button reset = new Button("Reset");
        addComponent(reset);
        reset.addListener(new ClickListener() {
            public void buttonClick(ClickEvent event) {
                container.removeAllItems();
            }
        });
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.