use of com.qcadoo.view.internal.components.layout.GridLayoutCell in project qcadoo by qcadoo.
the class FormComponentPattern method tryAddVersionField.
private void tryAddVersionField() {
List<ComponentPattern> layouts = getChildren().values().stream().filter(childComponentPattern -> childComponentPattern instanceof GridLayoutPattern).collect(Collectors.toList());
if (!layouts.isEmpty()) {
GridLayoutPattern gridLayoutPattern = (GridLayoutPattern) layouts.get(0);
FieldComponentPattern versionComponentPattern = getVersionField(gridLayoutPattern);
gridLayoutPattern.addChild(versionComponentPattern);
GridLayoutCell[][] cells = gridLayoutPattern.getCells();
if (cells != null && cells[0] != null && cells[0][0] != null) {
cells[0][0].addComponent(versionComponentPattern);
}
}
}
Aggregations