com.vaadin.ui.Button.setStyleName() - java examples

Here are the examples of the java api com.vaadin.ui.Button.setStyleName() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

47 Examples 7

18 View Complete Implementation : SPUIButtonStyleNoBorderWithIcon.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void setOrAddButtonStyle(final String style, final boolean setStyle) {
    if (StringUtils.isEmpty(style)) {
        return;
    }
    if (setStyle) {
        // overwrite all other styles
        button.setStyleName(style);
    } else {
        button.addStyleName(style);
    }
}

18 View Complete Implementation : DistributionTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
@EventBusListenerMethod(scope = EventScope.UI)
void onEvent(final PinUnpinEvent pinUnpinEvent) {
    UI.getCurrent().access(() -> {
        if (pinUnpinEvent == PinUnpinEvent.PIN_TARGET) {
            refreshFilter();
            styleDistributionTableOnPinning();
            // unstyleDistPin
            if (distributionPinnedBtn != null) {
                distributionPinnedBtn.setStyleName(getPinStyle());
            }
        } else if (pinUnpinEvent == PinUnpinEvent.UNPIN_TARGET) {
            refreshFilter();
            restoreDistributionTableStyle();
        }
    });
}

18 View Complete Implementation : DistributionTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void checkifAlreadyPinned(final Button eventBtn) {
    final Long newPinnedDisreplacedemId = ((DistributionSetIdName) eventBtn.getData()).getId();
    final Long pinnedDistId = managementUIState.getTargetTableFilters().getPinnedDistId().orElse(null);
    if (pinnedDistId == null) {
        distPinned = !distPinned;
        managementUIState.getTargetTableFilters().setPinnedDistId(newPinnedDisreplacedemId);
    } else if (newPinnedDisreplacedemId.equals(pinnedDistId)) {
        distPinned = false;
    } else {
        distPinned = true;
        managementUIState.getTargetTableFilters().setPinnedDistId(newPinnedDisreplacedemId);
        distributionPinnedBtn.setStyleName(getPinStyle());
    }
    distributionPinnedBtn = eventBtn;
}

18 View Complete Implementation : DistributionTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
private static void resetPinStyle(final Button pinBtn) {
    pinBtn.setStyleName(getPinStyle());
}

18 View Complete Implementation : DistributionTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
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());
}

16 View Complete Implementation : IterationsChartLayout.java
Copyright Apache License 2.0
Author : apache
protected void addFailuresButton() {
    failuresButton = UIUtil.addButton(this, "Show failures", "left: 1000px; top: 370px;", "180px");
    failuresButton.setStyleName(Reindeer.BUTTON_LINK);
    failuresButton.setVisible(false);
    failuresButton.addClickListener(new Button.ClickListener() {

        public void buttonClick(Button.ClickEvent event) {
            showFailures();
        }
    });
}

16 View Complete Implementation : CubaButtonField.java
Copyright Apache License 2.0
Author : cuba-platform
@Override
protected Component initContent() {
    Button button = new CubaButton();
    button.setStyleName(BaseTheme.BUTTON_LINK);
    return button;
}

16 View Complete Implementation : ExampleQueriesPanel.java
Copyright Apache License 2.0
Author : korpling
private Component getOpenCorpusPanel(final String corpusName) {
    final Button btn = new Button(corpusName);
    btn.setStyleName(BaseTheme.BUTTON_LINK);
    btn.addClickListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            CorpusListPanel corpusList = ui.getSearchView().getControlPanel().getCorpusList();
            corpusList.initCorpusBrowser(corpusName, btn);
        }
    });
    return btn;
}

16 View Complete Implementation : DashBoardView.java
Copyright GNU General Public License v3.0
Author : rlsutton1
protected Button createShareButton() {
    Button share = new Button(FontAwesome.SHARE);
    share.setDescription("Share Dashboard");
    share.setStyleName(ValoTheme.BUTTON_ICON_ONLY);
    // share.addStyleName(ValoTheme.BUTTON_DANGER);
    return share;
}

16 View Complete Implementation : DashBoardView.java
Copyright GNU General Public License v3.0
Author : rlsutton1
protected Button createMakeDefaultButton() {
    Button rename = new Button(FontAwesome.STAR);
    rename.setDescription("Make Default Dashboard");
    rename.setStyleName(ValoTheme.BUTTON_ICON_ONLY);
    return rename;
}

16 View Complete Implementation : DashBoardView.java
Copyright GNU General Public License v3.0
Author : rlsutton1
protected Button createRenameButton() {
    Button rename = new Button(FontAwesome.EDIT);
    rename.setDescription("Rename Dashboard");
    rename.setStyleName(ValoTheme.BUTTON_ICON_ONLY);
    return rename;
}

16 View Complete Implementation : ComboBoxWithSearchFieldChooserWindow.java
Copyright GNU General Public License v3.0
Author : rlsutton1
public void setNullSelectionAllowed(boolean b, String prompt) {
    if (b) {
        if (noneButton == null) {
            noneButton = new Button(StringUtils.defaultString(prompt, "Select None"));
            noneButton.setWidth("100%");
            noneButton.setStyleName(ValoTheme.BUTTON_FRIENDLY);
            noneButton.addClickListener(new ClickListener() {

                private static final long serialVersionUID = 1L;

                @Override
                public void buttonClick(ClickEvent event) {
                    listener.selected(null);
                    grid.select(null);
                }
            });
            grid.addComponent(noneButton);
        }
    }
}

15 View Complete Implementation : NoteLayout.java
Copyright Apache License 2.0
Author : apache
private Button createButton(String caption, String position, boolean visible) {
    Button button = UIUtil.addButton(this, caption, position, "50px");
    button.setStyleName(Reindeer.BUTTON_LINK);
    button.setVisible(visible);
    return button;
}

