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 ; }
Creates the wrapper which contains the menu item and the adjacent label for displaying the occurred events