List of usage examples for com.vaadin.server FontAwesome PLUS
FontAwesome PLUS
To view the source code for com.vaadin.server FontAwesome PLUS.
Click Source Link
From source file:com.mycollab.module.crm.view.cases.CaseContactListComp.java
License:Open Source License
@Override protected Component generateTopControls() { VerticalLayout controlsBtnWrap = new VerticalLayout(); controlsBtnWrap.setWidth("100%"); if (UserUIContext.canWrite(RolePermissionCollections.CRM_CONTACT)) { final SplitButton controlsBtn = new SplitButton(); controlsBtn.addStyleName(WebThemes.BUTTON_ACTION); controlsBtn.setCaption(UserUIContext.getMessage(ContactI18nEnum.NEW)); controlsBtn.setIcon(FontAwesome.PLUS); controlsBtn.addClickListener(event -> fireNewRelatedItem("")); Button selectBtn = new Button(UserUIContext.getMessage(GenericI18Enum.BUTTON_SELECT), clickEvent -> { CaseContactSelectionWindow contactsWindow = new CaseContactSelectionWindow( CaseContactListComp.this); ContactSearchCriteria criteria = new ContactSearchCriteria(); criteria.setSaccountid(new NumberSearchField(MyCollabUI.getAccountId())); UI.getCurrent().addWindow(contactsWindow); contactsWindow.setSearchCriteria(criteria); controlsBtn.setPopupVisible(false); });/*from www. ja v a2s . c o m*/ selectBtn.setIcon(CrmAssetsManager.getAsset(CrmTypeConstants.CONTACT)); OptionPopupContent buttonControlsLayout = new OptionPopupContent(); buttonControlsLayout.addOption(selectBtn); controlsBtn.setContent(buttonControlsLayout); controlsBtnWrap.addComponent(controlsBtn); controlsBtnWrap.setComponentAlignment(controlsBtn, Alignment.MIDDLE_RIGHT); } return controlsBtnWrap; }
From source file:com.mycollab.module.crm.view.cases.CaseSearchPanel.java
License:Open Source License
@Override protected Component buildExtraControls() { return (canCreateCase) ? new MButton(UserUIContext.getMessage(CaseI18nEnum.NEW), clickEvent -> EventBusFactory.getInstance().post(new CaseEvent.GotoAdd(this, null))) .withIcon(FontAwesome.PLUS).withStyleName(WebThemes.BUTTON_ACTION) .withVisible(UserUIContext.canWrite(RolePermissionCollections.CRM_CASE)) : null;/*from w w w. ja v a 2 s .c o m*/ }
From source file:com.mycollab.module.crm.view.contact.ContactOpportunityListComp.java
License:Open Source License
@Override protected Component generateTopControls() { VerticalLayout controlsBtnWrap = new VerticalLayout(); controlsBtnWrap.setWidth("100%"); if (UserUIContext.canWrite(RolePermissionCollections.CRM_OPPORTUNITY)) { final SplitButton controlsBtn = new SplitButton(); controlsBtn.addStyleName(WebThemes.BUTTON_ACTION); controlsBtn.setCaption(UserUIContext.getMessage(OpportunityI18nEnum.NEW)); controlsBtn.setIcon(FontAwesome.PLUS); controlsBtn.addClickListener(event -> fireNewRelatedItem("")); controlsBtn.setSizeUndefined();/*from w ww.j a va 2s . c o m*/ MButton selectBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SELECT), clickEvent -> { ContactOpportunitySelectionWindow opportunitiesWindow = new ContactOpportunitySelectionWindow( ContactOpportunityListComp.this); OpportunitySearchCriteria criteria = new OpportunitySearchCriteria(); criteria.setSaccountid(new NumberSearchField(MyCollabUI.getAccountId())); UI.getCurrent().addWindow(opportunitiesWindow); opportunitiesWindow.setSearchCriteria(criteria); controlsBtn.setPopupVisible(false); }).withIcon(CrmAssetsManager.getAsset(CrmTypeConstants.OPPORTUNITY)); OptionPopupContent buttonControlsLayout = new OptionPopupContent(); buttonControlsLayout.addOption(selectBtn); controlsBtn.setContent(buttonControlsLayout); controlsBtnWrap.addComponent(controlsBtn); controlsBtnWrap.setComponentAlignment(controlsBtn, Alignment.MIDDLE_RIGHT); } return controlsBtnWrap; }
From source file:com.mycollab.module.crm.view.contact.ContactSearchPanel.java
License:Open Source License
@Override protected Component buildExtraControls() { return new MButton(UserUIContext.getMessage(ContactI18nEnum.NEW), clickEvent -> EventBusFactory.getInstance().post(new ContactEvent.GotoAdd(this, null))) .withIcon(FontAwesome.PLUS).withStyleName(WebThemes.BUTTON_ACTION) .withVisible(UserUIContext.canWrite(RolePermissionCollections.CRM_CONTACT)); }
From source file:com.mycollab.module.crm.view.lead.LeadCampaignListComp.java
License:Open Source License
@Override protected Component generateTopControls() { VerticalLayout controlBtnWrap = new VerticalLayout(); controlBtnWrap.setWidth("100%"); if (UserUIContext.canWrite(RolePermissionCollections.CRM_CAMPAIGN)) { final SplitButton controlsBtn = new SplitButton(); controlsBtn.setSizeUndefined();// w w w .ja v a 2s.c o m controlsBtn.addStyleName(WebThemes.BUTTON_ACTION); controlsBtn.setCaption(UserUIContext.getMessage(CampaignI18nEnum.NEW)); controlsBtn.setIcon(FontAwesome.PLUS); controlsBtn.addClickListener(event -> fireNewRelatedItem("")); Button selectBtn = new Button(UserUIContext.getMessage(GenericI18Enum.BUTTON_SELECT), clickEvent -> { LeadCampaignSelectionWindow leadsWindow = new LeadCampaignSelectionWindow( LeadCampaignListComp.this); CampaignSearchCriteria criteria = new CampaignSearchCriteria(); criteria.setSaccountid(new NumberSearchField(MyCollabUI.getAccountId())); UI.getCurrent().addWindow(leadsWindow); leadsWindow.setSearchCriteria(criteria); controlsBtn.setPopupVisible(false); }); selectBtn.setIcon(CrmAssetsManager.getAsset(CrmTypeConstants.CAMPAIGN)); OptionPopupContent buttonControlsLayout = new OptionPopupContent(); buttonControlsLayout.addOption(selectBtn); controlsBtn.setContent(buttonControlsLayout); controlBtnWrap.addComponent(controlsBtn); controlBtnWrap.setComponentAlignment(controlsBtn, Alignment.MIDDLE_RIGHT); } return controlBtnWrap; }
From source file:com.mycollab.module.crm.view.lead.LeadSearchPanel.java
License:Open Source License
@Override protected Component buildExtraControls() { return (canCreateLead) ? new MButton(UserUIContext.getMessage(LeadI18nEnum.NEW), clickEvent -> EventBusFactory.getInstance().post(new LeadEvent.GotoAdd(this, null))) .withIcon(FontAwesome.PLUS).withStyleName(WebThemes.BUTTON_ACTION) .withVisible(UserUIContext.canWrite(RolePermissionCollections.CRM_LEAD)) : null;/* w w w . j a va2 s. c o m*/ }
From source file:com.mycollab.module.crm.view.opportunity.OpportunityContactListComp.java
License:Open Source License
@Override protected Component generateTopControls() { MHorizontalLayout controlsBtnWrap = new MHorizontalLayout().withSpacing(false).withFullWidth(); MHorizontalLayout notesWrap = new MHorizontalLayout( new ELabel(UserUIContext.getMessage(GenericI18Enum.OPT_NOTE)).withWidthUndefined()).withFullWidth(); CssLayout noteBlock = new CssLayout(); noteBlock.setWidth("100%"); noteBlock.setStyleName("list-note-block"); for (OptionI18nEnum.OpportunityContactRole role : CrmDataTypeFactory.getOpportunityContactRoleList()) { ELabel note = new ELabel(UserUIContext.getMessage(role)) .withStyleName("note-label", colormap.get(role.name())).withWidthUndefined() .withHeightUndefined();/* w ww . ja va 2 s .co m*/ noteBlock.addComponent(note); } notesWrap.with(noteBlock).expand(noteBlock); controlsBtnWrap.addComponent(notesWrap); if (UserUIContext.canWrite(RolePermissionCollections.CRM_CONTACT)) { final SplitButton controlsBtn = new SplitButton(); controlsBtn.setSizeUndefined(); controlsBtn.addStyleName(WebThemes.BUTTON_ACTION); controlsBtn.setCaption(UserUIContext.getMessage(ContactI18nEnum.OPT_ADD_EDIT_CONTACT_ROLES)); controlsBtn.setIcon(FontAwesome.PLUS); controlsBtn.addClickListener(event -> EventBusFactory.getInstance() .post(new OpportunityEvent.GotoContactRoleEdit(this, opportunity))); final Button selectBtn = new Button(UserUIContext.getMessage(GenericI18Enum.BUTTON_SELECT), clickEvent -> { OpportunityContactSelectionWindow contactsWindow = new OpportunityContactSelectionWindow( OpportunityContactListComp.this); ContactSearchCriteria criteria = new ContactSearchCriteria(); criteria.setSaccountid(new NumberSearchField(MyCollabUI.getAccountId())); UI.getCurrent().addWindow(contactsWindow); contactsWindow.setSearchCriteria(criteria); controlsBtn.setPopupVisible(false); }); selectBtn.setIcon(CrmAssetsManager.getAsset(CrmTypeConstants.CONTACT)); OptionPopupContent buttonControlLayout = new OptionPopupContent(); buttonControlLayout.addOption(selectBtn); controlsBtn.setContent(buttonControlLayout); controlsBtnWrap.with(controlsBtn).withAlign(controlsBtn, Alignment.MIDDLE_RIGHT); } return controlsBtnWrap; }
From source file:com.mycollab.module.crm.view.opportunity.OpportunityLeadListComp.java
License:Open Source License
@Override protected Component generateTopControls() { VerticalLayout controlsBtnWrap = new VerticalLayout(); controlsBtnWrap.setWidth("100%"); if (UserUIContext.canWrite(RolePermissionCollections.CRM_LEAD)) { final SplitButton controlsBtn = new SplitButton(); controlsBtn.addStyleName(WebThemes.BUTTON_ACTION); controlsBtn.setCaption(UserUIContext.getMessage(LeadI18nEnum.NEW)); controlsBtn.setIcon(FontAwesome.PLUS); controlsBtn.addClickListener(event -> fireNewRelatedItem("")); MButton selectBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SELECT), clickEvent -> { final OpportunityLeadSelectionWindow leadsWindow = new OpportunityLeadSelectionWindow( OpportunityLeadListComp.this); final LeadSearchCriteria criteria = new LeadSearchCriteria(); criteria.setSaccountid(new NumberSearchField(MyCollabUI.getAccountId())); UI.getCurrent().addWindow(leadsWindow); leadsWindow.setSearchCriteria(criteria); controlsBtn.setPopupVisible(false); }).withIcon(CrmAssetsManager.getAsset(CrmTypeConstants.LEAD)); OptionPopupContent buttonControlLayout = new OptionPopupContent(); buttonControlLayout.addOption(selectBtn); controlsBtn.setContent(buttonControlLayout); controlsBtnWrap.addComponent(controlsBtn); controlsBtnWrap.setComponentAlignment(controlsBtn, Alignment.MIDDLE_RIGHT); }/*from w ww.jav a2 s .c o m*/ return controlsBtnWrap; }
From source file:com.mycollab.module.crm.view.opportunity.OpportunitySearchPanel.java
License:Open Source License
@Override protected Component buildExtraControls() { return (canCreateOpportunity) ? new MButton(UserUIContext.getMessage(OpportunityI18nEnum.NEW), clickEvent -> EventBusFactory.getInstance() .post(new OpportunityEvent.GotoAdd(OpportunitySearchPanel.this, null))) .withIcon(FontAwesome.PLUS).withStyleName(WebThemes.BUTTON_ACTION) .withVisible( UserUIContext.canWrite(RolePermissionCollections.CRM_OPPORTUNITY)) : null;/* ww w . j a v a 2 s . c o m*/ }
From source file:com.mycollab.module.file.view.ResourcesDisplayComponent.java
License:Open Source License
public ResourcesDisplayComponent(final Folder rootFolder) { this.baseFolder = rootFolder; this.rootPath = rootFolder.getPath(); externalResourceService = AppContextUtil.getSpringBean(ExternalResourceService.class); externalDriveService = AppContextUtil.getSpringBean(ExternalDriveService.class); resourceService = AppContextUtil.getSpringBean(ResourceService.class); withSpacing(false).withMargin(new MarginInfo(true, false, true, false)); fileBreadCrumb = new FileBreadcrumb(rootPath); fileBreadCrumb.addSearchHandler(criteria -> { Resource selectedFolder;/* w w w.j a v a 2s . c om*/ if (StorageNames.DROPBOX.equals(criteria.getStorageName())) { selectedFolder = externalResourceService.getCurrentResourceByPath(criteria.getExternalDrive(), criteria.getBaseFolder()); } else { selectedFolder = resourceService.getResource(criteria.getBaseFolder()); } if (selectedFolder == null) { throw new DebugException(String.format("Can not find folder with path %s--%s in account", criteria.getBaseFolder(), criteria.getRootFolder(), MyCollabUI.getAccountId())); } else if (!(selectedFolder instanceof Folder)) { LOG.error(String.format("Expect folder but the result is file %s--%s", criteria.getBaseFolder(), criteria.getRootFolder())); } else { Folder resultFolder = (Folder) selectedFolder; constructBodyItemContainer(resultFolder); baseFolder = resultFolder; } }); ELabel headerLbl = ELabel.h2(ProjectAssetsManager.getAsset(ProjectTypeConstants.FILE).getHtml() + " " + UserUIContext.getMessage(FileI18nEnum.LIST)); MButton createBtn = new MButton(UserUIContext.getMessage(FileI18nEnum.ACTION_NEW_FOLDER), clickEvent -> UI.getCurrent().addWindow(new AddNewFolderWindow())).withIcon(FontAwesome.PLUS) .withStyleName(WebThemes.BUTTON_ACTION) .withVisible(UserUIContext.canWrite(RolePermissionCollections.PUBLIC_DOCUMENT_ACCESS)); MButton uploadBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_UPLOAD), clickEvent -> { MultiUploadContentWindow multiUploadWindow = new MultiUploadContentWindow(); UI.getCurrent().addWindow(multiUploadWindow); }).withIcon(FontAwesome.UPLOAD).withStyleName(WebThemes.BUTTON_ACTION) .withVisible(UserUIContext.canWrite(RolePermissionCollections.PUBLIC_DOCUMENT_ACCESS)); MHorizontalLayout headerLayout = new MHorizontalLayout(headerLbl, new MHorizontalLayout(createBtn, uploadBtn)).expand(headerLbl); resourcesContainer = new ResourcesContainer(); MVerticalLayout floatControl = new MVerticalLayout(headerLayout, fileBreadCrumb) .withMargin(new MarginInfo(false, false, true, false)).withStyleName("floatControl"); this.with(floatControl, resourcesContainer); fileBreadCrumb.initBreadcrumb(); resourcesContainer.constructBody(baseFolder); }