List of usage examples for com.vaadin.server FontAwesome SERVER
FontAwesome SERVER
To view the source code for com.vaadin.server FontAwesome SERVER.
Click Source Link
From source file:com.hack23.cia.web.impl.ui.application.views.common.menufactory.impl.AbstractMenuItemFactoryImpl.java
License:Apache License
/** * Inits the application menu bar./*from www .j av a 2 s. co m*/ * * @param menuBar * the menu bar */ protected final void initApplicationMenuBar(final MenuBar menuBar) { menuBar.removeItems(); menuBar.setWidth("80%"); menuBar.setStyleName("Header"); final MenuItem mainViewItem = menuBar.addItem("Application", FontAwesome.SERVER, null); mainViewItem.addItem(START_TEXT, FontAwesome.STAR, COMMAND); final MenuItem mainItem = mainViewItem.addItem("Main", FontAwesome.STAR, null); mainItem.addItem(PAGE_VISIT_HISTORY_TEXT, FontAwesome.AREA_CHART, COMMAND18); if (UserContextUtil.allowRoleInSecurityContext(ROLE_ADMIN) || UserContextUtil.allowRoleInSecurityContext(ROLE_USER)) { mainViewItem.addItem(USERHOME, FontAwesome.USER, COMMAND2); createAdminMenu(mainViewItem); mainViewItem.addItem("Logout", FontAwesome.SIGN_OUT, COMMAND3); } else { mainViewItem.addItem("Login", FontAwesome.SIGN_IN, COMMAND4); mainViewItem.addItem("Register", FontAwesome.USER_PLUS, COMMAND5); } }
From source file:com.hack23.cia.web.impl.ui.application.views.common.menufactory.impl.AbstractMenuItemFactoryImpl.java
License:Apache License
/** * Creates the admin menu.//from www . j av a 2 s. co m * * @param mainViewItem * the main view item */ private static void createAdminMenu(final MenuItem mainViewItem) { if (UserContextUtil.allowRoleInSecurityContext(ROLE_ADMIN)) { final MenuItem adminMenuItem = mainViewItem.addItem(ADMIN_TEXT, FontAwesome.SERVER, null); final MenuItem configurationMenuItem = adminMenuItem.addItem(CONFIGURATION, FontAwesome.GEARS, null); configurationMenuItem.addItem(APPLICATION_CONFIGURATION, FontAwesome.GEARS, COMMAND6); configurationMenuItem.addItem(AGENCY, FontAwesome.SERVER, COMMAND7); configurationMenuItem.addItem(PORTAL, FontAwesome.SITEMAP, COMMAND8); configurationMenuItem.addItem(COUNTRY, FontAwesome.FLAG, COMMAND9); configurationMenuItem.addItem(LANGUAGE, FontAwesome.LANGUAGE, COMMAND10); configurationMenuItem.addItem(LANGUAGE_CONTENT, FontAwesome.FILE_TEXT, COMMAND11); final MenuItem managementMenuItem = adminMenuItem.addItem(MANAGEMENT, FontAwesome.SERVER, null); managementMenuItem.addItem(AGENT_OPERATIONS_TEXT, FontAwesome.USER_SECRET, COMMAND12); managementMenuItem.addItem(DATA_SUMMARY_TEXT, FontAwesome.DATABASE, COMMAND13); managementMenuItem.addItem("Email", FontAwesome.MAIL_FORWARD, COMMAND19); managementMenuItem.addItem(SYSTEM_PERFORMANCE, FontAwesome.DASHBOARD, COMMAND14); final MenuItem userActivityMenuItem = adminMenuItem.addItem(USER_ACTIVITY, FontAwesome.DATABASE, null); userActivityMenuItem.addItem(APPLICATION_SESSION, FontAwesome.LAPTOP, COMMAND15); userActivityMenuItem.addItem(APPLICATION_EVENT, FontAwesome.ARROWS, COMMAND16); userActivityMenuItem.addItem(APPLICATION_EVENT_CHARTS, FontAwesome.ARROWS, COMMAND20); userActivityMenuItem.addItem(USERACCOUNT, FontAwesome.GROUP, COMMAND17); } }
From source file:com.hack23.cia.web.impl.ui.application.views.common.menufactory.impl.CountryMenuItemFactoryImpl.java
License:Apache License
@Override public void createCountryTopicMenu(final MenuBar menuBar) { initApplicationMenuBar(menuBar);/*w w w . ja v a 2 s. com*/ applicationMenuItemFactory.addRankingMenu(menuBar); createCountryTopicMenu(menuBar.addItem(COUNTRY_RANKING_TEXT, FontAwesome.SERVER, null)); }
From source file:com.hack23.cia.web.impl.ui.application.views.common.pagelinks.impl.PageLinkFactoryImpl.java
License:Apache License
@Override public Link createAdminPagingLink(final String label, final String page, final String pageId, final String pageNr) { final Link pageLink = new Link(label, new ExternalResource(PAGE_PREFIX + page + PAGE_SEPARATOR + "[" + pageNr + "]")); pageLink.setId(page + "ShowPage" + PAGE_SEPARATOR + pageNr); pageLink.setIcon(FontAwesome.SERVER); return pageLink; }
From source file:com.mycollab.module.project.view.milestone.MilestoneListViewImpl.java
License:Open Source License
private HorizontalLayout createHeaderRight() { MHorizontalLayout layout = new MHorizontalLayout(); MButton createBtn = new MButton(UserUIContext.getMessage(MilestoneI18nEnum.NEW), clickEvent -> { SimpleMilestone milestone = new SimpleMilestone(); milestone.setSaccountid(MyCollabUI.getAccountId()); milestone.setProjectid(CurrentProjectVariables.getProjectId()); UI.getCurrent().addWindow(new MilestoneAddWindow(milestone)); }).withIcon(FontAwesome.PLUS).withStyleName(WebThemes.BUTTON_ACTION) .withVisible(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.MILESTONES)); layout.with(createBtn);/* w w w . j av a2 s . c om*/ MButton printBtn = new MButton("", clickEvent -> UI.getCurrent() .addWindow(new MilestoneCustomizeReportOutputWindow(new LazyValueInjector() { @Override protected Object doEval() { return baseCriteria; } }))).withIcon(FontAwesome.PRINT).withStyleName(WebThemes.BUTTON_OPTION) .withDescription(UserUIContext.getMessage(GenericI18Enum.ACTION_EXPORT)); layout.addComponent(printBtn); MButton boardBtn = new MButton(UserUIContext.getMessage(ProjectCommonI18nEnum.OPT_BOARD)) .withIcon(FontAwesome.SERVER).withWidth("100px"); MButton roadmapBtn = new MButton(UserUIContext.getMessage(ProjectCommonI18nEnum.OPT_LIST), clickEvent -> EventBusFactory.getInstance() .post(new MilestoneEvent.GotoRoadmap(MilestoneListViewImpl.this))) .withIcon(FontAwesome.NAVICON).withWidth("100px"); ToggleButtonGroup viewButtons = new ToggleButtonGroup(); viewButtons.addButton(roadmapBtn); viewButtons.addButton(boardBtn); if (!SiteConfiguration.isCommunityEdition()) { MButton kanbanBtn = new MButton(UserUIContext.getMessage(ProjectCommonI18nEnum.OPT_KANBAN), clickEvent -> EventBusFactory.getInstance() .post(new MilestoneEvent.GotoKanban(MilestoneListViewImpl.this))) .withIcon(FontAwesome.TH).withWidth("100px"); viewButtons.addButton(kanbanBtn); } viewButtons.withDefaultButton(boardBtn); layout.with(viewButtons); return layout; }
From source file:com.mycollab.module.project.view.milestone.MilestoneRoadmapViewImpl.java
License:Open Source License
private HorizontalLayout createHeaderRight() { MButton createBtn = new MButton(UserUIContext.getMessage(MilestoneI18nEnum.NEW), clickEvent -> { SimpleMilestone milestone = new SimpleMilestone(); milestone.setSaccountid(MyCollabUI.getAccountId()); milestone.setProjectid(CurrentProjectVariables.getProjectId()); UI.getCurrent().addWindow(new MilestoneAddWindow(milestone)); }).withIcon(FontAwesome.PLUS).withStyleName(WebThemes.BUTTON_ACTION) .withVisible(CurrentProjectVariables.canWrite(ProjectRolePermissionCollections.MILESTONES)); MButton printBtn = new MButton("", clickEvent -> UI.getCurrent() .addWindow(new MilestoneCustomizeReportOutputWindow(new LazyValueInjector() { @Override/* ww w.jav a 2 s . c o m*/ protected Object doEval() { return baseCriteria; } }))).withIcon(FontAwesome.PRINT).withStyleName(WebThemes.BUTTON_OPTION) .withDescription(UserUIContext.getMessage(GenericI18Enum.ACTION_EXPORT)); MButton boardBtn = new MButton(UserUIContext.getMessage(ProjectCommonI18nEnum.OPT_BOARD), clickEvent -> EventBusFactory.getInstance().post(new MilestoneEvent.GotoList(this, null))) .withIcon(FontAwesome.SERVER).withWidth("100px"); MButton roadmapBtn = new MButton(UserUIContext.getMessage(ProjectCommonI18nEnum.OPT_LIST)) .withIcon(FontAwesome.NAVICON).withWidth("100px"); ToggleButtonGroup viewButtons = new ToggleButtonGroup(); viewButtons.addButton(roadmapBtn); viewButtons.addButton(boardBtn); if (!SiteConfiguration.isCommunityEdition()) { MButton kanbanBtn = new MButton(UserUIContext.getMessage(ProjectCommonI18nEnum.OPT_KANBAN), clickEvent -> EventBusFactory.getInstance() .post(new MilestoneEvent.GotoKanban(MilestoneRoadmapViewImpl.this))) .withIcon(FontAwesome.TH).withWidth("100px"); viewButtons.addButton(kanbanBtn); } viewButtons.withDefaultButton(roadmapBtn); return new MHorizontalLayout(createBtn, printBtn, viewButtons); }