Example usage for com.vaadin.ui Component setWidthUndefined

List of usage examples for com.vaadin.ui Component setWidthUndefined

Introduction

In this page you can find the example usage for com.vaadin.ui Component setWidthUndefined.

Prototype

public void setWidthUndefined();

Source Link

Document

Clears any defined width.

Usage

From source file:com.wintindustries.pfserver.interfaces.view.dashboard.DashboardMenu.java

private Component buildBadgeWrapper(final Component menuItemButton, final Component badgeLabel) {
    CssLayout dashboardWrapper = new CssLayout(menuItemButton);
    dashboardWrapper.addStyleName("badgewrapper");
    dashboardWrapper.addStyleName(ValoTheme.MENU_ITEM);
    badgeLabel.addStyleName(ValoTheme.MENU_BADGE);
    badgeLabel.setWidthUndefined();
    badgeLabel.setVisible(false);//from w w  w.j  ava  2  s .  co  m
    dashboardWrapper.addComponent(badgeLabel);
    return dashboardWrapper;
}

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//from w  ww .  j a va 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;
}