本文整理了Java中com.vaadin.ui.Button.focus()
方法的一些代码示例,展示了Button.focus()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.focus()
方法的具体详情如下:
包路径:com.vaadin.ui.Button
类名称:Button
方法名:focus
暂无
代码示例来源:origin: KrailOrg/krail
/**
* See {@link ButtonOption#apply(MessageBox, Button)}
*/
@Override
public void apply(MessageBox messageBox, Button button) {
button.focus();
}
代码示例来源:origin: org.activiti/activiti-explorer
/**
* Show the confirmation popup.
*/
public void showConfirmation() {
yesButton.focus();
ExplorerApp.get().getViewManager().showPopupWindow(this);
}
代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui
private void buildSignInButton() {
final String caption = isDemo
? i18n.getMessage("button.login.agreeandsignin")
: i18n.getMessage("button.login.signin");
signIn = new Button(caption);
signIn.addStyleName(ValoTheme.BUTTON_PRIMARY + " " + ValoTheme.BUTTON_SMALL + " " + "login-button");
signIn.setClickShortcut(KeyCode.ENTER);
signIn.focus();
signIn.setId("login-signin");
}
代码示例来源:origin: eclipse/hawkbit
private void buildSignInButton() {
final String caption = isDemo ? i18n.getMessage("button.login.agreeandsignin")
: i18n.getMessage("button.login.signin");
signIn = new Button(caption);
signIn.addStyleName(ValoTheme.BUTTON_PRIMARY + " " + ValoTheme.BUTTON_SMALL + " " + "login-button");
signIn.setClickShortcut(KeyCode.ENTER);
signIn.focus();
signIn.setId("login-signin");
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework
private void addOkHandler(BaseDialog dialog, String okButtonText, final OverlayCloser overlayCloser, final AlertCallback cb) {
CssLayout footer = new CssLayout();
footer.setWidth(100, Unit.PERCENTAGE);
footer.addStyleName("v-align-right");
Button okButton = new Button(okButtonText, new ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
cb.onOk();
overlayCloser.close();
}
});
okButton.focus();
footer.addComponent(okButton);
dialog.setFooterToolbar(footer);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets
cancelButton.focus();
} else {
confirmButton.focus();
代码示例来源:origin: apache/ace
button.setClickShortcut(KeyCode.ENTER);
button.focus();
代码示例来源:origin: com.github.markash/components
@SuppressWarnings("serial")
private Component buildFields() {
HorizontalLayout fields = new HorizontalLayout();
fields.setSpacing(true);
fields.addStyleName("fields");
usernameField.setIcon(VaadinIcons.USER);
usernameField.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
usernameField.setDescription("The users are <br />"
+ "<ul>"
+ "<li><strong>admin</strong> with password <strong>password</strong>"
+ "<li><strong>katie</strong> with password <strong>password</strong>"
+ "<li><strong>marmite</strong> with password <strong>password</strong>"
+ "<li><strong>brown</strong> with password <strong>password</strong>"
+ "<li><strong>linus</strong> with password <strong>password</strong>"
+ "<li><strong>lucy</strong> with password <strong>password</strong>"
+ "</ul>");
passwordField.setIcon(VaadinIcons.LOCK);
passwordField.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
loginButton.addStyleName(ValoTheme.BUTTON_PRIMARY);
loginButton.setClickShortcut(ShortcutAction.KeyCode.ENTER);
loginButton.focus();
fields.addComponents(usernameField, passwordField, loginButton);
fields.setComponentAlignment(loginButton, Alignment.BOTTOM_LEFT);
return fields;
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets
public Notification(final MessageStyleType type) {
layout = new CssLayout();
layout.addStyleName("light-dialog-panel");
layout.addStyleName("notification-dialog");
layout.addStyleName(type.getCssClass());
CompositeIcon icon = (CompositeIcon) Classes.getClassFactory().newInstance(type.getIconClass());
icon.setStyleName("dialog-icon");
layout.addComponent(icon);
layout.addLayoutClickListener(new LayoutClickListener() {
@Override
public void layoutClick(LayoutClickEvent event) {
layout.addStyleName("notification-dialog-selected");
}
});
closeButton.addStyleName("close");
closeButton.setDisableOnClick(true);
closeButton.setHtmlContentAllowed(true);
closeButton.setCaption("<span class=\"m-closebutton icon-close m-closebutton-dialog\"></span>");
closeButton.focus();
layout.addComponent(closeButton);
}
代码示例来源:origin: jreznot/electron-java-app
private void onMenuAbout() {
Window helpWindow = new Window();
helpWindow.setCaption("About");
helpWindow.setModal(true);
helpWindow.setResizable(false);
helpWindow.setSizeUndefined();
VerticalLayout content = new VerticalLayout();
content.setSizeUndefined();
content.setMargin(true);
content.setSpacing(true);
Label aboutLabel = new Label("Electron+Vaadin Demo\nAuthor: Yuriy Artamonov");
aboutLabel.setContentMode(ContentMode.PREFORMATTED);
aboutLabel.setSizeUndefined();
content.addComponent(aboutLabel);
Button okBtn = new Button("Ok", VaadinIcons.CHECK);
okBtn.focus();
okBtn.addClickListener(event -> helpWindow.close());
content.addComponent(okBtn);
content.setComponentAlignment(okBtn, Alignment.MIDDLE_CENTER);
helpWindow.setContent(content);
getUI().addWindow(helpWindow);
}
代码示例来源:origin: jreznot/electron-java-app
yesBtn.focus();
yesBtn.addClickListener(event -> {
confirmationWindow.close();
代码示例来源:origin: jreznot/electron-java-app
addButton.focus();
addButton.setStyleName(ValoTheme.BUTTON_PRIMARY);
addButton.addClickListener(event -> {
内容来源于网络,如有侵权,请联系作者删除!