Example usage for com.vaadin.ui.themes ValoTheme LABEL_BOLD

List of usage examples for com.vaadin.ui.themes ValoTheme LABEL_BOLD

Introduction

In this page you can find the example usage for com.vaadin.ui.themes ValoTheme LABEL_BOLD.

Prototype

String LABEL_BOLD

To view the source code for com.vaadin.ui.themes ValoTheme LABEL_BOLD.

Click Source Link

Document

Bolder font weight.

Usage

From source file:com.example.bbs.vaadin.view.Labels.java

License:Apache License

public Labels() {
    setMargin(true);/*  w  ww .java  2 s .c o m*/
    addStyleName("content-labels");

    Label h1 = new Label("Labels");
    h1.addStyleName(ValoTheme.LABEL_H1);
    addComponent(h1);

    HorizontalLayout split = new HorizontalLayout();
    split.setWidth("100%");
    addComponent(split);

    VerticalLayout left = new VerticalLayout();
    left.setMargin(new MarginInfo(false, true, false, false));
    split.addComponent(left);

    Label huge = new Label("Huge type for display text.");
    huge.addStyleName(ValoTheme.LABEL_HUGE);
    left.addComponent(huge);

    Label large = new Label(
            "Large type for introductory text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu.");
    large.addStyleName(ValoTheme.LABEL_LARGE);
    left.addComponent(large);

    Label h2 = new Label("Subtitle");
    h2.addStyleName(ValoTheme.LABEL_H2);
    left.addComponent(h2);

    Label normal = new Label(
            "Normal type for plain text, with a <a href=\"https://vaadin.com\">regular link</a>. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu.",
            ContentMode.HTML);
    left.addComponent(normal);

    Label h3 = new Label("Small Title");
    h3.addStyleName(ValoTheme.LABEL_H3);
    left.addComponent(h3);

    Label small = new Label(
            "Small type for additional text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu.");
    small.addStyleName(ValoTheme.LABEL_SMALL);
    left.addComponent(small);

    Label tiny = new Label("Tiny type for minor text.");
    tiny.addStyleName(ValoTheme.LABEL_TINY);
    left.addComponent(tiny);

    Label h4 = new Label("Section Title");
    h4.addStyleName(ValoTheme.LABEL_H4);
    left.addComponent(h4);

    normal = new Label(
            "Normal type for plain text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu.");
    left.addComponent(normal);

    Panel p = new Panel("Additional Label Styles");
    split.addComponent(p);

    VerticalLayout right = new VerticalLayout();
    right.setSpacing(true);
    right.setMargin(true);
    p.setContent(right);

    Label label = new Label(
            "Bold type for prominent text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu.");
    label.addStyleName(ValoTheme.LABEL_BOLD);
    right.addComponent(label);

    label = new Label(
            "Light type for subtle text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu.");
    label.addStyleName(ValoTheme.LABEL_LIGHT);
    right.addComponent(label);

    label = new Label(
            "Colored type for highlighted text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu.");
    label.addStyleName(ValoTheme.LABEL_COLORED);
    right.addComponent(label);

    label = new Label("A label for success");
    label.addStyleName(ValoTheme.LABEL_SUCCESS);
    right.addComponent(label);

    label = new Label("A label for failure");
    label.addStyleName(ValoTheme.LABEL_FAILURE);
    right.addComponent(label);

}

From source file:com.github.djabry.platform.vaadin.view.SideBarView.java

License:Open Source License

private Component buildTitle() {

    Label t = new Label("CE");
    t.addStyleName(ValoTheme.LABEL_HUGE);
    t.addStyleName(ValoTheme.LABEL_COLORED);
    t.addStyleName(ValoTheme.LABEL_BOLD);

    //t.addStyleName(ValoTheme.TEXTFIELD_ALIGN_CENTER);
    //t.setWidth("100%");
    //t.addStyleName(ValoTheme.LABEL_BOLD);
    return t;/*from   w ww  .  jav  a  2  s  .  co  m*/
}

From source file:com.mechanicshop.components.MaintenanceLayout.java

