use of com.vaadin.ui.CssLayout in project cia by Hack23.
the class AbstractMenuItemFactoryImpl method createButtonLink.
/**
* Creates the button link.
*
* @param row
* the panel content
* @param linkText
* the link text
* @param icon
* the icon
* @param command
* the command
* @param description
* the description
*/
protected static final void createButtonLink(final ResponsiveRow row, final String linkText, final Resource icon, final ClickListener command, final String description) {
final CssLayout layout = new CssLayout();
layout.addStyleName("v-layout-content-overview-panel-level2");
Responsive.makeResponsive(layout);
layout.setSizeUndefined();
final Button button = new Button(linkText);
Responsive.makeResponsive(button);
button.setStyleName(LINK_STYLE_NAME);
button.addStyleName("title");
button.addClickListener(command);
button.setIcon(icon);
button.setWidth(100, Unit.PERCENTAGE);
layout.addComponent(button);
final Label descriptionLabel = new Label(description);
descriptionLabel.addStyleName("itembox");
Responsive.makeResponsive(descriptionLabel);
descriptionLabel.setWidth(100, Unit.PERCENTAGE);
layout.addComponent(descriptionLabel);
row.addColumn().withDisplayRules(DISPLAY_SIZE_XS_DEVICE, DISPLAYS_SIZE_XM_DEVICE, DISPLAY_SIZE_MD_DEVICE, DISPLAY_SIZE_LG_DEVICE).withComponent(layout);
}
use of com.vaadin.ui.CssLayout in project cia by Hack23.
the class DashboardViewOverviewPageModContentFactoryImpl method createDashboardMonarch.
private void createDashboardMonarch(final ResponsiveRow row) {
final CssLayout layout = new CssLayout();
layout.addStyleName("v-layout-content-overview-dashboard-panel-level2");
Responsive.makeResponsive(layout);
layout.setSizeUndefined();
final Label titleLabel = new Label("Monarch");
Responsive.makeResponsive(titleLabel);
titleLabel.addStyleName("title");
titleLabel.setWidth(100, Unit.PERCENTAGE);
layout.addComponent(titleLabel);
final Label headOfStateLabel = new Label("Head of state(King): Carl Gustaf Folke Hubertus since 15 September 1973");
Responsive.makeResponsive(headOfStateLabel);
headOfStateLabel.setWidth(100, Unit.PERCENTAGE);
layout.addComponent(headOfStateLabel);
final Label nextHeadOfStateLabel = new Label("Future head of state(Queen): Victoria Ingrid Alice Désirée;");
Responsive.makeResponsive(nextHeadOfStateLabel);
nextHeadOfStateLabel.setWidth(100, Unit.PERCENTAGE);
layout.addComponent(nextHeadOfStateLabel);
addMonarchIncomeSpending(layout);
row.addColumn().withDisplayRules(DISPLAY_SIZE_XS_DEVICE, DISPLAYS_SIZE_XM_DEVICE, DISPLAY_SIZE_MD_DEVICE, DISPLAY_SIZE_LG_DEVICE).withComponent(layout);
}
use of com.vaadin.ui.CssLayout in project cia by Hack23.
the class DashboardViewOverviewPageModContentFactoryImpl method createDashboardPartRiskBySeverity.
private void createDashboardPartRiskBySeverity(final ResponsiveRow row) {
final CssLayout layout = new CssLayout();
layout.addStyleName("v-layout-content-overview-dashboard-panel-level2");
Responsive.makeResponsive(layout);
layout.setSizeUndefined();
final Label titleLabel = new Label("Number of risk by severity");
Responsive.makeResponsive(titleLabel);
titleLabel.addStyleName("title");
titleLabel.setWidth(100, Unit.PERCENTAGE);
layout.addComponent(titleLabel);
final HorizontalLayout horizontalLayout = new HorizontalLayout();
Responsive.makeResponsive(horizontalLayout);
final DataContainer<RuleViolation, String> dataContainer = getApplicationManager().getDataContainer(RuleViolation.class);
final List<RuleViolation> ruleViolations = dataContainer.getAll();
for (final Entry<Status, List<RuleViolation>> statusEntry : ruleViolations.stream().collect(Collectors.groupingBy(RuleViolation::getStatus)).entrySet()) {
horizontalLayout.addComponent(new CounterStatisticsCard(VaadinIcons.WARNING, new CounterStatisticModel("" + statusEntry.getKey(), statusEntry.getValue().size()).withShow(StatisticShow.Sum).withIconHidden().withShowOnlyStatistic(true), "" + statusEntry.getKey()));
}
layout.addComponent(horizontalLayout);
row.addColumn().withDisplayRules(DISPLAY_SIZE_XS_DEVICE, DISPLAYS_SIZE_XM_DEVICE, DISPLAY_SIZE_MD_DEVICE, DISPLAY_SIZE_LG_DEVICE).withComponent(layout);
}
use of com.vaadin.ui.CssLayout in project cia by Hack23.
the class DashboardViewOverviewPageModContentFactoryImpl method createDashboardParliament.
private void createDashboardParliament(final ResponsiveRow row) {
final CssLayout layout = new CssLayout();
layout.addStyleName("v-layout-content-overview-dashboard-panel-level2");
Responsive.makeResponsive(layout);
layout.setSizeUndefined();
final Label titleLabel = new Label("Parliament");
Responsive.makeResponsive(titleLabel);
// button.setStyleName(LINK_STYLE_NAME);
titleLabel.addStyleName("title");
titleLabel.setWidth(100, Unit.PERCENTAGE);
layout.addComponent(titleLabel);
final HorizontalLayout horizontalLayout = new HorizontalLayout();
Responsive.makeResponsive(horizontalLayout);
final DataContainer<ViewRiksdagenPolitician, String> parliamentRoleMemberDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenPolitician.class);
final List<ViewRiksdagenPolitician> parliamentMembers = parliamentRoleMemberDataContainer.findListByProperty(new Object[] { Boolean.TRUE }, ViewRiksdagenPolitician_.activeParliament);
horizontalLayout.addComponent(new CounterStatisticsCard(VaadinIcons.WARNING, new CounterStatisticModel("Members", parliamentMembers.size()).withShow(StatisticShow.Sum).withIconHidden().withShowOnlyStatistic(true), "Members"));
final DataContainer<ViewRiksdagenMinistry, String> ministryDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenMinistry.class);
final DataContainer<ViewRiksdagenPartySummary, String> partyDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenPartySummary.class);
final List<ViewRiksdagenPartySummary> listparties = partyDataContainer.findListByProperty(new Object[] { Boolean.TRUE }, ViewRiksdagenPartySummary_.activeParliament);
horizontalLayout.addComponent(new CounterStatisticsCard(VaadinIcons.WARNING, new CounterStatisticModel("Parties", listparties.size()).withShow(StatisticShow.Sum).withIconHidden().withShowOnlyStatistic(true), "Parties"));
final DataContainer<ViewRiksdagenCommittee, String> committeeDataContainer = getApplicationManager().getDataContainer(ViewRiksdagenCommittee.class);
final List<ViewRiksdagenCommittee> listCommittees = committeeDataContainer.findListByProperty(new Object[] { Boolean.TRUE }, ViewRiksdagenCommittee_.active);
horizontalLayout.addComponent(new CounterStatisticsCard(VaadinIcons.WARNING, new CounterStatisticModel("Committees", listCommittees.size()).withShow(StatisticShow.Sum).withIconHidden().withShowOnlyStatistic(true), "Committees"));
layout.addComponent(horizontalLayout);
addParliamentIncomeSpending(layout);
row.addColumn().withDisplayRules(DISPLAY_SIZE_XS_DEVICE, DISPLAYS_SIZE_XM_DEVICE, DISPLAY_SIZE_MD_DEVICE, DISPLAY_SIZE_LG_DEVICE).withComponent(layout);
}
use of com.vaadin.ui.CssLayout in project Eclipse-Kuksa-Automotive-Edge-Extension by max-grzanna.
the class AppsListView method listApps.
public void listApps(String text, String categoryId) {
int currentpage = 1;
int limit = 9;
int total;
Page<App> appsList = findByText(text, categoryId, currentpage - 1, limit);
total = (int) appsList.getTotalElements();
CssLayout appslayoutnew = new CssLayout();
appslayoutnew = AppGridView.crateAppGridView(appsList, 3);
mainlayout.removeAllComponents();
mainlayout.addComponent(navHeaderLayout);
mainlayout.addComponent(actions);
mainlayout.addComponent(appslayoutnew);
paginationComponent = createPaginationComponent(total, currentpage, limit);
mainlayout.addComponent(paginationComponent);
setCompositionRoot(mainlayout);
}
Aggregations