List of usage examples for com.vaadin.ui Button getHeight
@Override public float getHeight()
From source file:org.apache.usergrid.chop.webapp.view.main.MainView.java
License:Apache License
private HorizontalLayout addButtons() { HorizontalLayout horizontalLayout = new HorizontalLayout(); /** Modules Button */ Button modules = new Button("Modules"); horizontalLayout.addComponent(modules); modules.addClickListener(new Button.ClickListener() { @Override// w w w. j a va2 s. c om public void buttonClick(Button.ClickEvent clickEvent) { tabSheetManager.addTabWithVerticalLayout(new ModuleLayout(MainView.this), "Modules"); } }); /** Runners Button */ Button runners = new Button("Runners"); horizontalLayout.addComponent(runners); runners.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { tabSheetManager.addTabWithVerticalLayout(new RunnersLayout(), "Runners"); } }); /** Users Button */ Button users = new Button("Users"); horizontalLayout.addComponent(users); users.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { UI.getCurrent().addWindow(new UserListWindow(tabSheetManager)); } }); /** Logs Button */ Button logs = new Button("Logs"); horizontalLayout.addComponent(logs); logs.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { tabSheetManager.addTabWithVerticalLayout(new LogLayout(), "Logs"); } }); /** Logout Button */ Button logout = new Button("Logout"); horizontalLayout.addComponent(logout); logout.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent clickEvent) { ShiroRealm.logout(); redirectToMainView(); } }); float weight = logout.getHeight(); horizontalLayout.setHeight(String.valueOf(weight)); return horizontalLayout; }