15 View Complete Implementation : DocBrowserTable.java
Copyright Apache License 2.0
Author : korpling
public Button generateInfoButtonCell(final String docName) {
    Button btn = new Button();
    btn.setStyleName(ChameleonTheme.BUTTON_BORDERLESS);
    btn.setIcon(INFO_ICON);
    btn.addClickListener(new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            try {
                List<Annotation> annos = getDocMetaData(docName);
                /**
                 * Transforms to a list of key value pairs. The values concates the
                 * namespace and ordinary value. Namespaces "NULL" are ignored.
                 */
                // create datasource and bind it to a table
                BeanItemContainer<Annotation> metaContainer = new BeanItemContainer<>(Annotation.clreplaced);
                metaContainer.addAll(annos);
                metaContainer.sort(new Object[] { "namespace", "name" }, new boolean[] { true, true });
                Table metaTable = new Table();
                metaTable.setContainerDataSource(metaContainer);
                metaTable.addGeneratedColumn("genname", new MetaDataPanel.MetaTableNameGenerator(metaContainer));
                metaTable.addGeneratedColumn("genvalue", new MetaDataPanel.MetaTableValueGenerator(metaContainer));
                metaTable.setVisibleColumns("genname", "genvalue");
                metaTable.setColumnHeaders(new String[] { "Name", "Value" });
                metaTable.setSizeFull();
                metaTable.setColumnWidth("genname", -1);
                metaTable.setColumnExpandRatio("genvalue", 1.0f);
                metaTable.addStyleName(ChameleonTheme.TABLE_STRIPED);
                // create and style the extra window for the metadata table
                Window metaWin = new Window();
                metaWin.setContent(metaTable);
                metaWin.setCaption("metadata doc " + docName);
                metaWin.center();
                metaWin.setWidth(400, Unit.PIXELS);
                metaWin.setHeight(400, Unit.PIXELS);
                // paint the window
                docBrowserPanel.getUI().addWindow(metaWin);
            } catch (UniformInterfaceException ex) {
                log.error("can not retrieve metadata for doreplacedent " + docName, ex);
            }
        }
    });
    return btn;
}

14 View Complete Implementation : CubaRowsCount.java
Copyright Apache License 2.0
Author : cuba-platform
protected ComponentContainer createContentLayout() {
    CubaCssActionsLayout contentLayout = new CubaCssActionsLayout();
    contentLayout.setStyleName("c-paging-wrap");
    contentLayout.setSpacing(true);
    firstButton = new CubaButton();
    firstButton.setStyleName("c-paging-change-page");
    firstButton.addStyleName("c-paging-first");
    contentLayout.addComponent(firstButton);
    prevButton = new CubaButton();
    prevButton.setStyleName("c-paging-change-page");
    prevButton.addStyleName("c-paging-prev");
    contentLayout.addComponent(prevButton);
    label = new Label();
    label.setWidthUndefined();
    label.setStyleName("c-paging-status");
    contentLayout.addComponent(label);
    countButton = new CubaButton("[?]");
    countButton.setWidthUndefined();
    countButton.setStyleName(ValoTheme.BUTTON_LINK);
    countButton.addStyleName("c-paging-count");
    countButton.setTabIndex(-1);
    contentLayout.addComponent(countButton);
    nextButton = new CubaButton();
    nextButton.setStyleName("c-paging-change-page");
    nextButton.addStyleName("c-paging-next");
    contentLayout.addComponent(nextButton);
    lastButton = new CubaButton();
    lastButton.setStyleName("c-paging-change-page");
    lastButton.addStyleName("c-paging-last");
    contentLayout.addComponent(lastButton);
    return contentLayout;
}

14 View Complete Implementation : DashBoardView.java
Copyright GNU General Public License v3.0
Author : rlsutton1
protected Button createDeleteButton() {
    Button delete = new Button(FontAwesome.TRASH);
    delete.setDescription("Delete Dashboard");
    delete.setStyleName(ValoTheme.BUTTON_ICON_ONLY);
    delete.addStyleName(ValoTheme.BUTTON_DANGER);
    return delete;
}

14 View Complete Implementation : DashBoardView.java
Copyright GNU General Public License v3.0
Author : rlsutton1
protected Button createNewButton() {
    Button newDashboard = new Button(FontAwesome.PLUS);
    newDashboard.setDescription("New Dashboard");
    newDashboard.setStyleName(ValoTheme.BUTTON_ICON_ONLY);
    newDashboard.addStyleName(ValoTheme.BUTTON_FRIENDLY);
    return newDashboard;
}

14 View Complete Implementation : EntityAutoCompleteField.java
Copyright GNU General Public License v3.0
Author : rlsutton1
// customize caption
protected void configureTokenButton(Object tokenId, Button button) {
    // custom caption
    if (tokenId instanceof Long) {
        Long tagid = (Long) tokenId;
        E enreplacedy = dao.findById(tagid);
        button.setCaption(enreplacedy.getName() + " x");
        button.setDescription("Click to remove");
        button.setIcon(getTokenIcon(tokenId));
        button.setStyleName(Reindeer.BUTTON_LINK);
    } else {
        @SuppressWarnings("unchecked")
        E enreplacedy = (E) tokenId;
        button.setCaption(enreplacedy.getName() + " x");
        button.setDescription("Click to remove");
        button.setIcon(getTokenIcon(tokenId));
        button.setStyleName(Reindeer.BUTTON_LINK);
    }
// throw new
// IllegalArgumentException("Expected tokenId to be a Enreplacedy instead found a "
// + tokenId.getClreplaced().getName());
}

13 View Complete Implementation : SPUITagButtonStyle.java
Copyright Eclipse Public License 1.0
Author : eclipse
@Override
public Button decorate(final Button button, final String style, final boolean setStyle, final Resource icon) {
    button.setImmediate(true);
    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;
}

13 View Complete Implementation : CreateOrUpdateFilterHeader.java
Copyright Eclipse Public License 1.0
Author : eclipse
private Button createBreadcrumbButton() {
    final Button createFilterViewLink = SPUIComponentProvider.getButton(null, "", "", null, false, null, SPUIButtonStyleNoBorder.clreplaced);
    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;
}

