List of usage examples for com.vaadin.ui Button setStyleName
@Override public void setStyleName(String style)
From source file:org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorderUH.java
License:Open Source License
@Override public Button decorate(final Button button, final String style, final boolean setStyle, final Resource icon) { button.addStyleName(ValoTheme.BUTTON_SMALL); button.addStyleName(ValoTheme.BUTTON_BORDERLESS_COLORED); button.setHeightUndefined();// www . ja v a2 s . c o m // Set Style if (null != style) { if (setStyle) { button.setStyleName(style); } else { button.addStyleName(style); } } // Set icon if (null != icon) { button.addStyleName(ValoTheme.BUTTON_ICON_ONLY); button.setIcon(icon); } return button; }
From source file:org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleSmallNoBorderUHS.java
License:Open Source License
@Override public Button decorate(final Button button, final String style, final boolean setStyle, final Resource icon) { button.addStyleName(ValoTheme.BUTTON_SMALL); button.addStyleName(ValoTheme.BUTTON_BORDERLESS); button.setHeightUndefined();/*from ww w. ja v a 2 s. c o m*/ button.setSizeUndefined(); // Set Style if (null != style) { if (setStyle) { button.setStyleName(style); } else { button.addStyleName(style); } } // Set icon if (null != icon) { button.addStyleName(ValoTheme.BUTTON_ICON_ONLY); button.setIcon(icon); } return button; }
From source file:org.eclipse.hawkbit.ui.decorators.SPUIButtonStyleTiny.java
License:Open Source License
@Override public Button decorate(final Button button, final String style, final boolean setStyle, final Resource icon) { button.addStyleName(ValoTheme.BUTTON_TINY); // Set Style//from w w w. ja v a 2 s .c om if (null != style) { if (setStyle) { button.setStyleName(style); } else { button.addStyleName(style); } } // Set icon if (null != icon) { button.addStyleName(ValoTheme.BUTTON_ICON_ONLY); button.setIcon(icon); } return button; }
From source file:org.eclipse.hawkbit.ui.decorators.SPUITagButtonStyle.java
License:Open Source License
@Override public Button decorate(final Button button, final String style, final boolean setStyle, final Resource icon) { button.setImmediate(true);/* w w w . j a v a 2 s .com*/ button.addStyleName("generatedColumnPadding button-no-border" + " " + ValoTheme.BUTTON_BORDERLESS + " " + "button-tag-no-border"); // Set Style if (null != style) { if (setStyle) { button.setStyleName(style); } else { button.addStyleName(style); } } // Set icon if (null != icon) { button.setIcon(icon); } return button; }
From source file:org.eclipse.hawkbit.ui.filtermanagement.CreateOrUpdateFilterHeader.java
License:Open Source License
private Button createBreadcrumbButton() { final Button createFilterViewLink = SPUIComponentProvider.getButton(null, "", "", null, false, null, SPUIButtonStyleNoBorder.class); createFilterViewLink .setStyleName(ValoTheme.LINK_SMALL + " " + "on-focus-no-border link rollout-caption-links"); createFilterViewLink.setDescription(i18n.getMessage(BREADCRUMB_CUSTOM_FILTERS)); createFilterViewLink.setCaption(i18n.getMessage(BREADCRUMB_CUSTOM_FILTERS)); createFilterViewLink.addClickListener(value -> showCustomFiltersView()); return createFilterViewLink; }
From source file:org.eclipse.hawkbit.ui.management.dstable.DistributionTable.java
License:Open Source License
private static void resetPinStyle(final Button pinBtn) { pinBtn.setStyleName(getPinStyle()); }
From source file:org.eclipse.hawkbit.ui.management.dstable.DistributionTable.java
License:Open Source License
private static void applyPinStyle(final Button eventBtn) { final StringBuilder style = new StringBuilder(SPUIComponentProvider.getPinButtonStyle()); style.append(' ').append(SPUIStyleDefinitions.DIST_PIN).append(' ').append("tablePin").append(' ') .append("pin-icon-red"); eventBtn.setStyleName(style.toString()); }
From source file:org.eclipse.hawkbit.ui.management.targettable.TargetTable.java
License:Open Source License
private Button getTagetPinButton(final Object itemId) { final Button pinBtn = new Button(); final String controllerId = (String) getContainerDataSource().getItem(itemId) .getItemProperty(SPUILabelDefinitions.VAR_CONT_ID).getValue(); final TargetIdName pinnedTarget = new TargetIdName((Long) itemId, controllerId); final StringBuilder pinBtnStyle = new StringBuilder(ValoTheme.BUTTON_BORDERLESS_COLORED); pinBtnStyle.append(' '); pinBtnStyle.append(ValoTheme.BUTTON_SMALL); pinBtnStyle.append(' '); pinBtnStyle.append(ValoTheme.BUTTON_ICON_ONLY); pinBtn.setStyleName(pinBtnStyle.toString()); pinBtn.setHeightUndefined();/* w w w .j a va 2 s . com*/ pinBtn.setData(pinnedTarget); pinBtn.setId(UIComponentIdProvider.TARGET_PIN_ICON + controllerId); pinBtn.addClickListener(this::addPinClickListener); pinBtn.setDescription(getI18n().getMessage(UIMessageIdProvider.TOOLTIP_TARGET_PIN)); if (isPinned(pinnedTarget)) { pinBtn.addStyleName(TARGET_PINNED); targetPinned = Boolean.TRUE; targetPinnedBtn = pinBtn; getEventBus().publish(this, PinUnpinEvent.PIN_TARGET); } pinBtn.addStyleName(SPUIStyleDefinitions.TARGET_STATUS_PIN_TOGGLE); HawkbitCommonUtil.applyStatusLblStyle(this, pinBtn, itemId); return pinBtn; }
From source file:org.eclipse.hawkbit.ui.rollout.rolloutgroup.RolloutGroupsListHeader.java
License:Open Source License
@Override protected HorizontalLayout getHeaderCaptionLayout() { headerCaption = new LabelBuilder().id(UIComponentIdProvider.ROLLOUT_GROUP_HEADER_CAPTION).name("") .buildCaptionLabel();/*from w w w . j av a 2 s . c o m*/ final Button rolloutsListViewLink = SPUIComponentProvider.getButton(null, "", "", null, false, null, SPUIButtonStyleNoBorder.class); rolloutsListViewLink .setStyleName(ValoTheme.LINK_SMALL + " " + "on-focus-no-border link rollout-caption-links"); rolloutsListViewLink.setDescription(i18n.getMessage("message.rollouts")); rolloutsListViewLink.setCaption(i18n.getMessage("message.rollouts")); rolloutsListViewLink.addClickListener(value -> showRolloutListView()); final HorizontalLayout headerCaptionLayout = new HorizontalLayout(); headerCaptionLayout.addComponent(rolloutsListViewLink); headerCaptionLayout.addComponent(new Label(">")); headerCaption.addStyleName("breadcrumbPaddingLeft"); headerCaptionLayout.addComponent(headerCaption); return headerCaptionLayout; }
From source file:org.eclipse.hawkbit.ui.rollout.rolloutgrouptargets.RolloutGroupTargetsListHeader.java
License:Open Source License
@Override protected HorizontalLayout getHeaderCaptionLayout() { headerCaption = new LabelBuilder().name("").buildCaptionLabel(); headerCaption.setStyleName(ValoTheme.LABEL_BOLD + " " + ValoTheme.LABEL_SMALL); final Button rolloutsListViewLink = SPUIComponentProvider.getButton(null, "", "", null, false, null, SPUIButtonStyleNoBorder.class); rolloutsListViewLink .setStyleName(ValoTheme.LINK_SMALL + " " + "on-focus-no-border link rollout-caption-links"); rolloutsListViewLink.setDescription(i18n.getMessage("message.rollouts")); rolloutsListViewLink.setCaption(i18n.getMessage("message.rollouts")); rolloutsListViewLink.addClickListener(value -> showRolloutListView()); rolloutNameLink = SPUIComponentProvider.getButton(null, "", "", null, false, null, SPUIButtonStyleNoBorder.class); rolloutNameLink.setStyleName(ValoTheme.LINK_SMALL + " " + "on-focus-no-border link rollout-caption-links"); rolloutNameLink.setDescription(i18n.getMessage("dashboard.rollouts.caption")); rolloutNameLink.addClickListener(value -> showRolloutGroupListView()); final HorizontalLayout headerCaptionLayout = new HorizontalLayout(); headerCaptionLayout.addComponent(rolloutsListViewLink); headerCaptionLayout.addComponent(new Label(">")); headerCaptionLayout.addComponent(rolloutNameLink); headerCaptionLayout.addComponent(new Label("> ")); headerCaptionLayout.addComponent(headerCaption); return headerCaptionLayout; }