Package com.vaadin.ui

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


        rootLayout.setMargin(true);
        root = new Panel("Test box", rootLayout);
        root.setWidth("600px");
        root.setHeight("200px");
        final Button b = new Button("Go try your luck with " + i + " layouts!");
        b.addListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                FF2KILLER(i++);
                b.setCaption("Go try your luck with " + i + " layouts!");
View Full Code Here


        f.setTabIndex(1);
        main.addComponent(f);

        // Main window button
        final Button b = new Button("Test Button in main window");
        b.addListener(this);
        b.setTabIndex(2);
        main.addComponent(b);

        reopen = new Button("Open modal subwindow");
        reopen.addListener(this);
View Full Code Here

        f.focus();

        // Modal window button
        final Button b = new Button("Test Button in modal window");
        b.setTabIndex(5);
        b.addListener(this);
        layout.addComponent(b);
    }
}
View Full Code Here

    void populateLayout(Layout layout) {

        final Button button = new Button("Button " + count++);
        test(layout, button);
        button.addListener(this);

        final DateField df = new DateField("DateField " + count++);
        test(layout, df);

        final CheckBox cb = new CheckBox("Checkbox " + count++);
View Full Code Here

        final Form form = new Form();
        final TextField tf = new TextField("Search");
        form.addField("searchfield", tf);

        Button button = new Button("Go");
        button.addListener(new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                log.log("search: " + tf.getValue());
            }
        });
View Full Code Here

            s.addItem("Foo");
            s.addItem("Bar");
        }

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

        formLayout.addComponent(userField);
        formLayout.addComponent(passwordField);
        formLayout.addComponent(login);
        mainWindow.setContent(formLayout);

        login.addListener(new ClickListener() {
            @Override
            public void buttonClick(final ClickEvent event) {
                String username = userField.getValue();
                String password = passwordField.getValue();
View Full Code Here

        header.addStyleName("header-background");
        Label title = new Label("...Title...");
        title.addStyleName("header-title");
        header.addComponent(title);
        Button logout = new Button("Logout");
        logout.addListener(new ClickListener() {
            @Override
            public void buttonClick(final ClickEvent event) {
                user = null;
                showLoginWindow();
            }
View Full Code Here

            }
        });

        Button button = new Button(
                "I'm an external button (not the uploads builtin), hit me to start upload.");
        button.addListener(new ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                u.submitUpload();
            }
        });
View Full Code Here

        final OptionGroup ogm = createOptionGroup("OptionGroup (multiselect)");
        ogm.setMultiSelect(true);
        l.addComponent(ogm);

        btn.addListener(new ClickListener() {

            private int i;

            @Override
            public void buttonClick(ClickEvent event) {
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.