13 View Complete Implementation : AbstractTagLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
protected void createRequiredComponents() {
    colorLabel = new LabelBuilder().name(i18n.getMessage("label.choose.tag.color")).buildLabel();
    colorLabel.addStyleName(SPUIStyleDefinitions.COLOR_LABEL_STYLE);
    tagName = new TextFieldBuilder(getTagNameSize()).caption(i18n.getMessage("textfield.name")).styleName(ValoTheme.TEXTFIELD_TINY + " " + SPUIDefinitions.TAG_NAME).required(true, i18n).prompt(i18n.getMessage("textfield.name")).immediate(true).id(getTagNameId()).buildTextComponent();
    tagDesc = new TextAreaBuilder(getTagDescSize()).caption(i18n.getMessage("textfield.description")).styleName(ValoTheme.TEXTFIELD_TINY + " " + SPUIDefinitions.TAG_DESC).prompt(i18n.getMessage("textfield.description")).id(getTagDescId()).buildTextComponent();
    tagDesc.setNullRepresentation("");
    tagColorPreviewBtn = new Button();
    tagColorPreviewBtn.setId(UIComponentIdProvider.TAG_COLOR_PREVIEW_ID);
    getPreviewButtonColor(ColorPickerConstants.DEFAULT_COLOR);
    tagColorPreviewBtn.setStyleName(TAG_DYNAMIC_STYLE);
}

13 View Complete Implementation : EmailTokenField.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
private Component generateToken(final SimpleUser user) {
    final Button btn = new Button("", VaadinIcons.CLOSE_SMALL);
    btn.setCaptionAsHtml(true);
    btn.setCaption((new Img("", StorageUtils.getAvatarPath(user.getAvatarid(), 16))).write() + " " + user.getDisplayName());
    btn.addClickListener(clickEvent -> {
        EmailTokenField.this.removeComponent(btn);
        inviteEmails.remove(user.getEmail());
    });
    btn.setStyleName("token-field");
    return btn;
}

13 View Complete Implementation : BasePortalAdder.java
Copyright GNU General Public License v3.0
Author : rlsutton1
protected Button createAddButton(final String replacedle) {
    Button button = new Button(FontAwesome.PLUS.getHtml());
    button.setDescription("Click to add '" + replacedle + "' to the current Dashboard");
    button.setCaptionAsHtml(true);
    button.setStyleName(ValoTheme.BUTTON_TINY);
    button.addStyleName(ValoTheme.BUTTON_FRIENDLY);
    return button;
}

13 View Complete Implementation : SubSetSelector.java
Copyright Apache License 2.0
Author : viritin
/**
 * Generates the tool cell content in the listing of selected items. By
 * default contains button to remove selection. Overridden implementation
 * can add other stuff there as well, like edit button.
 *
 * @param enreplacedy the enreplacedy for which the cell content is created
 * @return the content (String or Component)
 */
protected Object getToolColumnContent(final ET enreplacedy) {
    Button button = new Button(VaadinIcons.MINUS);
    button.setDescription("Removes the selection from the list");
    button.addStyleName(ValoTheme.BUTTON_ICON_ONLY);
    button.addClickListener(new Button.ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            removeSelectedOption(enreplacedy);
        }
    });
    button.setStyleName(ValoTheme.BUTTON_SMALL);
    return button;
}

12 View Complete Implementation : CubaFileUploadWrapper.java
Copyright Apache License 2.0
Author : cuba-platform
protected void initLayout(UploadComponent uploadComponent) {
    this.uploadButton = uploadComponent;
    container = new CssLayout();
    container.addStyleName("c-fileupload-container");
    fileNameButton = new CubaButton();
    fileNameButton.setWidth(100, Unit.PERCENTAGE);
    fileNameButton.addStyleName(ValoTheme.BUTTON_LINK);
    fileNameButton.addStyleName("c-fileupload-filename");
    setFileNameButtonCaption(null);
    container.addComponent(fileNameButton);
    container.addComponent(uploadComponent);
    clearButton = new CubaButton("");
    clearButton.setStyleName("c-fileupload-clear");
    container.addComponent(clearButton);
    setShowClearButton(showClearButton);
    setShowFileName(false);
    setWidthUndefined();
}

12 View Complete Implementation : SPUIButtonStyleSmall.java
Copyright Eclipse Public License 1.0
Author : eclipse
@Override
public Button decorate(final Button button, final String style, final boolean setStyle, final Resource icon) {
    button.addStyleName(ValoTheme.BUTTON_SMALL);
    if (style != null) {
        if (setStyle) {
            button.setStyleName(style);
        } else {
            button.addStyleName(style);
        }
    }
    if (icon != null) {
        button.addStyleName(ValoTheme.BUTTON_ICON_ONLY);
        button.setIcon(icon);
    }
    return button;
}

12 View Complete Implementation : SPUIButtonStyleTiny.java
Copyright Eclipse Public License 1.0
Author : eclipse
@Override
public Button decorate(final Button button, final String style, final boolean setStyle, final Resource icon) {
    button.addStyleName(ValoTheme.BUTTON_TINY);
    // 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;
}

11 View Complete Implementation : TargetTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
private Button getTagetPinButton(final Object itemId) {
    final Button pinBtn = new Button();
    final String controllerId = (String) getContainerDataSource().gereplacedem(itemId).gereplacedemProperty(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();
    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;
}

11 View Complete Implementation : RolloutGroupsListHeader.java
Copyright Eclipse Public License 1.0
Author : eclipse
@Override
protected HorizontalLayout getHeaderCaptionLayout() {
    headerCaption = new LabelBuilder().id(UIComponentIdProvider.ROLLOUT_GROUP_HEADER_CAPTION).name("").buildCaptionLabel();
    final Button rolloutsListViewLink = SPUIComponentProvider.getButton(null, "", "", null, false, null, SPUIButtonStyleNoBorder.clreplaced);
    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;
}

11 View Complete Implementation : RolloutGroupTargetsListHeader.java
Copyright Eclipse Public License 1.0
Author : eclipse
@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.clreplaced);
    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.clreplaced);
    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;
}

11 View Complete Implementation : CRUDBaseView.java
Copyright Apache License 2.0
Author : opensecuritycontroller
// returns Header layout with view replacedle
@SuppressWarnings("serial")
private HorizontalLayout createHeader(String replacedle, final boolean isChildTable) {
    HorizontalLayout header = null;
    if (isChildTable) {
        header = ViewUtil.createSubHeader(replacedle, getChildHelpGuid());
    } else {
        header = ViewUtil.createSubHeader(replacedle, getParentHelpGuid());
    }
    Button refresh = new Button();
    refresh.setStyleName(Reindeer.BUTTON_LINK);
    refresh.setDescription("Refresh");
    refresh.setIcon(new ThemeResource("img/Refresh.png"));
    refresh.addClickListener(new ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            if (isChildTable) {
                populateChildTable(getParenreplacedem());
            } else {
                populateParentTable();
            }
        }
    });
    header.addComponent(refresh);
    return header;
}

