List of usage examples for com.vaadin.ui Window setSizeFull
@Override public void setSizeFull()
From source file:se.natusoft.osgi.aps.apsuseradminweb.vaadin.APSUSerAdminWebApp.java
License:Open Source License
/** * Creates the application GUI./*from w w w . j av a 2 s . co m*/ */ @Override public void initGUI() { this.setTheme(APSTheme.THEME); this.main = new Window("Application Platform Services Simple User Service Administration App"); this.main.setSizeFull(); VerticalLayout mainLayout = new VerticalLayout(); this.main.setContent(mainLayout); mainLayout.setMargin(false); mainLayout.setSizeFull(); this.layout = new SidesAndCenterLayout(); this.main.addComponent(this.layout); LeftBar leftBar = new LeftBar(); this.menuTree = new MenuTree(); this.menuTree.addListener(new Property.ValueChangeListener() { /** Handles input changes in the menu tree. */ @Override public void valueChange(Property.ValueChangeEvent event) { menuTreeItemHandler(event); } }); UsersMenuBuilder usersMenuBuilder = new UsersMenuBuilder(this.userService, this.logger); usersMenuBuilder.addRefreshable(this.menuTree); usersMenuBuilder.addRefreshable(new MenuRefreshable()); usersMenuBuilder.setClearCenterRefreshable(new ClearCenterRefreshable()); this.menuTree.addMenuBuilder(usersMenuBuilder); RolesMenuBuilder rolesMenuBuilder = new RolesMenuBuilder(this.userService, this.logger); rolesMenuBuilder.addRefreshable(this.menuTree); rolesMenuBuilder.addRefreshable(new MenuRefreshable()); rolesMenuBuilder.setClearCenterRefreshable(new ClearCenterRefreshable()); this.menuTree.addMenuBuilder(rolesMenuBuilder); this.menuTree.refresh(); this.menuTree.setActionHandler(this); leftBar.addComponent(this.menuTree); this.layout.setLeft(leftBar); this.layout.setCenter(Description.DESCRIPTION_VIEW); this.layout.doLayout(); // This is required after contents have been set. /* The window to show when an authorized user is not available. */ Window notAuthWindow = new Window("Application Platform Services Administration App"); notAuthWindow.setSizeFull(); VerticalLayout nawvl = new VerticalLayout(); Label loginMessage = new Label("<font size='+2'>Please login!</font>", Label.CONTENT_XHTML); nawvl.addComponent(loginMessage); notAuthWindow.setContent(nawvl); setMainWindow(notAuthWindow); }