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

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

Introduction

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

Prototype

String BUTTON_LARGE

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

Click Source Link

Document

Large size button.

Usage

From source file:org.jpos.qi.system.EmptyView.java

License:Open Source License

public EmptyView(boolean canAdd) {
    Label emptyLabel = new Label("There are no items in this view");
    emptyLabel.addStyleName(ValoTheme.LABEL_H2);
    addComponents(emptyLabel);//  w ww.  j  a  v  a  2s  . c o m
    setComponentAlignment(emptyLabel, Alignment.TOP_CENTER);
    setExpandRatio(emptyLabel, 0);
    if (canAdd) {
        Button addNew = new Button(QI.getQI().getMessage("add"));
        addNew.setIcon(VaadinIcons.PLUS);
        String actualRoute = QI.getQI().getNavigator().getState();
        addNew.addClickListener(listener -> QI.getQI().getNavigator().navigateTo(actualRoute + "/new"));
        addNew.addStyleName(ValoTheme.BUTTON_LARGE);
        addNew.addStyleName(ValoTheme.BUTTON_FRIENDLY);
        addComponent(addNew);
        setComponentAlignment(addNew, Alignment.TOP_CENTER);
        setExpandRatio(addNew, 1);
    }

}