11 View Complete Implementation : SslConfigurationLayout.java
Copyright Apache License 2.0
Author : opensecuritycontroller
private HorizontalLayout createHeaderForSslList() {
    HorizontalLayout header = ViewUtil.createSubHeader("List of available certificates", null);
    Button refresh = new Button();
    refresh.setStyleName(Reindeer.BUTTON_LINK);
    refresh.setDescription("Refresh");
    refresh.setIcon(new ThemeResource("img/Refresh.png"));
    refresh.addClickListener((Button.ClickListener) event -> buildSslConfigurationTable());
    header.addComponent(refresh);
    return header;
}

10 View Complete Implementation : VisualizerPanel.java
Copyright Apache License 2.0
Author : korpling
@Override
public void attach() {
    super.attach();
    if (entry != null && ps != null) {
        visPlugin = ps.getVisualizer(entry.getVisType());
        if (visPlugin == null) {
            // fallback to default visualizer if original vis type was not found
            entry.setVisType(PluginSystem.DEFAULT_VISUALIZER);
            visPlugin = ps.getVisualizer(entry.getVisType());
        }
        if (HIDDEN.equalsIgnoreCase(entry.getVisibility())) {
            // build button for visualizer
            btEntry = new Button(entry.getDisplayName());
            btEntry.setIcon(ICON_EXPAND);
            btEntry.setStyleName(ChameleonTheme.BUTTON_BORDERLESS + " " + ChameleonTheme.BUTTON_SMALL);
            btEntry.addClickListener((Button.ClickListener) this);
            btEntry.setDisableOnClick(true);
            addComponent(btEntry);
            addComponent(progress);
        } else {
            if (ISVISIBLE.equalsIgnoreCase(entry.getVisibility()) || PRELOADED.equalsIgnoreCase(entry.getVisibility())) {
                // build button for visualizer
                btEntry = new Button(entry.getDisplayName());
                btEntry.setIcon(ICON_COLLAPSE);
                btEntry.setStyleName(ChameleonTheme.BUTTON_BORDERLESS + " " + ChameleonTheme.BUTTON_SMALL);
                btEntry.addClickListener((Button.ClickListener) this);
                addComponent(btEntry);
            }
            addComponent(progress);
            // create the visualizer and calc input
            try {
                vis = createComponent(UI.getCurrent());
                if (vis != null) {
                    vis.setVisible(true);
                    addComponent(vis);
                }
            } catch (Exception ex) {
                Notification.show("Could not create visualizer " + visPlugin.getShortName(), ex.toString(), Notification.Type.TRAY_NOTIFICATION);
                log.error("Could not create visualizer " + visPlugin.getShortName(), ex);
            }
            if (btEntry != null && PRELOADED.equalsIgnoreCase(entry.getVisibility())) {
                btEntry.setIcon(ICON_EXPAND);
                if (vis != null) {
                    vis.setVisible(false);
                }
            }
        }
    }
// end if entry not null
}

10 View Complete Implementation : CRUDBaseSubView.java
Copyright Apache License 2.0
Author : opensecuritycontroller
// returns Header layout with view replacedle
@SuppressWarnings("serial")
private HorizontalLayout createHeader(String replacedle) {
    HorizontalLayout header = ViewUtil.createSubHeader(replacedle, getSubViewHelpGuid());
    Button refresh = new Button();
    refresh.setStyleName(Reindeer.BUTTON_LINK);
    refresh.setDescription("Refresh");
    refresh.setIcon(new ThemeResource("img/Refresh.png"));
    refresh.addClickListener(new ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            populateTable();
        }
    });
    header.addComponent(refresh);
    return header;
}

8 View Complete Implementation : BasePortal.java
Copyright GNU General Public License v3.0
Author : rlsutton1
private HorizontalLayout createHeader(String replacedle, final DashBoardController dashBoard) {
    HorizontalLayout header = new HorizontalLayout();
    header.setWidth("100%");
    header.setHeight("25");
    replacedleLabel = new Label(replacedle);
    replacedleLabel.setStyleName(ValoTheme.LABEL_COLORED);
    header.addComponent(replacedleLabel);
    HorizontalLayout controlLayout = new HorizontalLayout();
    Button removeButton = new Button(FontAwesome.CLOSE);
    removeButton.setStyleName(ValoTheme.BUTTON_LINK);
    removeButton.addClickListener(new ClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            dashBoard.removeComponent(BasePortal.this);
            Tblportal portal = JpaBaseDao.getGenericDao(Tblportal.clreplaced).findOneByAttribute(Tblportal_.guid, guid);
            if (portal != null) {
                portal.getPortalLayout().removePortal(portal);
                JpaDslBuilder<Tblportalconfig> q = JpaBaseDao.getGenericDao(Tblportalconfig.clreplaced).select();
                q.where(q.eq(Tblportalconfig_.portal, portal)).delete();
                EnreplacedyManagerProvider.remove(portal);
            }
        }
    });
    if (creplacederConfigurePortal()) {
        addCustomHeaderButtons(controlLayout);
        controlLayout.addComponent(removeButton);
    }
    header.addComponent(controlLayout);
    header.setComponentAlignment(controlLayout, Alignment.MIDDLE_RIGHT);
    return header;
}

