List of usage examples for com.vaadin.ui CssLayout CssLayout
public CssLayout(Component... children)
From source file:org.eclipse.hawkbit.ui.menu.DashboardMenu.java
License:Open Source License
/** * Creates the wrapper which contains the menu item and the adjacent label * for displaying the occurred events/* ww w .j a v a 2 s .c o m*/ * * @param menuItemButton * the menu item * @param notificationLabel * the label for displaying the occurred events * @return Component of type CssLayout */ private static Component buildLabelWrapper(final ValoMenuItemButton menuItemButton, final Component notificationLabel) { final CssLayout dashboardWrapper = new CssLayout(menuItemButton); dashboardWrapper.addStyleName("labelwrapper"); dashboardWrapper.addStyleName(ValoTheme.MENU_ITEM); notificationLabel.addStyleName(ValoTheme.MENU_BADGE); notificationLabel.setWidthUndefined(); notificationLabel.setVisible(false); notificationLabel .setId(UIComponentIdProvider.NOTIFICATION_MENU_ID + menuItemButton.getCaption().toLowerCase()); dashboardWrapper.addComponent(notificationLabel); return dashboardWrapper; }