List of usage examples for com.vaadin.server FontAwesome INBOX
FontAwesome INBOX
To view the source code for com.vaadin.server FontAwesome INBOX.
Click Source Link
From source file:com.esofthead.mycollab.mobile.module.project.ui.ProjectMobileMenuPageView.java
License:Open Source License
@Override protected void buildNavigateMenu() { getMenu().setWidth("80%"); addSection("Views:"); Button prjButton = new Button("Projects", new Button.ClickListener() { @Override/* ww w.jav a 2 s . c o m*/ public void buttonClick(Button.ClickEvent clickEvent) { closeMenu(); EventBusFactory.getInstance().post(new ProjectEvent.GotoProjectList(this, null)); } }); prjButton.setIcon(FontAwesome.BUILDING); addMenuItem(prjButton); // Buttons with styling (slightly smaller with left-aligned text) Button activityBtn = new Button("Activities", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { closeMenu(); EventBusFactory.getInstance() .post(new ProjectEvent.MyProjectActivities(this, CurrentProjectVariables.getProjectId())); } }); activityBtn.setIcon(FontAwesome.INBOX); addMenuItem(activityBtn); // add more buttons for a more realistic look. Button messageBtn = new Button("Messages", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { closeMenu(); EventBusFactory.getInstance().post(new MessageEvent.GotoList(this, null)); } }); messageBtn.setIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.MESSAGE)); addMenuItem(messageBtn); Button phaseBtn = new Button("Phases", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { closeMenu(); EventBusFactory.getInstance().post(new MilestoneEvent.GotoList(this, null)); } }); phaseBtn.setIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.MILESTONE)); addMenuItem(phaseBtn); Button taskBtn = new Button("Tasks", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { closeMenu(); EventBusFactory.getInstance().post(new TaskEvent.GotoList(this, null)); } }); taskBtn.setIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.TASK)); addMenuItem(taskBtn); Button bugBtn = new Button("Bugs", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { closeMenu(); EventBusFactory.getInstance().post(new BugEvent.GotoList(this, null)); } }); bugBtn.setIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.BUG)); addMenuItem(bugBtn); Button userBtn = new Button("Users", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { closeMenu(); EventBusFactory.getInstance().post(new ProjectMemberEvent.GotoList(this, null)); } }); userBtn.setIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.MEMBER)); addMenuItem(userBtn); addSection("Settings:"); Button logoutBtn = new Button("Logout", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { closeMenu(); EventBusFactory.getInstance().post(new ShellEvent.LogOut(this)); } }); logoutBtn.setIcon(FontAwesome.SIGN_OUT); addMenuItem(logoutBtn); }
From source file:com.esofthead.mycollab.mobile.module.project.view.UserProjectListViewImpl.java
License:Open Source License
@Override protected void buildNavigateMenu() { addSection("Views:"); // Buttons with styling (slightly smaller with left-aligned text) Button activityBtn = new Button("Activities", new Button.ClickListener() { @Override/* www . j a v a 2s .c o m*/ public void buttonClick(Button.ClickEvent clickEvent) { closeMenu(); EventBusFactory.getInstance().post(new ProjectEvent.AllActivities(this)); } }); activityBtn.setIcon(FontAwesome.INBOX); addMenuItem(activityBtn); Button prjBtn = new Button("Projects", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { closeMenu(); EventBusFactory.getInstance().post(new ProjectEvent.GotoProjectList(this, null)); } }); prjBtn.setIcon(FontAwesome.BUILDING); addMenuItem(prjBtn); addSection("Settings:"); Button logoutBtn = new Button("Logout", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { closeMenu(); EventBusFactory.getInstance().post(new ShellEvent.LogOut(this)); } }); logoutBtn.setIcon(FontAwesome.SIGN_OUT); addMenuItem(logoutBtn); }
From source file:com.esofthead.mycollab.shell.view.CommunitySliderContent.java
License:Open Source License
CommunitySliderContent() { try {/*from w w w. ja v a 2 s . co m*/ withWidth("500px").withStyleName("community"); Div blogLink = new Div().appendText(FontAwesome.INSTITUTION.getHtml() + " ") .appendChild(new A("https://www" + ".mycollab.com").appendText("Blog").setTarget("_blank")); with(new ELabel(blogLink.write(), ContentMode.HTML).withStyleName(ValoTheme.LABEL_H2)); SyndFeed feed = getSyndFeedForUrl("https://www.mycollab.com/feed/atom/"); final List<SyndEntry> entries = feed.getEntries(); if (CollectionUtils.isNotEmpty(entries)) { AsyncInvoker.access(new AsyncInvoker.PageCommand() { @Override public void run() { for (SyndEntry entry : entries) { Div link = new Div().appendText(FontAwesome.INBOX.getHtml() + " ").appendChild( new A(entry.getLink()).appendText(entry.getTitle()).setTarget("_blank")); CommunitySliderContent.this .with(new ELabel(link.write(), ContentMode.HTML).withStyleName("title")); Div description = new Div().appendText(entry.getDescription().getValue()); CommunitySliderContent.this .with(new ELabel(description.write(), ContentMode.HTML).withStyleName("desc")); } } }); } } catch (Exception e) { with(new Label("Can not load MyCollab's feed")); } }
From source file:com.mycollab.mobile.module.project.ui.ProjectMobileMenuPageView.java
License:Open Source License
@Override protected void buildNavigateMenu() { getMenu().setWidth("80%"); addSection("Views:"); MButton prjButton = new MButton(UserUIContext.getMessage(ProjectI18nEnum.LIST), clickEvent -> { closeMenu();// w w w . j a v a2 s .co m EventBusFactory.getInstance().post(new ProjectEvent.GotoProjectList(this, null)); }).withIcon(FontAwesome.BUILDING); addMenuItem(prjButton); // Buttons with styling (slightly smaller with left-aligned text) MButton activityBtn = new MButton(UserUIContext.getMessage(ProjectCommonI18nEnum.M_VIEW_PROJECT_ACTIVITIES), clickEvent -> { closeMenu(); EventBusFactory.getInstance().post( new ProjectEvent.MyProjectActivities(this, CurrentProjectVariables.getProjectId())); }).withIcon(FontAwesome.INBOX); addMenuItem(activityBtn); // add more buttons for a more realistic look. MButton messageBtn = new MButton(UserUIContext.getMessage(MessageI18nEnum.LIST), clickEvent -> { closeMenu(); EventBusFactory.getInstance().post(new MessageEvent.GotoList(this, null)); }).withIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.MESSAGE)); addMenuItem(messageBtn); MButton phaseBtn = new MButton(UserUIContext.getMessage(MilestoneI18nEnum.LIST), clickEvent -> { closeMenu(); EventBusFactory.getInstance().post(new MilestoneEvent.GotoList(this, null)); }).withIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.MILESTONE)); addMenuItem(phaseBtn); MButton ticketBtn = new MButton(UserUIContext.getMessage(TicketI18nEnum.LIST), clickEvent -> { closeMenu(); EventBusFactory.getInstance().post(new TicketEvent.GotoDashboard(this, null)); }).withIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.TICKET)); addMenuItem(ticketBtn); MButton userBtn = new MButton(UserUIContext.getMessage(ProjectMemberI18nEnum.LIST), clickEvent -> { closeMenu(); EventBusFactory.getInstance().post(new ProjectMemberEvent.GotoList(this, null)); }).withIcon(ProjectAssetsManager.getAsset(ProjectTypeConstants.MEMBER)); addMenuItem(userBtn); addSection(UserUIContext.getMessage(ProjectCommonI18nEnum.VIEW_SETTINGS)); MButton logoutBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SIGNOUT), clickEvent -> { closeMenu(); EventBusFactory.getInstance().post(new ShellEvent.LogOut(this)); }).withIcon(FontAwesome.SIGN_OUT); addMenuItem(logoutBtn); }
From source file:com.mycollab.mobile.module.project.view.AllActivityViewImpl.java
License:Open Source License
@Override protected void buildNavigateMenu() { addSection("Views:"); // Buttons with styling (slightly smaller with left-aligned text) Button activityBtn = new Button("Activities", clickEvent -> { closeMenu();/* w w w . j a va 2 s . c o m*/ EventBusFactory.getInstance().post(new ProjectEvent.AllActivities(this)); }); activityBtn.setIcon(FontAwesome.INBOX); addMenuItem(activityBtn); Button prjBtn = new Button(UserUIContext.getMessage(ProjectI18nEnum.LIST), clickEvent -> { closeMenu(); EventBusFactory.getInstance().post(new ProjectEvent.GotoProjectList(this, null)); }); prjBtn.setIcon(FontAwesome.BUILDING); addMenuItem(prjBtn); addSection("Settings:"); Button logoutBtn = new Button(UserUIContext.getMessage(GenericI18Enum.BUTTON_SIGNOUT), clickEvent -> { closeMenu(); EventBusFactory.getInstance().post(new ShellEvent.LogOut(this)); }); logoutBtn.setIcon(FontAwesome.SIGN_OUT); addMenuItem(logoutBtn); }
From source file:com.mycollab.mobile.module.project.view.ProjectDashboardViewImpl.java
License:Open Source License
@Override public void displayDashboard() { mainLayout.removeAllComponents();/*ww w .j ava 2 s . com*/ SimpleProject currentProject = CurrentProjectVariables.getProject(); VerticalLayout projectInfo = new VerticalLayout(); projectInfo.setStyleName("project-info-layout"); projectInfo.setWidth("100%"); projectInfo.setDefaultComponentAlignment(Alignment.TOP_CENTER); ELabel projectIcon = ELabel.fontIcon(FontAwesome.BUILDING_O).withStyleName("project-icon") .withWidthUndefined(); projectInfo.addComponent(projectIcon); ELabel projectName = new ELabel(currentProject.getName()).withFullWidth().withStyleName("project-name"); projectInfo.addComponent(projectName); MHorizontalLayout metaInfo = new MHorizontalLayout(); Label projectMemberBtn = ELabel .html(FontAwesome.USERS.getHtml() + " " + currentProject.getNumActiveMembers()) .withDescription(UserUIContext.getMessage(ProjectMemberI18nEnum.OPT_ACTIVE_MEMBERS)) .withStyleName(UIConstants.META_INFO); metaInfo.addComponent(projectMemberBtn); Label createdTimeLbl = ELabel .html(FontAwesome.CLOCK_O.getHtml() + " " + UserUIContext.formatPrettyTime(currentProject.getCreatedtime())) .withDescription(UserUIContext.getMessage(GenericI18Enum.FORM_CREATED_TIME)) .withStyleName(UIConstants.META_INFO); metaInfo.addComponent(createdTimeLbl); Label billableHoursLbl = ELabel .html(FontAwesome.MONEY.getHtml() + " " + NumberUtils.roundDouble(2, currentProject.getTotalBillableHours())) .withDescription(UserUIContext.getMessage(TimeTrackingI18nEnum.OPT_BILLABLE_HOURS)) .withStyleName(UIConstants.META_INFO); metaInfo.addComponent(billableHoursLbl); Label nonBillableHoursLbl = ELabel .html(FontAwesome.GIFT.getHtml() + " " + NumberUtils.roundDouble(2, currentProject.getTotalNonBillableHours())) .withDescription(UserUIContext.getMessage(TimeTrackingI18nEnum.OPT_NON_BILLABLE_HOURS)) .withStyleName(UIConstants.META_INFO); metaInfo.addComponent(nonBillableHoursLbl); projectInfo.addComponent(metaInfo); int openAssignments = currentProject.getNumOpenBugs() + currentProject.getNumOpenTasks() + currentProject.getNumOpenRisks(); int totalAssignments = currentProject.getNumBugs() + currentProject.getNumTasks() + currentProject.getNumRisks(); ELabel progressInfoLbl; if (totalAssignments > 0) { progressInfoLbl = new ELabel(UserUIContext.getMessage(ProjectI18nEnum.OPT_PROJECT_TICKET, (totalAssignments - openAssignments), totalAssignments, (totalAssignments - openAssignments) * 100 / totalAssignments)).withWidthUndefined() .withStyleName(UIConstants.META_INFO); } else { progressInfoLbl = new ELabel(UserUIContext.getMessage(ProjectI18nEnum.OPT_NO_TICKET)) .withWidthUndefined().withStyleName(UIConstants.META_INFO); } projectInfo.addComponent(progressInfoLbl); mainLayout.addComponent(projectInfo); VerticalComponentGroup btnGroup = new VerticalComponentGroup(); NavigationButton activityBtn = new NavigationButton( UserUIContext.getMessage(ProjectCommonI18nEnum.M_VIEW_PROJECT_ACTIVITIES)); activityBtn.addClickListener(navigationButtonClickEvent -> EventBusFactory.getInstance() .post(new ProjectEvent.MyProjectActivities(this, CurrentProjectVariables.getProjectId()))); btnGroup.addComponent(new NavigationButtonWrap(FontAwesome.INBOX, activityBtn)); NavigationButton messageBtn = new NavigationButton(UserUIContext.getMessage(MessageI18nEnum.LIST)); messageBtn.addClickListener(navigationButtonClickEvent -> EventBusFactory.getInstance() .post(new MessageEvent.GotoList(this, null))); btnGroup.addComponent( new NavigationButtonWrap(ProjectAssetsManager.getAsset(ProjectTypeConstants.MESSAGE), messageBtn)); NavigationButton milestoneBtn = new NavigationButton(UserUIContext.getMessage(MilestoneI18nEnum.LIST)); milestoneBtn.addClickListener(navigationButtonClickEvent -> EventBusFactory.getInstance() .post(new MilestoneEvent.GotoList(this, null))); btnGroup.addComponent(new NavigationButtonWrap( ProjectAssetsManager.getAsset(ProjectTypeConstants.MILESTONE), milestoneBtn)); NavigationButton taskBtn = new NavigationButton(UserUIContext.getMessage(TicketI18nEnum.LIST)); taskBtn.addClickListener(navigationButtonClickEvent -> EventBusFactory.getInstance() .post(new TicketEvent.GotoDashboard(this, null))); btnGroup.addComponent( new NavigationButtonWrap(ProjectAssetsManager.getAsset(ProjectTypeConstants.TICKET), taskBtn)); NavigationButton userBtn = new NavigationButton(UserUIContext.getMessage(ProjectMemberI18nEnum.LIST)); userBtn.addClickListener(navigationButtonClickEvent -> EventBusFactory.getInstance() .post(new ProjectMemberEvent.GotoList(this, null))); btnGroup.addComponent(new NavigationButtonWrap(FontAwesome.USERS, userBtn)); mainLayout.addComponent(btnGroup); }
From source file:com.mycollab.mobile.module.project.view.UserProjectListViewImpl.java
License:Open Source License
@Override protected void buildNavigateMenu() { addSection("Views:"); // Buttons with styling (slightly smaller with left-aligned text) MButton activityBtn = new MButton(UserUIContext.getMessage(ProjectCommonI18nEnum.M_VIEW_PROJECT_ACTIVITIES), clickEvent -> {/*from www.ja va 2 s . co m*/ closeMenu(); EventBusFactory.getInstance().post(new ProjectEvent.AllActivities(this)); }).withIcon(FontAwesome.INBOX); addMenuItem(activityBtn); MButton prjBtn = new MButton(UserUIContext.getMessage(ProjectI18nEnum.LIST), clickEvent -> { closeMenu(); EventBusFactory.getInstance().post(new ProjectEvent.GotoProjectList(this, null)); }).withIcon(FontAwesome.BUILDING); addMenuItem(prjBtn); addSection(UserUIContext.getMessage(ProjectCommonI18nEnum.VIEW_SETTINGS)); MButton logoutBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SIGNOUT), clickEvent -> { closeMenu(); EventBusFactory.getInstance().post(new ShellEvent.LogOut(this)); }).withIcon(FontAwesome.SIGN_OUT); addMenuItem(logoutBtn); }