Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package com.library.librarytest;
- import com.vaadin.annotations.Theme;
- import com.vaadin.ui.HorizontalLayout;
- import com.vaadin.ui.Label;
- import com.vaadin.ui.VerticalLayout;
- /**
- *
- * @author gee
- */
- @Theme("mytheme")
- public class HelloWorld extends VerticalLayout {
- private final VerticalLayout upperSection = new VerticalLayout();
- private final HorizontalLayout lowerSection = new HorizontalLayout();
- private final VerticalLayout menuLayout = new VerticalLayout();
- private final VerticalLayout contentLayout = new VerticalLayout();
- public HelloWorld() {
- upperSection.addComponent(new Label("Header"));
- menuLayout.addComponent(new Label("Menu"));
- contentLayout.addComponent(new Label("Content"));
- lowerSection.addComponent(menuLayout);
- upperSection.addComponent(contentLayout);
- addComponent(upperSection);
- addComponent(lowerSection);
- setSizeFull();
- lowerSection.setSizeFull();
- menuLayout.setSizeFull();
- contentLayout.setSizeFull();
- setExpandRatio(lowerSection, 1);
- showBorders();
- }
- private void showBorders() {
- String style = "v-ddwrapper-over";
- setStyleName(style);
- upperSection.setStyleName(style);
- lowerSection.setStyleName(style);
- menuLayout.setStyleName(style);
- contentLayout.setStyleName(style);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement