Data-Centric Applications with Vaadin 8
上QQ阅读APP看书,第一时间看更新

Adding and configuring the required UI components

The first step is to create the required Vaadin UI components and configure them using the standard Vaadin API. This can be done as follows:

public class TabBasedApplicationLayout extends Composite {

private VerticalLayout mainLayout = new VerticalLayout();
private HorizontalLayout header = new HorizontalLayout();
private HorizontalSplitPanel splitPanel
= new HorizontalSplitPanel();
private VerticalLayout menuLayout = new VerticalLayout();
private TabSheet tabSheet = new TabSheet();

public TabBasedApplicationLayout(String caption) {
... layout and components configuration
}
}
The code to configure the UI elements is omitted, as it is not the purpose of this book to explain Vaadin UI components' basic usage and configuration. The full implementation can be found in the Data-centric-Applications-with-Vaadin-8\chapter-02\api Maven project of the source code that accompanies this book.