List of usage examples for com.vaadin.server FontAwesome LINE_CHART
FontAwesome LINE_CHART
To view the source code for com.vaadin.server FontAwesome LINE_CHART.
Click Source Link
From source file:com.hack23.cia.web.impl.ui.application.views.common.menufactory.impl.CountryMenuItemFactoryImpl.java
License:Apache License
@Override public void createCountryTopicMenu(final MenuItem charts) { charts.addItem(OVERVIEW_TEXT, FontAwesome.LINE_CHART, COMMAND18); final DataContainer<ViewWorldbankIndicatorDataCountrySummary, WorldbankIndicatorDataCountrySummaryEmbeddedId> indicatorDataCountrSummaryDailyDataContainer = applicationManager .getDataContainer(ViewWorldbankIndicatorDataCountrySummary.class); final Map<String, List<ViewWorldbankIndicatorDataCountrySummary>> sourceIndicatorMap = indicatorDataCountrSummaryDailyDataContainer .getAll().parallelStream().filter(t -> t != null && t.getSourceValue() != null && t.getEndYear() > 2010 && t.getDataPoint() > 10) .collect(Collectors.groupingBy(t -> t.getSourceValue())); final Map<String, List<ViewWorldbankIndicatorDataCountrySummary>> topicIndicatorMap = indicatorDataCountrSummaryDailyDataContainer .getAll().parallelStream()/*from w w w . j a va2 s . c om*/ .filter(t -> t != null && t.getSourceValue() != null && t.getEndYear() > 2010 && t.getDataPoint() > 10) .flatMap(t -> Arrays.asList(t.getTopics().split(";")).stream() .map(topic -> new AbstractMap.SimpleEntry<>(topic, t))) .collect(Collectors.groupingBy(e -> e.getKey(), Collectors.mapping(v -> v.getValue(), Collectors.toList()))); final MenuItem countryIndicators = charts.addItem(COUNTRY_INDICATORS_SWEDEN, FontAwesome.LINE_CHART, null); final MenuItem byTopicItem = countryIndicators.addItem(BY_TOPIC, FontAwesome.LINE_CHART, null); final MenuItem bySourceItem = countryIndicators.addItem(BY_SOURCE, FontAwesome.LINE_CHART, null); addSourcesAndIndicatorsToMenu(byTopicItem, topicIndicatorMap); addSourcesAndIndicatorsToMenu(bySourceItem, sourceIndicatorMap); charts.addItem(PAGE_VISIT_HISTORY_TEXT, FontAwesome.LINE_CHART, COMMAND22); }
From source file:com.hack23.cia.web.impl.ui.application.views.common.menufactory.impl.UserHomeMenuItemFactoryImpl.java
License:Apache License
@Override public void createUserHomeMenuBar(final MenuBar menuBar, final String pageId) { initApplicationMenuBar(menuBar);// w w w.j a v a 2 s . co m menuBar.addItem(OVERVIEW_TEXT, FontAwesome.USER, new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, PageMode.OVERVIEW, pageId)); menuBar.addItem(SECURITY_SETTING_TEXT, FontAwesome.USER, new PageModeMenuCommand( UserViews.USERHOME_VIEW_NAME, UserHomePageMode.SECURITY_SETTINGS.toString(), pageId)); menuBar.addItem(PAGE_VISIT_HISTORY_TEXT, FontAwesome.LINE_CHART, new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, PageMode.PAGEVISITHISTORY, pageId)); }