本文整理了Java中com.vaadin.ui.Button.<init>()
方法的一些代码示例,展示了Button.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.<init>()
方法的具体详情如下:
包路径:com.vaadin.ui.Button
类名称:Button
方法名:<init>
[英]Creates a new push button.
[中]创建一个新的按钮。
代码示例来源:origin: com.vaadin/vaadin-server
/**
* Customize the login button. Only for overriding, do not call.
*
* @return the login button
* @since 7.7
*/
protected Button createLoginButton() {
throwIfInitialized();
return new Button(getLoginButtonCaption());
}
代码示例来源:origin: org.opencms/opencms-core
/**
* Creates an 'Cancel' button.<p>
*
* @return the button
*/
protected Button createButtonCancel() {
return new Button(CmsVaadinUtils.getMessageText(org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_CANCEL_0));
}
代码示例来源:origin: org.opencms/opencms-core
/**
* Creates an 'OK' button.<p>
*
* @return the button
*/
protected Button createButtonOK() {
return new Button(CmsVaadinUtils.getMessageText(org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_OK_0));
}
代码示例来源:origin: org.aperteworkflow/gui-commons
public static Button button(String caption, final Runnable onClick) {
Button b = new Button(caption);
b.addListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
onClick.run();
}
});
return b;
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework
private List<Component> createPrimaryActions() {
return subAppDescriptor.getActions().entrySet().stream()
.map((action) -> {
Button button = new Button(action.getKey(), e -> actionExecutionService.executeAction(action.getKey(), action.getValue()));
button.addStyleName(action.getKey());
return button;
})
// move commit button to the top
.sorted(comparing(button -> button.getStyleName().contains("commit")))
.collect(toList());
}
代码示例来源:origin: org.aperteworkflow/gui-commons
public static Button smallButton(String caption) {
Button button = new Button(caption);
button.setImmediate(true);
button.setStyleName("default small");
return button;
}
代码示例来源:origin: OpenNMS/opennms
public Object generateCell(Table source, final Object itemId, Object columnId) {
Button button = new Button("Edit");
button.setDescription("Edit this Ops Board configuration");
button.setStyleName("small");
button.addClickListener(new Button.ClickListener() {
public void buttonClick(Button.ClickEvent clickEvent) {
m_wallboardConfigView.openWallboardEditor((Wallboard) itemId);
}
});
return button;
}
});
代码示例来源:origin: org.activiti/activiti-explorer
public Component getOverviewComponent(final Attachment attachment, final RelatedContentComponent parent) {
Button attachmentLink = new Button(attachment.getName());
attachmentLink.addStyleName(Reindeer.BUTTON_LINK);
attachmentLink.addListener(new ClickListener() {
private static final long serialVersionUID = 1L;
public void buttonClick(ClickEvent event) {
parent.showAttachmentDetail(attachment);
}
});
return attachmentLink;
}
代码示例来源:origin: OpenNMS/opennms
public Object generateCell(Table source, final Object itemId, Object columnId) {
Button button = new Button("Preview");
button.setDescription("Preview this Surveillance View configuration");
button.setStyleName("small");
button.addClickListener(new PreviewClickListener(m_surveillanceViewService, SurveillanceViewsConfigList.this, (View) itemId));
return button;
}
}
代码示例来源:origin: OpenNMS/opennms
public static Button createButton(
final String buttonCaption,
final String buttonDescription,
final Resource icon,
final ClickListener clickListener) {
Button button = new Button();
button.setCaption(buttonCaption);
button.setIcon(icon);
if (buttonDescription != null) button.setDescription(buttonDescription);
if (clickListener != null) button.addClickListener(clickListener);
return button;
}
代码示例来源:origin: OpenNMS/opennms
public Object generateCell(Table source, final Object itemId, Object columnId) {
Button button = new Button("Preview");
button.setDescription("Preview this Ops Board configuration");
button.setStyleName("small");
button.addClickListener(new PreviewClickListener(WallboardOverview.this, (Wallboard) itemId));
return button;
}
});
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework
private void initialize() {
Button addButton = new Button(this.i18n.translate("buttons.add"));
addButton.addClickListener(e -> addSubForm(layout, null));
layout.addComponent(addButton);
}
代码示例来源:origin: info.magnolia.dam/magnolia-dam-app
/**
* Create Edit button.<br>
* Delegate the call to the media Editor to openMediaEditor {@link MediaEditorPresenter#start(InputStream)}.
*/
private Button createEditButton() {
Button editButton = new Button(getCaption(editFileCaption, null), createEditButtonListener());
editButton.setDisableOnClick(true);
editButton.addStyleName("edit");
return editButton;
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void initEditButton(VerticalLayout actionsLayout) {
Button editButton = new Button(i18nManager.getMessage(Messages.USER_EDIT));
editButton.addStyleName(Reindeer.BUTTON_SMALL);
actionsLayout.addComponent(editButton);
editButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
editingDetails = true;
detailLayout.removeAllComponents();
populateGroupDetails();
}
});
}
代码示例来源:origin: org.aperteworkflow/gui-commons
public static Button icon(String description, Resource icon, Button.ClickListener listener) {
Button b = new Button();
b.setStyleName("link");
b.setIcon(icon);
b.setImmediate(true);
b.setDescription(description);
if (listener != null) {
b.addListener(listener);
}
return b;
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void initActions() {
okButton = new Button(i18nManager.getMessage(Messages.RELATED_CONTENT_CREATE));
detailLayout.addComponent(okButton, 0, 1);
okButton.setEnabled(false);
okButton.addListener(new ClickListener() {
private static final long serialVersionUID = 1L;
public void buttonClick(ClickEvent event) {
saveAttachment();
}
});
detailLayout.setComponentAlignment(okButton, Alignment.BOTTOM_RIGHT);
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void initButtons(I18nManager i18nManager) {
HorizontalLayout buttonLayout = new HorizontalLayout();
buttonLayout.setSpacing(true);
buttonLayout.setWidth(100, UNITS_PERCENTAGE);
addComponent(buttonLayout);
deployButton = new Button(i18nManager.getMessage(Messages.MODEL_DEPLOY_BUTTON_DEPLOY));
buttonLayout.addComponent(deployButton);
buttonLayout.setComponentAlignment(deployButton, Alignment.BOTTOM_CENTER);
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void addActions() {
// Delete button
Button deleteButton = new Button(i18nManager.getMessage(Messages.DEPLOYMENT_DELETE));
deleteButton.setIcon(Images.DELETE);
deleteButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
viewManager.showPopupWindow(new DeleteDeploymentPopupWindow(deployment, parent));
}
});
parent.getToolBar().removeAllButtons();
parent.getToolBar().addButton(deleteButton);
}
代码示例来源:origin: org.activiti/activiti-explorer
protected void initActions() {
Button createGroupButton = new Button(i18nManager.getMessage(Messages.GROUP_CREATE));
createGroupButton.setIcon(Images.GROUP_16);
createGroupButton.addListener(new ClickListener() {
public void buttonClick(ClickEvent event) {
NewGroupPopupWindow popup = new NewGroupPopupWindow();
ExplorerApp.get().getViewManager().showPopupWindow(popup);
}
});
groupPage.getToolBar().removeAllButtons();
groupPage.getToolBar().addButton(createGroupButton);
}
代码示例来源:origin: org.activiti/activiti-explorer
protected Button addMenuButton(String type, String label, Resource icon, boolean active, float width) {
Button button = new Button(label);
button.addStyleName(type);
button.addStyleName(ExplorerLayout.STYLE_MAIN_MENU_BUTTON);
button.addStyleName(Reindeer.BUTTON_LINK);
button.setHeight(54, UNITS_PIXELS);
button.setIcon(icon);
button.setWidth(width, UNITS_PIXELS);
addComponent(button);
setComponentAlignment(button, Alignment.TOP_CENTER);
return button;
}
内容来源于网络,如有侵权,请联系作者删除!