Accordion 布局类似 TabSheet,不过是以垂直方式安排多个标签页,其使用方法也和 TabSheet 布局类似。// Create the Accordion.Accordion accordion = new Accordion();// Have it take all space available in the layout.accordion.setSizeFull();// Some components to put in the Accordion.Label l1 = new Label("There are no previously saved actions.");
VerticalLayout 和 HorizontalLayout 分別垂直和水平安排其中的UI組件。這是 Vaadin 框架中兩個最為重要的布局方式。比如 Window 及其父類 Panel 預設的布局就為 VerticalLayout。這兩種布局的基本用法如下:VerticalLayout vertical = new VerticalLayout ();vertical.addComponent(new TextField("Name"));vertical.addComponent(new TextField("Street address"));