List of usage examples for com.vaadin.ui CustomLayout setSizeUndefined
@Override public void setSizeUndefined()
From source file:cz.zcu.pia.social.network.frontend.components.login.ComponentLogin.java
/** * PostConstruct//from w w w. ja v a2 s . c o m */ @PostConstruct public void postConstruct() { CustomLayout content = new CustomLayout("login"); content.setSizeUndefined(); this.addComponent(content); nickname.setCaption(msgs.getMessage(INFO_USERNAME)); password.setCaption(msgs.getMessage(INFO_PASSWORD)); Button login = createLoginButton(); Button infoRegister = createRegisterButton(); content.addComponent(infoRegister, "register-button"); content.addComponent(nickname, "username"); content.addComponent(password, "password"); content.addComponent(login, "okbutton"); }
From source file:org.eclipse.hawkbit.ui.login.AbstractHawkbitLoginUI.java
License:Open Source License
private void addFooter(final VerticalLayout rootLayout) { final Resource resource = context .getResource("classpath:/VAADIN/themes/" + UI.getCurrent().getTheme() + "/layouts/footer.html"); try (final InputStream resourceStream = resource.getInputStream()) { final CustomLayout customLayout = new CustomLayout(resourceStream); customLayout.setSizeUndefined(); rootLayout.addComponent(customLayout); rootLayout.setComponentAlignment(customLayout, Alignment.BOTTOM_LEFT); } catch (final IOException ex) { LOG.error("Footer file cannot be loaded", ex); }/*w ww . ja va 2 s. c om*/ }
From source file:org.eclipse.hawkbit.ui.login.HawkbitLoginUI.java
License:Open Source License
@Override protected void init(final VaadinRequest request) { SpringContextHelper.setContext(context); final VerticalLayout rootLayout = new VerticalLayout(); final Component header = buildHeader(); rootLayout.addComponent(header);/*from ww w . j av a 2 s. c o m*/ rootLayout.setSizeFull(); final HorizontalLayout content = new HorizontalLayout(); rootLayout.addComponent(content); content.setStyleName("view-content"); content.setSizeFull(); rootLayout.setStyleName("main-content"); rootLayout.setExpandRatio(header, 1.0F); rootLayout.setExpandRatio(content, 2.0F); final Resource resource = context .getResource("classpath:/VAADIN/themes/" + UI.getCurrent().getTheme() + "/layouts/footer.html"); try (InputStream resourceStream = resource.getInputStream()) { final CustomLayout customLayout = new CustomLayout(resourceStream); customLayout.setSizeUndefined(); rootLayout.addComponent(customLayout); } catch (final IOException ex) { LOG.error("Footer file cannot be loaded", ex); } setContent(rootLayout); final Navigator navigator = new Navigator(this, content); navigator.addProvider(viewProvider); setNavigator(navigator); }