Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

CustomLayout with foot line

Dario Schmidt
1 decade ago Sep 02, 2011 3:03pm
Marko Grönroos
1 decade ago Sep 03, 2011 11:41am

That sort of layout should go roughly like:

VerticalLayout rootLayout = new VerticalLayout();
rootLayout.setSizeFull();
mainWindow.setContent(rootLayout);

HorizontalLayout header = new HorizontalLayout();
header.addComponent(new Label("Header");
header.setWidth("100%");
rootLayout.addComponent(header);

WhateverLayout content = new WhateverLayout();
content.addComponent(new Label("Content");
content.setSizeFull();
rootLayout.addComponent(content);
rootLayout.setExpandRatio(content, 1.0f);

HorizontalLayout footer = new HorizontalLayout();
footer.addComponent(new Label("Footer");
footer.setWidth("100%");
rootLayout.addComponent(footer);

Did not test the code. See this example for a typical application UI (no footer though).

Dario Schmidt
1 decade ago Sep 05, 2011 10:17am
Dario Schmidt
1 decade ago Sep 05, 2011 3:17pm