private void buildLayout() {
    HorizontalLayout layoutTitle = new HorizontalLayout();
    layoutTitle.setSizeUndefined();//www . java  2  s.  com
    layoutTitle.setWidth("100%");
    layoutTitle.setSpacing(false);
    layoutTitle.setMargin(false);
    titleLabel.addStyleName(ValoTheme.LABEL_H2);
    titleLabel.addStyleName(ValoTheme.LABEL_COLORED);
    titleLabel.addStyleName(ValoTheme.LABEL_NO_MARGIN);
    titleLabel.addStyleName(ValoTheme.LABEL_BOLD);
    titleLabel.setSizeUndefined();

    layoutTitle.addComponent(titleLabel);
    layoutTitle.setComponentAlignment(titleLabel, Alignment.MIDDLE_CENTER);

    VerticalLayout layoutTable = new VerticalLayout();

    layoutTable.setSizeFull();

    layoutTable.setSpacing(true);
    HorizontalLayout layoutButtons = new HorizontalLayout();
    layoutButtons.setMargin(false);
    layoutButtons.setSpacing(true);
    layoutButtons.setSizeUndefined();
    Button passwordBtn = new Button("Edit Password");
    passwordBtn.addClickListener(passwordListener);
    passwordBtn.setImmediate(true);
    passwordBtn.setIcon(FontAwesome.EDIT);
    passwordBtn.setStyleName(ValoTheme.BUTTON_TINY);
    Button media1Btn = new Button("Media 1 Default Text");
    media1Btn.setStyleName(ValoTheme.BUTTON_TINY);
    media1Btn.setImmediate(true);
    media1Btn.setIcon(FontAwesome.EDIT);
    media1Btn.addClickListener(media1Listener);
    Button media2Btn = new Button("Media 2 Default Text");
    media2Btn.setStyleName(ValoTheme.BUTTON_TINY);
    media2Btn.setImmediate(true);
    media2Btn.setIcon(FontAwesome.EDIT);
    media2Btn.addClickListener(media2Listener);
    layoutButtons.addComponents(passwordBtn, media1Btn, media2Btn);

    layoutButtons.setComponentAlignment(passwordBtn, Alignment.MIDDLE_LEFT);
    layoutButtons.setComponentAlignment(media1Btn, Alignment.MIDDLE_LEFT);
    layoutButtons.setComponentAlignment(media2Btn, Alignment.MIDDLE_LEFT);

    addComponent(layoutTitle);
    addComponent(layoutTable);
    layoutTable.addComponent(layoutButtons);
    layoutTable.addComponent(table);
    layoutTable.setComponentAlignment(table, Alignment.TOP_CENTER);
    layoutTable.setExpandRatio(table, 3);
    setComponentAlignment(layoutTitle, Alignment.TOP_CENTER);
    setComponentAlignment(layoutTable, Alignment.TOP_CENTER);
    setExpandRatio(layoutTable, 3);
    setSpacing(true);
    setMargin(true);

}

From source file:com.mechanicshop.components.TableLayout.java

