use of io.jmix.ui.component.ExpandingLayout in project jmix by jmix-framework.
the class DashboardModelConverter method initChildren.
private void initChildren(CanvasFragment fragment, DashboardLayout model, ComponentContainer delegate) {
boolean expanded = isExpanded(model);
if (!model.getChildren().isEmpty()) {
for (DashboardLayout childModel : model.getChildren()) {
CanvasLayout childContainer = modelToContainer(fragment, childModel);
delegate.add(childContainer);
if (childModel.getId().equals(model.getExpand())) {
if (delegate instanceof ExpandingLayout) {
((ExpandingLayout) delegate).expand(childContainer);
}
}
if (!expanded) {
childContainer.setWeight(childModel.getWeight());
}
}
}
}
Aggregations