7 View Complete Implementation : MainUI.java
Copyright Apache License 2.0
Author : opensecuritycontroller
private void buildHeader() {
    this.header.addStyleName("branding");
    this.header.addStyleName("header");
    // product name and information
    Label product = new Label(this.server.getProductName() + "<br> <span clreplaced='product-version'> Version: " + this.server.getVersionStr() + "</span>", ContentMode.HTML);
    product.addStyleName("product-label");
    product.setSizeUndefined();
    HorizontalLayout brandingLayout = new HorizontalLayout();
    brandingLayout.addStyleName("header-content");
    brandingLayout.addComponent(new Image(null, new ThemeResource("img/logo.png")));
    brandingLayout.addComponent(product);
    // creating home help button
    Button mainHelpButton = new Button();
    mainHelpButton.setImmediate(true);
    mainHelpButton.setStyleName(Reindeer.BUTTON_LINK);
    mainHelpButton.setDescription("Help");
    mainHelpButton.setIcon(new ThemeResource("img/headerHelp.png"));
    mainHelpButton.addClickListener(new ClickListener() {

        private String guid = "";

        @Override
        public void buttonClick(ClickEvent event) {
            ViewUtil.showHelpBrowserWindow(this.guid);
        }
    });
    HorizontalLayout helpLayout = new HorizontalLayout();
    helpLayout.addComponent(mainHelpButton);
    helpLayout.addStyleName("homeHelpButton");
    // Adding current user to header
    Label user = new Label("User: " + getCurrent().getSession().getAttribute("user").toString());
    // header banner
    HorizontalLayout userlayout = new HorizontalLayout();
    userlayout.addStyleName("user");
    userlayout.addComponent(user);
    // create Logout button next to user
    userlayout.addComponent(buildLogout());
    // Adding help button to the user layout next to logout button
    userlayout.addComponent(helpLayout);
    this.header.setWidth("100%");
    this.header.setHeight("65px");
    this.header.addComponent(brandingLayout);
    this.header.addComponent(userlayout);
    this.header.setExpandRatio(brandingLayout, 1);
    this.root.addComponent(this.header);
}

7 View Complete Implementation : PageInformationComponent.java
Copyright Apache License 2.0
Author : opensecuritycontroller
private Component buildMainLayout() {
    // top-level component properties
    setWidth("100.0%");
    setHeight("-1px");
    setStyleName(StyleConstants.PAGE_INFO_COMPONENT_COMMON);
    // infoLabel
    this.replacedleLabel = new Label();
    initializeLabel(this.replacedleLabel);
    final Button collapseButton = new Button();
    collapseButton.setStyleName(Reindeer.BUTTON_LINK);
    collapseButton.setIcon(new ThemeResource(StyleConstants.EXPAND_IMAGE));
    collapseButton.addClickListener(new ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            PageInformationComponent.this.contentLabel.setVisible(!PageInformationComponent.this.contentLabel.isVisible());
            if (PageInformationComponent.this.contentLabel.isVisible()) {
                collapseButton.setIcon(new ThemeResource(StyleConstants.COLLAPSE_IMAGE));
            } else {
                collapseButton.setIcon(new ThemeResource(StyleConstants.EXPAND_IMAGE));
            }
        }
    });
    HorizontalLayout replacedleLayout = new HorizontalLayout();
    initializeLayout(replacedleLayout);
    replacedleLayout.setStyleName(StyleConstants.PAGE_INFO_replacedLE_LAYOUT);
    replacedleLayout.addComponent(this.replacedleLabel);
    replacedleLayout.addComponent(collapseButton);
    replacedleLayout.setExpandRatio(this.replacedleLabel, 1.0f);
    this.contentLabel = new Label();
    initializeLabel(this.contentLabel);
    this.contentLabel.setVisible(false);
    this.contentLabel.setStyleName(StyleConstants.PAGE_INFO_CONTENT_LABEL);
    this.contentLabel.setContentMode(ContentMode.HTML);
    VerticalLayout mainLayout = new VerticalLayout();
    initializeLayout(mainLayout);
    mainLayout.addComponent(replacedleLayout);
    mainLayout.addComponent(this.contentLabel);
    return mainLayout;
}

6 View Complete Implementation : DocBrowserTable.java
Copyright Apache License 2.0
Author : korpling
private Panel generateVisualizerLinks(String docName) {
    Panel p = new Panel();
    VerticalLayout l = new VerticalLayout();
    p.addStyleName(ChameleonTheme.PANEL_BORDERLESS);
    if (docVisualizerConfig != null) {
        Visualizer[] visualizers = docVisualizerConfig.getVisualizers();
        if (visualizers != null) {
            for (Visualizer visualizer : visualizers) {
                Button openVis = new Button(visualizer.getDisplayName());
                openVis.setDescription("open visualizer with the full text of " + docName);
                openVis.addClickListener(new OpenVisualizerWindow(docName, visualizer, openVis));
                openVis.setStyleName(BaseTheme.BUTTON_LINK);
                openVis.setDisableOnClick(true);
                l.addComponent(openVis);
            }
        }
    }
    p.setContent(l);
    return p;
}

6 View Complete Implementation : ViewUtil.java
Copyright Apache License 2.0
Author : opensecuritycontroller
/**
 * @param toolbar
 *            HorizontalLayout which contains all the action Buttons
 * @param toolbarButton
 *            Which Tool bar button to create (Provided using ENUM constant)
 * @param listner
 *            Click listener called when this button is clicked
 * @return
 */
public static Button buildToolbarButton(HorizontalLayout toolbar, ToolbarButtons toolbarButton, ClickListener listner) {
    Button button = new Button(toolbarButton.getText());
    button.addStyleName(StyleConstants.BUTTON_TOOLBAR);
    button.setDescription(toolbarButton.getTooltip());
    button.setStyleName(ValoTheme.BUTTON_LINK);
    if (StringUtils.isNotEmpty(toolbarButton.getImageLocation())) {
        button.setIcon(new ThemeResource(toolbarButton.getImageLocation()), toolbarButton.toString());
    }
    button.setEnabled(false);
    button.setId(toolbarButton.getId());
    button.addClickListener(listner);
    toolbar.addComponent(button);
    return button;
}

5 View Complete Implementation : GetStartedInstructionWindow.java
Copyright GNU Affero General Public License v3.0
Author : MyCollab
private void displayInfo(SimpleUser user) {
    Div infoDiv = new Div().appendText("You have not setup SMTP account properly. So we can not send the invitation by email automatically. Please copy/paste below paragraph and inform to the user by yourself").setStyle("font-weight:bold;color:red");
    Label infoLbl = new Label(infoDiv.write(), ContentMode.HTML);
    Div userInfoDiv = new Div().appendText("Your username is ").appendChild(new B().appendText(user.getEmail()));
    Label userInfoLbl = ELabel.html(userInfoDiv.write());
    if (Boolean.TRUE.equals(user.isAccountOwner())) {
        user.setRoleName(UserUIContext.getMessage(RoleI18nEnum.OPT_ACCOUNT_OWNER));
    }
    Div roleInfoDiv = new Div().appendText("Your role is ").appendChild(new B().appendText(user.getRoleName()));
    Label roleInfoLbl = new Label(roleInfoDiv.write(), ContentMode.HTML);
    contentLayout.with(infoLbl, userInfoLbl, roleInfoLbl);
    final Button addNewBtn = new Button("Create another user", clickEvent -> {
        EventBusFactory.getInstance().post(new UserEvent.GotoAdd(GetStartedInstructionWindow.this, null));
        close();
    });
    addNewBtn.setStyleName(WebThemes.BUTTON_ACTION);
    Button doneBtn = new Button(UserUIContext.getMessage(GenericI18Enum.ACTION_DONE), clickEvent -> close());
    doneBtn.setStyleName(WebThemes.BUTTON_ACTION);
    final MHorizontalLayout controlsBtn = new MHorizontalLayout(addNewBtn, doneBtn).withMargin(true);
    contentLayout.with(controlsBtn).withAlign(controlsBtn, Alignment.MIDDLE_RIGHT);
}

