Layouts - miguelperezcolom/mateu GitHub Wiki
Mateu supports some special interfaces and annotations for layouting your components.
This is useful when you want to place more than 1 component in your view. E.g. 2 forms, a form and a crud, ...
As per today Mateu supports VerticalLayout
, HorizontalLayout
and SplitLayout
.
You can create those by annotating List
fields with @xxxLayout
or by creating a class and annotating it with @xxxLayout
. E.g.:
@VerticalLayout
List<Object> right =
List.of(
new Card("Simple Card 7", "Subtitle 7", "Content 7"),
new Card("Simple Card 8", "Subtitle 8", "Content 8"));
you can also use:
@HorizontalLayout
public class HorizontalLayoutContainer {
Card simpleCard = new Card("Simple Card 4", "Subtitle 4", "Content 4");
SimpleForm simpleForm;
}