use of org.uberfire.ext.layout.editor.client.api.LayoutEditorElement in project kie-wb-common by kiegroup.
the class FormEditorPresenter method onLayoutEditorElementSelectEvent.
public void onLayoutEditorElementSelectEvent(@Observes LayoutEditorElementSelectEvent event) {
LayoutEditorElement element = event.getElement();
if (element instanceof ComponentColumn) {
ComponentColumn componentColumn = (ComponentColumn) element;
LayoutComponent layoutComponent = componentColumn.getLayoutComponent();
LayoutDragComponent layoutDragComponent = componentColumn.getLayoutDragComponent();
boolean containsElement = getFormDefinition().getLayoutTemplate().contains(layoutComponent);
if (layoutDragComponent instanceof EditorFieldLayoutComponent && containsElement) {
((EditorFieldLayoutComponent) layoutDragComponent).addComponentParts(layoutComponent);
}
componentColumn.setupParts();
}
}
Aggregations