List of usage examples for com.vaadin.server FontAwesome CARET_SQUARE_O_DOWN
FontAwesome CARET_SQUARE_O_DOWN
To view the source code for com.vaadin.server FontAwesome CARET_SQUARE_O_DOWN.
Click Source Link
From source file:com.mycollab.module.crm.view.SalesDashboardView.java
License:Open Source License
private void initUI() { final PopupButton saleChartPopup = new PopupButton(""); saleChartPopup.setIcon(FontAwesome.CARET_SQUARE_O_DOWN); saleChartPopup.setStyleName(WebThemes.BUTTON_ICON_ONLY); final OptionPopupContent filterBtnLayout = new OptionPopupContent(); final Button btnOpportunitySales = new Button(UserUIContext.getMessage(OpportunityI18nEnum.FORM_SALE_STAGE), clickEvent -> {/*ww w .j a va 2 s. c o m*/ saleChartPopup.setPopupVisible(false); currentReportIndex = 0; displayReport(); }); filterBtnLayout.addOption(btnOpportunitySales); final Button btnOpportunityLead = new Button(UserUIContext.getMessage(OpportunityI18nEnum.FORM_LEAD_SOURCE), clickEvent -> { saleChartPopup.setPopupVisible(false); currentReportIndex = 1; displayReport(); }); filterBtnLayout.addOption(btnOpportunityLead); this.displayReport(); saleChartPopup.setContent(filterBtnLayout); this.addHeaderElement(saleChartPopup); }
From source file:com.mycollab.module.project.view.user.MyProjectListComponent.java
License:Open Source License
public MyProjectListComponent() { withSpacing(false).withMargin(new MarginInfo(true, false, true, false)); this.addStyleName("myprojectlist"); MHorizontalLayout header = new MHorizontalLayout().withMargin(new MarginInfo(false, true, false, true)) .withStyleName(WebThemes.PANEL_HEADER); titleLbl = new Label(UserUIContext.getMessage(ProjectCommonI18nEnum.WIDGET_ACTIVE_PROJECTS_TITLE, 0)); final MButton sortBtn = new MButton("").withIcon(FontAwesome.SORT_ALPHA_ASC) .withStyleName(WebThemes.BUTTON_ICON_ONLY); sortBtn.addClickListener(clickEvent -> { isSortAsc = !isSortAsc;/*from w w w . j av a2s . c o m*/ if (searchCriteria != null) { if (isSortAsc) { sortBtn.setIcon(FontAwesome.SORT_ALPHA_ASC); searchCriteria.setOrderFields( Collections.singletonList(new SearchCriteria.OrderField("name", SearchCriteria.ASC))); } else { sortBtn.setIcon(FontAwesome.SORT_ALPHA_DESC); searchCriteria.setOrderFields( Collections.singletonList(new SearchCriteria.OrderField("name", SearchCriteria.DESC))); } displayResults(); } }); final SearchTextField searchTextField = new SearchTextField() { @Override public void doSearch(String value) { searchCriteria = getAllProjectsSearchCriteria(); searchCriteria.setProjectName(StringSearchField.and(value)); displayResults(); } @Override public void emptySearch() { searchCriteria = getAllProjectsSearchCriteria(); searchCriteria.setProjectName(null); displayResults(); } }; searchTextField.addStyleName(ValoTheme.TEXTFIELD_SMALL); final PopupButton projectsPopup = new PopupButton(""); projectsPopup.setIcon(FontAwesome.CARET_SQUARE_O_DOWN); projectsPopup.addStyleName(WebThemes.BUTTON_ICON_ONLY); OptionPopupContent filterBtnLayout = new OptionPopupContent(); ProjectService projectService = AppContextUtil.getSpringBean(ProjectService.class); int allProjectCount = projectService.getTotalCount(getAllProjectsSearchCriteria()); Button allProjectsBtn = new Button( UserUIContext.getMessage(ProjectCommonI18nEnum.BUTTON_ALL_PROJECTS, allProjectCount), clickEvent -> { displayAllProjects(); projectsPopup.setPopupVisible(false); }); filterBtnLayout.addOption(allProjectsBtn); int activeProjectsCount = projectService.getTotalCount(getActiveProjectsSearchCriteria()); Button activeProjectsBtn = new Button( UserUIContext.getMessage(ProjectCommonI18nEnum.BUTTON_ACTIVE_PROJECTS, activeProjectsCount), clickEvent -> { displayActiveProjects(); projectsPopup.setPopupVisible(false); }); filterBtnLayout.addOption(activeProjectsBtn); int archiveProjectsCount = projectService.getTotalCount(getArchivedProjectsSearchCriteria()); Button archiveProjectsBtn = new Button( UserUIContext.getMessage(ProjectCommonI18nEnum.BUTTON_ARCHIVE_PROJECTS, archiveProjectsCount), clickEvent -> { displayArchiveProjects(); projectsPopup.setPopupVisible(false); }); filterBtnLayout.addOption(archiveProjectsBtn); projectsPopup.setContent(filterBtnLayout); header.with(titleLbl, sortBtn, searchTextField, projectsPopup).expand(titleLbl) .alignAll(Alignment.MIDDLE_LEFT); this.projectList = new ProjectPagedList(); this.with(header, projectList); }