List of usage examples for com.vaadin.ui Button Button
public Button(Resource icon, ClickListener listener)
From source file:com.esofthead.mycollab.module.project.view.ProjectBreadcrumb.java
License:Open Source License
public void gotoRoleAdd() { this.select(0); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.ROLES), new GotoRoleListener())); this.setLinkEnabled(true, 1); this.addLink(new Button(AppContext.getMessage(GenericI18Enum.BUTTON_ADD))); AppContext.addFragment("project/role/add/" + UrlEncodeDecoder.encode(project.getId()), AppContext.getMessage(BreadcrumbI18nEnum.FRA_ROLE_NEW)); }
From source file:com.esofthead.mycollab.module.project.view.ProjectBreadcrumb.java
License:Open Source License
public void gotoRoleEdit(SimpleProjectRole role) { this.select(0); this.addLink(new Button(AppContext.getMessage(BreadcrumbI18nEnum.ROLES), new GotoUserListener())); this.setLinkEnabled(true, 1); this.addLink(generateBreadcrumbLink(role.getRolename())); AppContext.addFragment("project/role/edit/" + UrlEncodeDecoder.encode(project.getId() + "/" + role.getId()), AppContext.getMessage(BreadcrumbI18nEnum.FRA_ROLE_EDIT, role.getRolename())); }
From source file:com.esofthead.mycollab.module.project.view.ProjectInformationComponent.java
License:Open Source License
public void displayProjectInformation() { this.project = CurrentProjectVariables.getProject(); this.projectInfoHeader.removeAllComponents(); final Button icon = new Button(null, ProjectAssetsManager.getAsset(ProjectTypeConstants.DASHBOARD)); icon.addStyleName(UIConstants.BUTTON_ICON_ONLY); icon.addStyleName("icon-18px"); final Label projectName = new Label(this.project.getName()); projectName.setStyleName(UIConstants.PROJECT_NAME); projectName.setSizeUndefined();//from w ww .j ava 2s. co m final Label projectShortname = new Label("(" + this.project.getShortname() + ")"); projectShortname.setStyleName(UIConstants.PROJECT_SHORT_NAME); this.projectInfoHeader.with(icon, projectName, projectShortname).expand(projectShortname); this.prjDisplay.show(); }
From source file:com.esofthead.mycollab.module.project.view.ProjectListViewImpl.java
License:Open Source License
private ComponentContainer constructTableActionControls() { MHorizontalLayout layout = new MHorizontalLayout().withFullWidth(); layout.addStyleName(UIConstants.TABLE_ACTION_CONTROLS); selectOptionButton = new SelectionOptionButton(tableItem); selectOptionButton.setWidthUndefined(); layout.addComponent(selectOptionButton); tableActionControls = new DefaultMassItemActionHandlerContainer(); tableActionControls.addDownloadPdfActionItem(); tableActionControls.addDownloadExcelActionItem(); tableActionControls.addDownloadCsvActionItem(); tableActionControls.setVisible(false); tableActionControls.setWidthUndefined(); layout.addComponent(tableActionControls); selectedItemsNumberLabel.setWidth("100%"); layout.with(selectedItemsNumberLabel).withAlign(selectedItemsNumberLabel, Alignment.MIDDLE_CENTER) .expand(selectedItemsNumberLabel); Button customizeViewBtn = new Button("", new Button.ClickListener() { private static final long serialVersionUID = 1L; @Override/*from w w w .ja v a2 s.co m*/ public void buttonClick(Button.ClickEvent event) { UI.getCurrent().addWindow(new ProjectListCustomizeWindow(tableItem)); } }); customizeViewBtn.setIcon(FontAwesome.ADJUST); customizeViewBtn.setDescription("Layout Options"); customizeViewBtn.addStyleName(UIConstants.BUTTON_ACTION); layout.with(customizeViewBtn).withAlign(customizeViewBtn, Alignment.MIDDLE_RIGHT); return layout; }