/** * 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()); }
/** * 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)); }
/** * 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)); }
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; }
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()); }
public static Button smallButton(String caption) { Button button = new Button(caption); button.setImmediate(true); button.setStyleName("default small"); return button; }
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; } });
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; }
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; } }
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; }
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; } });
private void initialize() { Button addButton = new Button(this.i18n.translate("buttons.add")); addButton.addClickListener(e -> addSubForm(layout, null)); layout.addComponent(addButton); }
/** * 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; }
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(); } }); }
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; }
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); }
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); }
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); }
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); }
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; }