2 View Complete Implementation : AbstractMenuItemFactoryImpl.java
Copyright Apache License 2.0
Author : Hack23
/**
 * 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 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("replacedle");
    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);
}

2 View Complete Implementation : FlatQueryBuilder.java
Copyright Apache License 2.0
Author : korpling
private void launch(QueryController cp) {
    this.cp = cp;
    rsc = new ReducingStringComparator();
    this.query = "";
    mainLayout = new VerticalLayout();
    // tracking lists for vertical nodes, edgeboxes and metaboxes
    vnodes = new ArrayList<>();
    eboxes = new ArrayList<>();
    mboxes = new ArrayList<>();
    spbox = null;
    // buttons and checks
    btGo = new Button(BUTTON_GO_LABEL, (Button.ClickListener) this);
    btGo.setStyleName(ChameleonTheme.BUTTON_SMALL);
    btClear = new Button(BUTTON_CLEAR_LABEL, (Button.ClickListener) this);
    btClear.setStyleName(ChameleonTheme.BUTTON_SMALL);
    btInverse = new Button(BUTTON_INV_LABEL, (Button.ClickListener) this);
    btInverse.setStyleName(ChameleonTheme.BUTTON_SMALL);
    btInitLanguage = new Button("Initialize", (Button.ClickListener) this);
    btInitLanguage.setDescription(INFO_INIT_LANG);
    btInitSpan = new Button("Initialize", (Button.ClickListener) this);
    btInitSpan.setDescription(INFO_INIT_SPAN);
    btInitMeta = new Button("Initialize", (Button.ClickListener) this);
    btInitMeta.setDescription(INFO_INIT_META);
    filtering = new NativeSelect("Filtering mechanisms");
    filtering.setDescription(INFO_FILTER);
    ReducingStringComparator rdc = new ReducingStringComparator();
    Set mappings = rdc.getMappings().keySet();
    int i;
    for (i = 0; i < mappings.size(); i++) {
        String mapname = (String) mappings.toArray()[i];
        filtering.addItem(i);
        filtering.sereplacedemCaption(i, mapname);
    }
    filtering.addItem(i + 1);
    filtering.sereplacedemCaption(i + 1, "generic");
    filtering.select(i + 1);
    filtering.setNullSelectionAllowed(false);
    filtering.setImmediate(true);
    // language layout
    language = new HorizontalLayout();
    languagenodes = new HorizontalLayout();
    language.addComponent(languagenodes);
    language.addComponent(btInitLanguage);
    language.setMargin(true);
    language.setCaption(LANG_CAPTION);
    language.addStyleName("linguistics-panel");
    // span layout
    span = new HorizontalLayout();
    span.setSpacing(true);
    span.addComponent(btInitSpan);
    span.setMargin(true);
    span.setCaption(SPAN_CAPTION);
    span.addStyleName("span-panel");
    // meta layout
    meta = new HorizontalLayout();
    meta.setSpacing(true);
    meta.addComponent(btInitMeta);
    meta.setMargin(true);
    meta.setCaption(META_CAPTION);
    meta.addStyleName("meta-panel");
    // toolbar layout
    toolbar = new HorizontalLayout();
    toolbar.setSpacing(true);
    toolbar.addComponent(btGo);
    toolbar.addComponent(btClear);
    toolbar.addComponent(btInverse);
    toolbar.setMargin(true);
    toolbar.setCaption(TOOLBAR_CAPTION);
    toolbar.addStyleName("toolbar-panel");
    // advanced
    advanced = new HorizontalLayout();
    advanced.setSpacing(true);
    advanced.addComponent(filtering);
    advanced.setMargin(true);
    advanced.setCaption(ADVANCED_CAPTION);
    advanced.addStyleName("advanced-panel");
    // put everything on the layout
    mainLayout.setSpacing(true);
    mainLayout.addComponent(language);
    mainLayout.addComponent(span);
    mainLayout.addComponent(meta);
    mainLayout.addComponent(toolbar);
    mainLayout.addComponent(advanced);
    setContent(mainLayout);
    getContent().setWidth("100%");
    getContent().setHeight("-1px");
}

2 View Complete Implementation : ViewUtil.java
Copyright Apache License 2.0
Author : opensecuritycontroller
/**
 * @param caption
 *            Caption Text Representing Header
 * @param guid
 *            Help GUID for caller view
 * @return
 *         Horizontal Layout containing Caption text and Help button
 */
public static HorizontalLayout createSubHeader(String caption, String guid) {
    HorizontalLayout subHeader = new HorizontalLayout();
    subHeader.setWidth("100%");
    subHeader.setHeight("35px");
    subHeader.setSpacing(true);
    subHeader.addStyleName("toolbar");
    final Label replacedle = new Label(caption);
    replacedle.setSizeUndefined();
    subHeader.addComponent(replacedle);
    subHeader.setComponentAlignment(replacedle, Alignment.MIDDLE_LEFT);
    subHeader.setExpandRatio(replacedle, 1);
    // create help button if we have some GUID else do not add this button
    if (guid != null) {
        Button helpButton = new Button();
        helpButton.setImmediate(true);
        helpButton.setStyleName(Reindeer.BUTTON_LINK);
        helpButton.setDescription("Help");
        helpButton.setIcon(new ThemeResource("img/Help.png"));
        subHeader.addComponent(helpButton);
        helpButton.addClickListener(new HelpButtonListener(guid));
    }
    return subHeader;
}