private void buildLayout() {
    HorizontalLayout layoutTitle = new HorizontalLayout();
    layoutTitle.setSizeUndefined();/*  w  w  w. java2 s .c o  m*/
    layoutTitle.setWidth("100%");
    layoutTitle.setSpacing(false);
    layoutTitle.setMargin(false);
    titleLabel.addStyleName(ValoTheme.LABEL_H2);
    titleLabel.addStyleName(ValoTheme.LABEL_COLORED);
    titleLabel.addStyleName(ValoTheme.LABEL_NO_MARGIN);
    titleLabel.addStyleName(ValoTheme.LABEL_BOLD);
    titleLabel.setSizeUndefined();

    layoutTitle.addComponent(titleLabel);
    layoutTitle.setComponentAlignment(titleLabel, Alignment.MIDDLE_CENTER);

    VerticalLayout layoutTable = new VerticalLayout();

    layoutTable.addComponent(table);
    layoutTable.setComponentAlignment(table, Alignment.TOP_CENTER);
    layoutTable.setSizeFull();

    layoutTable.setSpacing(true);
    HorizontalLayout layoutButtons = new HorizontalLayout();
    layoutButtons.setMargin(false);
    layoutButtons.setSpacing(true);
    layoutButtons.setSizeUndefined();
    layoutButtons.setWidth("100%");
    Button addBtn = new Button("Add new Car");
    addBtn.addClickListener(addBtnListener);
    addBtn.setImmediate(true);
    addBtn.setStyleName(ValoTheme.BUTTON_TINY);
    addBtn.addStyleName(ValoTheme.BUTTON_FRIENDLY);
    Button deleteBtn = new Button("Delete Selected");
    deleteBtn.setStyleName(ValoTheme.BUTTON_TINY);
    deleteBtn.addStyleName(ValoTheme.BUTTON_DANGER);
    deleteBtn.setImmediate(true);
    deleteBtn.addClickListener(removeListener);

    btnSendSMS.setStyleName(ValoTheme.BUTTON_TINY);
    btnSendSMS.addStyleName(ValoTheme.BUTTON_FRIENDLY);
    btnSendSMS.setImmediate(true);
    btnSendSMS.addClickListener(sendSMSBtnListener);

    searchTextField.setImmediate(true);
    searchTextField.addStyleName(ValoTheme.TEXTFIELD_TINY);
    searchTextField.addTextChangeListener(filterChangeListener);
    Label lbSearch = new Label("Search");
    lbSearch.addStyleName(ValoTheme.LABEL_TINY);
    lbSearch.setSizeUndefined();
    layoutButtons.addComponents(lbSearch, searchTextField, addBtn, deleteBtn, btnSendSMS);

    layoutButtons.setComponentAlignment(lbSearch, Alignment.MIDDLE_LEFT);
    layoutButtons.setComponentAlignment(searchTextField, Alignment.BOTTOM_LEFT);
    layoutButtons.setComponentAlignment(addBtn, Alignment.BOTTOM_RIGHT);
    layoutButtons.setComponentAlignment(deleteBtn, Alignment.BOTTOM_RIGHT);
    layoutButtons.setComponentAlignment(btnSendSMS, Alignment.BOTTOM_RIGHT);
    layoutButtons.setExpandRatio(addBtn, 3);
    addComponent(layoutTitle);
    addComponent(layoutTable);
    layoutTable.addComponent(layoutButtons);
    layoutTable.setExpandRatio(table, 3);
    setComponentAlignment(layoutTitle, Alignment.TOP_CENTER);
    setComponentAlignment(layoutTable, Alignment.TOP_CENTER);
    setExpandRatio(layoutTable, 3);
    setSpacing(true);
    setMargin(true);

}

From source file:com.philippefichet.vaadincdipush.view.FirstView.java

public void receiveMessage(String login, String message) {
    getUI().access(() -> {/*from w  w  w  . j av a  2  s.  co  m*/
        Label msgAdded = null;
        if (login == null) {
            msgAdded = new Label(message, ContentMode.HTML);
            msgAdded.addStyleName(ValoTheme.LABEL_BOLD);
        } else {
            msgAdded = new Label(login + ": " + message);
        }
        messageLayout.addComponent(msgAdded);
        messagePanel.setScrollTop(messageLayout.getComponentCount() * 100);
    });
}

From source file:de.fatalix.bookery.AppHeader.java

License:Open Source License

private HorizontalLayout createTop() {
    Label header = new Label("Bookery");
    header.addStyleName(ValoTheme.LABEL_BOLD);
    //header.addStyleName(ValoTheme.LABEL_H3);
    header.setSizeUndefined();/*from w  w  w  . jav  a 2s  .  c om*/

    MHorizontalLayout layout = new MHorizontalLayout(header);
    layout.setWidth(100, Unit.PERCENTAGE);
    layout.setExpandRatio(header, 1.0f);
    layout.setComponentAlignment(header, Alignment.MIDDLE_LEFT);
    //layout.setComponentAlignment(logoutButton, Alignment.BOTTOM_RIGHT);
    return layout;
}

From source file:de.fatalix.bookery.AppHeader.java

License:Open Source License

