Package com.vaadin.ui

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


            }
        });

        Button refresh5 = new Button("Add five elements");
        addComponent(refresh5);
        refresh5.addListener(new ClickListener() {
            public void buttonClick(ClickEvent event) {
                container.addBean(new User("John", "Doe"));
                container.addBean(new User("Mark", "Twain"));
                container.addBean(new User("M", "T"));
                container.addBean(new User("J", "D"));
View Full Code Here


        buttonDisabled.setEnabled(false);

        buttonEnabled.setDescription("Tooltip for enabled");
        buttonDisabled.setDescription("Tooltip for disabled");

        buttonDisabled.addListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                getMainWindow().showNotification("Clicked Disabled");
            }
View Full Code Here

                        }
                    }
                }
            });

            saveButton.addListener(new ClickListener() {
                @Override
                public void buttonClick(ClickEvent event) {
                    form.commit();
                    Topping entity = getEntityForItem(form.getItemDataSource());
                    if (entity != null && entity.getId() == null) {
View Full Code Here

    @Override
    protected void setup(VaadinRequest request) {
        final VerticalLayout layout = new VerticalLayout();

        Button offset = new Button("Drag me");
        offset.addListener(new ClickListener() {
            @Override
            public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
                Notification.show("Button clicked!");
            }
        });
View Full Code Here

            public void buttonClick(ClickEvent event) {
                window.setContent(layout2);
            }
        });

        button2.addListener(new ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                window.setContent(layout1);
            }
View Full Code Here

        for (int i = 0; i < 4; i++) {
            addRow();
        }

        Button addrowButton = new Button("Add row");
        addrowButton.addListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent pEvent) {
                addRow();
            }
        });
View Full Code Here

        pl.addComponent(l);

        Button b = new Button("change label");

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

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

            }
        });

        Button b2 = new Button("toggle panel visibility");
        b2.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                p.setVisible(!p.isVisible());
            }
        });
View Full Code Here

    public void init() {
        Table table = new Table();
        table.setPageLength(50);

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

            @Override
            public void buttonClick(ClickEvent event) {
                up.getUI().setScrollTop(0);
            }
View Full Code Here

    }

    private Button createScriptButton(final String script) {
        Button b = new Button(script);
        b.addListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                getMainWindow().executeJavaScript(script);
            }
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.