0 View Complete Implementation : ErrorWindow.java
Copyright GNU General Public License v3.0
Author : rlsutton1
private void showWindow(String causeClreplaced, String id, final Date time, final String finalId, final String finalTrace, final String reference, final byte[] imageData) {
    final Window window = new Window();
    UI.getCurrent().addWindow(window);
    window.setModal(true);
    window.center();
    window.setResizable(false);
    window.setCaption("Error " + id);
    window.setClosable(false);
    // window.setHeight("50%");
    window.setWidth("50%");
    VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);
    layout.setSpacing(true);
    final Label message = new Label("<b>An error has occurred (" + causeClreplaced + ").<br><br>Reference:</b> " + reference);
    message.setContentMode(ContentMode.HTML);
    Label describe = new Label("<b>Please describe what you were doing when this error occured (Optional)<b>");
    describe.setContentMode(ContentMode.HTML);
    final TextArea notes = new TextArea();
    notes.setWidth("100%");
    final String supportEmail = getTargetEmailAddress();
    close.addClickListener(new ClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            try {
                generateEmail(time, finalId, finalTrace, reference, notes.getValue(), supportEmail, getViewName(), getUserName(), getUserEmail(), imageData);
            } catch (Exception e) {
                logger.error(e, e);
                Notification.show("Error sending error report", Type.ERROR_MESSAGE);
            } finally {
                window.close();
            }
        }
    });
    close.setStyleName(ValoTheme.BUTTON_DANGER);
    close.setId(ERROR_WINDOW_CLOSE_BUTTON);
    layout.addComponent(message);
    layout.addComponent(describe);
    layout.addComponent(notes);
    layout.addComponent(uploadStatus);
    layout.addComponent(close);
    layout.addComponent(new Label("Information about this error will be sent to " + getSupportCompanyName()));
    window.setContent(layout);
}

0 View Complete Implementation : DateTimePickerInline.java
Copyright GNU General Public License v3.0
Author : rlsutton1
@Override
protected void buildUI(String replacedle) {
    datePicker = new InlineDateField(replacedle + " Date");
    datePicker.setDateFormat("yyyy/MM/dd");
    datePicker.setValue(new Date());
    displayDate = createTextDateField();
    datePicker.addValueChangeListener(new ValueChangeListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void valueChange(Property.ValueChangeEvent event) {
            final Date date = (Date) event.getProperty().getValue();
            displayDate.setValue(dateFormatter.format(date));
        }
    });
    final Label midnightLabel = new Label();
    midnightLabel.setContentMode(ContentMode.HTML);
    field = new TextField();
    field.setWidth("125");
    field.setImmediate(true);
    displayTime = field;
    displayTime.addValidator(timeValidator);
    field.addValidator(timeValidator);
    field.addValueChangeListener(new ValueChangeListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void valueChange(com.vaadin.data.Property.ValueChangeEvent event) {
            DateTimePickerInline.this.valueChange(event);
            @SuppressWarnings("deprecation")
            int hour = getValue().getHours();
            if (hour == 0) {
                midnightLabel.setValue("<font color='red'><b>Midnight</b></font>");
            } else {
                midnightLabel.setValue("");
            }
            try {
                final Date parsedDate = parseDate((String) event.getProperty().getValue());
                if (parsedDate != null) {
                    Calendar parsed = Calendar.getInstance();
                    parsed.setTime(parsedDate);
                    dateTime.set(Calendar.HOUR_OF_DAY, parsed.get(Calendar.HOUR_OF_DAY));
                    dateTime.set(Calendar.MINUTE, parsed.get(Calendar.MINUTE));
                    isSet = true;
                    setNewValue();
                }
            } catch (InvalidValueException e) {
                logger.info(e);
            // the validator will handle this
            }
        }
    });
    field.setCaption(null);
    datePicker.setCaption(null);
    VerticalLayout vl = new VerticalLayout();
    HorizontalLayout dateLayout = new HorizontalLayout();
    dateLayout.setWidth("210");
    Button changeYearButton = new Button("Year");
    changeYearButton.setDescription("Change the year");
    changeYearButton.setStyleName(ValoTheme.BUTTON_TINY);
    changeYearButton.addClickListener(getChangeYearClickListener());
    dateLayout.addComponent(displayDate);
    dateLayout.addComponent(changeYearButton);
    dateLayout.setComponentAlignment(changeYearButton, Alignment.MIDDLE_RIGHT);
    vl.addComponent(datePicker);
    HorizontalLayout timeFieldLayout = new HorizontalLayout();
    timeFieldLayout.setSpacing(true);
    timeFieldLayout.addComponent(field);
    timeFieldLayout.addComponent(midnightLabel);
    timeFieldLayout.setComponentAlignment(midnightLabel, Alignment.MIDDLE_LEFT);
    vl.addComponent(buildInline());
    addComponent(vl);
    vl.addComponent(timeFieldLayout);
    vl.addComponent(dateLayout);
    vl.setSpacing(true);
}

0 View Complete Implementation : WindowBreadCrumbs.java
Copyright Apache License 2.0
Author : cuba-platform
public void update() {
    boolean isTestMode = ui.isTestMode();
    linksLayout.removeAllComponents();
    for (Iterator<Window> it = windows.iterator(); it.hasNext(); ) {
        Window window = it.next();
        Button button = new NavigationButton(window);
        button.setCaption(StringUtils.trimToEmpty(window.getCaption()));
        button.addClickListener(this::navigationButtonClicked);
        button.setSizeUndefined();
        button.setStyleName(ValoTheme.BUTTON_LINK);
        button.setTabIndex(-1);
        if (isTestMode) {
            button.setCubaId("breadCrubms_Button_" + window.getId());
        }
        if (ui.isPerformanceTestMode()) {
            button.setId(ui.getTestIdManager().getTestId("breadCrubms_Button_" + window.getId()));
        }
        if (it.hasNext()) {
            linksLayout.addComponent(button);
            Label separatorLab = new Label(" > ");
            separatorLab.setStyleName("c-breadcrumbs-separator");
            separatorLab.setSizeUndefined();
            separatorLab.setContentMode(ContentMode.HTML);
            linksLayout.addComponent(separatorLab);
        } else {
            Label captionLabel = new Label(window.getCaption());
            captionLabel.setStyleName("c-breadcrumbs-win-caption");
            captionLabel.setSizeUndefined();
            linksLayout.addComponent(captionLabel);
        }
    }
}