private MHorizontalLayout createSearchBar() {
    Label header = new Label("Bookery");
    header.addStyleName(ValoTheme.LABEL_BOLD);
    header.setSizeUndefined();// w w  w .j a va 2s  .  c om
    header.addStyleName(ValoTheme.LABEL_H3);

    searchText = new TextField();
    searchText.setIcon(FontAwesome.SEARCH);
    searchText.addStyleName(ValoTheme.TEXTFIELD_LARGE);
    searchText.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
    searchText.setWidth(100, Unit.PERCENTAGE);
    searchText.setInputPrompt("hier einfach suchen..");
    Button searchButton = new Button("such!", new Button.ClickListener() {
        @Override
        public void buttonClick(Button.ClickEvent event) {
            Navigator navigator = ((App) UI.getCurrent()).getNavigator();
            if (navigator.getState().contains("search")) {
                navigator.navigateTo(navigator.getState());
            } else {
                navigator.navigateTo(SearchView.id);
            }

        }
    });
    searchButton.addStyleName(ValoTheme.BUTTON_LARGE);
    searchText.addShortcutListener(new Button.ClickShortcut(searchButton, ShortcutAction.KeyCode.ENTER));

    MHorizontalLayout layout = new MHorizontalLayout(header, searchText, searchButton);
    layout.setWidth(100, Unit.PERCENTAGE);
    layout.setExpandRatio(searchText, 1.0f);
    return layout;
}

From source file:de.fatalix.bookery.view.common.BookDetailLayout.java

License:Open Source License

@PostConstruct
private void postInit() {
    addStyleName("product-form-wrapper");
    addStyleName("product-form");
    titleLabel = new Label("Title - Author");
    titleLabel.addStyleName(ValoTheme.LABEL_COLORED);
    titleLabel.addStyleName(ValoTheme.LABEL_BOLD);
    descriptionLabel = new Label("Description", ContentMode.HTML);
    descriptionLabel.addStyleName(ValoTheme.LABEL_LIGHT);
    descriptionLabel.setValue("Keine Beschreibung vorhanden");

    cancelButton = new Button("close", new Button.ClickListener() {

        @Override/* ww w.  ja  va2s  .c  om*/
        public void buttonClick(Button.ClickEvent event) {
            setLayoutVisible(false);
        }
    });
    cancelButton.setClickShortcut(ShortcutAction.KeyCode.ESCAPE);
    cancelButton.addStyleName(ValoTheme.BUTTON_DANGER);

    VerticalLayout rootLayout = new VerticalLayout(titleLabel, createImageLayout(), descriptionLabel,
            cancelButton);
    rootLayout.setSpacing(true);
    addComponent(rootLayout);
}

From source file:de.fatalix.bookery.view.common.BookMenuLayout.java

@PostConstruct
private void postInit() {
    addStyleName("bookery-menu-wrapper");
    addStyleName("bookery-menu");
    Label titleLabel = new Label("Bookery Menu");
    titleLabel.addStyleName(ValoTheme.LABEL_COLORED);
    titleLabel.addStyleName(ValoTheme.LABEL_BOLD);

    Button cancelButton = new Button("close", new Button.ClickListener() {

        @Override/* w w  w  . ja v  a  2 s. c o m*/
        public void buttonClick(Button.ClickEvent event) {
            setLayoutVisible(false);
        }
    });
    cancelButton.setClickShortcut(ShortcutAction.KeyCode.ESCAPE);
    cancelButton.addStyleName(ValoTheme.BUTTON_DANGER);

    VerticalLayout rootLayout = new VerticalLayout(titleLabel, cancelButton);
    rootLayout.setSpacing(true);
    addComponent(rootLayout);
}

From source file:de.fatalix.bookery.view.common.BookSearchLayout.java

License:Open Source License

private VerticalLayout createSearchResultLayout() {
    resultText = new Label(" 0 Ergebnisse gefunden");
    resultText.addStyleName(ValoTheme.LABEL_BOLD);
    resultLayout = new HorizontalLayout();
    resultLayout.setSpacing(true);/*from w w  w.j ava2  s .c  o m*/
    resultLayout.addStyleName("wrapping");
    showMore = new Button("show more", new Button.ClickListener() {

        @Override
        public void buttonClick(Button.ClickEvent event) {
            searchBooks(query, false);

        }
    });
    showMore.setWidth(100, Unit.PERCENTAGE);
    showMore.addStyleName(ValoTheme.BUTTON_HUGE);
    showMore.addStyleName(ValoTheme.BUTTON_FRIENDLY);
    VerticalLayout root = new VerticalLayout();
    root.addStyleName("bookery-view");
    root.setSpacing(true);
    root.setMargin(true);
    root.addComponents(resultText, resultLayout, showMore);
    return root;
}