Package com.vaadin.ui

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


                    @Override
                    public void buttonClick(ClickEvent event) {
                        log.log("button click listener fired");
                    }
                });
        button.focus();

        addComponent(log);
        addComponent(button);
    }
View Full Code Here


                        iconButton.setIcon(new ThemeResource(
                                "../runo/icons/16/ok.png"));
                        layout.addComponent(iconButton);

                        event.getButton().getUI().addWindow(w);
                        iconButton.focus();

                        if (tabOrder.getValue()) {
                            close.setTabIndex(5);
                        }
                    }
View Full Code Here

        }
        ((Window) c).close();

        Button prev = (Button) event.getButton().getData();
        if (prev != null) {
            prev.focus();
        }
    }

}
View Full Code Here

        final Button button = new Button("Refresh table");
        button.addClickListener(new Button.ClickListener() {

            @Override
            public void buttonClick(ClickEvent event) {
                button.focus();
                table.refreshRowCache();
            }
        });
        addComponent(button);
View Full Code Here

        final Button ok = new Button(okCaption != null ? okCaption
                : DEFAULT_OK_CAPTION);
        ok.setData(true);
        ok.setClickShortcut(KeyCode.ENTER, null);
        ok.setStyleName(Reindeer.BUTTON_DEFAULT);
        ok.focus();
        buttons.addComponent(ok);
        buttons.setComponentAlignment(ok, Alignment.MIDDLE_RIGHT);
        confirm.setOkButton(ok);

        // Create a listener for buttons
View Full Code Here

            button.setData(buttonName);
            if (defaultButton != null && defaultButton.equals(buttonName)) {
                button.setStyleName(Reindeer.BUTTON_DEFAULT);
                button.setClickShortcut(KeyCode.ENTER);
                // Request focus in this window...
                button.focus();
            }
            gl.addComponent(button);
        }

        addComponent(gl);
View Full Code Here

                                        Type.TRAY_NOTIFICATION);

                    }
                });
                buttons.addComponent(ok);
                ok.focus();

                alert.addShortcutListener(new ShortcutListener("Cancel",
                        KeyCode.ESCAPE, null) {
                    @Override
                    public void handleAction(Object sender, Object target) {
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.