0 View Complete Implementation : DemoUI.java
Copyright Apache License 2.0
Author : TatuLund
@Override
protected void init(VaadinRequest vaadinRequest) {
    final VerticalLayout layout = new VerticalLayout();
    layout.setSizeFull();
    MessageGrid messageGrid = new MessageGrid();
    DemoFastGrid demoGrid = new DemoFastGrid(messageGrid);
    Button clearButton = new Button("Clear");
    clearButton.addClickListener(e -> {
        messageGrid.clear();
    });
    Button addButton = new Button();
    // Add Row
    addButton.setIcon(VaadinIcons.PLUS_CIRCLE);
    addButton.addClickListener(e -> {
        demoGrid.addBlankRow();
    });
    addButton.setDescription("Add a new row");
    Button rowValidationButton = new Button();
    rowValidationButton.setIcon(VaadinIcons.CHECK_CIRCLE_O);
    rowValidationButton.setStyleName(ValoTheme.BUTTON_QUIET);
    rowValidationButton.addClickListener(e -> {
        demoGrid.getNavigation().setRowValidation(!demoGrid.getNavigation().getRowValidation());
        if (!demoGrid.getNavigation().getRowValidation())
            rowValidationButton.setStyleName(ValoTheme.BUTTON_QUIET);
        else
            rowValidationButton.setStyleName(ValoTheme.BUTTON_FRIENDLY);
    });
    rowValidationButton.setDescription("Toggle rowValidation");
    Button rowOpenClickButton = new Button();
    rowOpenClickButton.setIcon(VaadinIcons.FOLDER_OPEN_O);
    rowOpenClickButton.setStyleName(ValoTheme.BUTTON_FRIENDLY);
    rowOpenClickButton.addClickListener(e -> {
        demoGrid.getNavigation().setOpenEditorWithSingleClick(!demoGrid.getNavigation().getOpenEditorWithSingleClick());
        if (!demoGrid.getNavigation().getOpenEditorWithSingleClick())
            rowOpenClickButton.setStyleName(ValoTheme.BUTTON_QUIET);
        else
            rowOpenClickButton.setStyleName(ValoTheme.BUTTON_FRIENDLY);
    });
    rowOpenClickButton.setDescription("Toggle openEditorWithSingleClick");
    Button rowOpenByTypingButton = new Button();
    rowOpenByTypingButton.setIcon(VaadinIcons.KEYBOARD_O);
    rowOpenByTypingButton.setStyleName(ValoTheme.BUTTON_FRIENDLY);
    rowOpenByTypingButton.addClickListener(e -> {
        demoGrid.getNavigation().setOpenEditorOnTyping(!demoGrid.getNavigation().getOpenEditorOnTyping());
        if (!demoGrid.getNavigation().getOpenEditorOnTyping())
            rowOpenByTypingButton.setStyleName(ValoTheme.BUTTON_QUIET);
        else
            rowOpenByTypingButton.setStyleName(ValoTheme.BUTTON_FRIENDLY);
    });
    rowOpenByTypingButton.setDescription("Toggle openEditorOnTyping");
    Button openEditorButton = new Button();
    openEditorButton.setIcon(VaadinIcons.INPUT);
    openEditorButton.setDescription("Open editor at 1,3");
    openEditorButton.setStyleName(ValoTheme.BUTTON_FRIENDLY);
    openEditorButton.addClickListener(e -> {
        demoGrid.openEditor();
    });
    Button disableGridEditButton = new Button();
    disableGridEditButton.setIcon(VaadinIcons.PENCIL);
    disableGridEditButton.setDescription("Toggle Grid Editing");
    disableGridEditButton.setStyleName(ValoTheme.BUTTON_FRIENDLY);
    disableGridEditButton.addClickListener(e -> {
        if (demoGrid.getEditor().isEnabled()) {
            if (demoGrid.getEditor().isOpen()) {
                demoGrid.getEditor().cancel();
            }
            demoGrid.getEditor().setEnabled(false);
            openEditorButton.setEnabled(false);
            disableGridEditButton.setStyleName(ValoTheme.BUTTON_QUIET);
        } else {
            demoGrid.getEditor().setEnabled(true);
            openEditorButton.setEnabled(true);
            disableGridEditButton.setStyleName(ValoTheme.BUTTON_FRIENDLY);
        }
    });
    Button moveSelectionButton = new Button();
    moveSelectionButton.setIcon(VaadinIcons.BULLSEYE);
    moveSelectionButton.setDescription("Toggle select follow");
    moveSelectionButton.setStyleName(ValoTheme.BUTTON_QUIET);
    moveSelectionButton.addClickListener(e -> {
        if (demoGrid.moveSelection) {
            demoGrid.moveSelection = false;
            demoGrid.deselectAll();
            demoGrid.setSelectionMode(SelectionMode.NONE);
            moveSelectionButton.setStyleName(ValoTheme.BUTTON_QUIET);
        } else {
            demoGrid.moveSelection = true;
            demoGrid.setSelectionMode(SelectionMode.SINGLE);
            moveSelectionButton.setStyleName(ValoTheme.BUTTON_FRIENDLY);
        }
    });
    Button resetFocusButton = new Button();
    resetFocusButton.setIcon(VaadinIcons.CORNER_UPPER_LEFT);
    resetFocusButton.setDescription("Reset focust to 0,1");
    resetFocusButton.setStyleName(ValoTheme.BUTTON_FRIENDLY);
    resetFocusButton.addClickListener(e -> {
        demoGrid.resetFocus();
    });
    HorizontalLayout buttons = new HorizontalLayout();
    buttons.addComponents(addButton, rowValidationButton, rowOpenClickButton, rowOpenByTypingButton, disableGridEditButton, moveSelectionButton, resetFocusButton, openEditorButton);
    layout.setMargin(true);
    layout.setSpacing(true);
    layout.addComponent(demoGrid);
    layout.addComponent(buttons);
    layout.addComponent(messageGrid);
    layout.addComponent(clearButton);
    layout.setSizeFull();
    layout.setExpandRatio(demoGrid, 10);
    layout.setExpandRatio(buttons, 1);
    layout.setExpandRatio(clearButton, 1);
    layout.setExpandRatio(messageGrid, 6);
    setContent(layout);
}