List of usage examples for com.vaadin.server FontAwesome DASHBOARD
FontAwesome DASHBOARD
To view the source code for com.vaadin.server FontAwesome DASHBOARD.
Click Source Link
From source file:com.github.carljmosca.ui.MainUI.java
private void addHeader() { HorizontalLayout hl = new HorizontalLayout(); hl.setSpacing(true);/*from w w w .j av a2 s . co m*/ cmbWidgets = new ComboBox(); cmbWidgets.setContainerDataSource(widgets); cmbWidgets.setItemCaptionPropertyId("name"); hl.addComponent(cmbWidgets); Button btnUpdate = new Button("Update", FontAwesome.ADJUST); btnUpdate.addClickListener((Button.ClickEvent event) -> { cmbWidgets.select(widgets.getIdByIndex(0)); }); hl.addComponent(btnUpdate); Button btnShow = new Button("Show", FontAwesome.DASHBOARD); btnShow.addClickListener((Button.ClickEvent event) -> { try { fgWidget.commit(); } catch (FieldGroup.CommitException ex) { Logger.getLogger(MainUI.class.getName()).log(Level.SEVERE, null, ex); } System.out.println(demoAppData.getSelectedWidget().getName()); }); hl.addComponent(btnShow); Button btnChange = new Button("Change", FontAwesome.REFRESH); btnChange.addClickListener((Button.ClickEvent event) -> { Widget widget = (Widget) biDemoAppData.getItemProperty("selectedWidget").getValue(); widget.setName("test xxxx"); System.out.println(demoAppData.getSelectedWidget().getName()); }); hl.addComponent(btnChange); mainLayout.addComponent(hl); }
From source file:com.hack23.cia.web.impl.ui.application.views.common.menufactory.impl.AbstractMenuItemFactoryImpl.java
License:Apache License
/** * Creates the admin menu.//from w w w . ja v a 2 s. c o 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.mycollab.module.project.ui.ProjectAssetsManager.java
License:Open Source License
public static FontAwesome getAsset(String resId) { FontAwesome font = resources.get(resId); return (font != null) ? font : FontAwesome.DASHBOARD; }
From source file:com.mycollab.module.project.view.UserDashboardViewImpl.java
License:Open Source License
public UserDashboardViewImpl() { this.withMargin(false).withFullWidth(); prjService = AppContextUtil.getSpringBean(ProjectService.class); prjKeys = prjService.getProjectKeysUserInvolved(UserUIContext.getUsername(), MyCollabUI.getAccountId()); tabSheet = new TabSheet(); tabSheet.addTab(buildDashboardComp(), UserUIContext.getMessage(GenericI18Enum.VIEW_DASHBOARD), FontAwesome.DASHBOARD); tabSheet.addTab(buildProjectListComp(), UserUIContext.getMessage(ProjectI18nEnum.LIST), FontAwesome.BUILDING_O);//from w w w . jav a2 s.c o m tabSheet.addTab(buildFollowingTicketComp(), UserUIContext.getMessage(ProjectCommonI18nEnum.VIEW_FAVORITES), FontAwesome.EYE); if (!SiteConfiguration.isCommunityEdition()) { tabSheet.addTab(buildCalendarComp(), UserUIContext.getMessage(ProjectCommonI18nEnum.VIEW_CALENDAR), FontAwesome.CALENDAR); } // tabSheet.addTab(buildSettingComp(), "Settings", FontAwesome.COG); tabSheet.addSelectedTabChangeListener(selectedTabChangeEvent -> { CssLayout comp = (CssLayout) tabSheet.getSelectedTab(); comp.removeAllComponents(); int tabIndex = tabSheet.getTabPosition(tabSheet.getTab(comp)); if (tabIndex == 0) { UserProjectDashboardPresenter userProjectDashboardPresenter = PresenterResolver .getPresenterAndInitView(UserProjectDashboardPresenter.class); userProjectDashboardPresenter.onGo(comp, null); } else if (tabIndex == 2) { FollowingTicketPresenter followingTicketPresenter = PresenterResolver .getPresenterAndInitView(FollowingTicketPresenter.class); followingTicketPresenter.onGo(comp, null); } else if (tabIndex == 4) { SettingPresenter settingPresenter = PresenterResolver.getPresenter(SettingPresenter.class); settingPresenter.onGo(comp, null); } else if (tabIndex == 3) { ICalendarDashboardPresenter calendarPresenter = PresenterResolver .getPresenterAndInitView(ICalendarDashboardPresenter.class); calendarPresenter.go(comp, null); } else if (tabIndex == 1) { ProjectListPresenter projectListPresenter = PresenterResolver .getPresenterAndInitView(ProjectListPresenter.class); projectListPresenter.onGo(comp, null); } }); this.with(setupHeader(), tabSheet).expand(tabSheet); }