当前位置: 首页>>代码示例>>Java>>正文


Java LayoutRow类代码示例

本文整理汇总了Java中org.uberfire.ext.layout.editor.api.editor.LayoutRow的典型用法代码示例。如果您正苦于以下问题:Java LayoutRow类的具体用法?Java LayoutRow怎么用?Java LayoutRow使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


LayoutRow类属于org.uberfire.ext.layout.editor.api.editor包,在下文中一共展示了LayoutRow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: load

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
public void load(LayoutTemplate layoutTemplate,
                 String emptyTitleText,
                 String emptySubTitleText) {
    this.layoutTemplate = layoutTemplate;
    this.layoutName = layoutTemplate.getName();
    this.pageStyle = layoutTemplate.getStyle();
    this.emptyTitleText = emptyTitleText;
    this.emptySubTitleText = emptySubTitleText;
    this.rows.forEach(this::destroy);
    this.rows.clear();
    if (!layoutTemplate.isEmpty()) {
        this.properties = layoutTemplate.getLayoutProperties();
        for (LayoutRow layoutRow : layoutTemplate.getRows()) {
            rows.add(load(layoutRow));
        }
        updateView();
    } else {
        clearView();
        createEmptyDropRow();
    }
    setupResizeRows();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:Container.java

示例2: extractColumnWithComponents

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
private void extractColumnWithComponents(LayoutColumn layoutColumn) {
    for (LayoutRow row : layoutColumn.getRows()) {
        Integer columnWidth = new Integer(layoutColumn.getSpan());
        final ColumnWithComponents columnWithComponents = createColumnWithComponentsInstance();

        columnWithComponents
                .init(id,
                      columnWidth,
                      pageStyle,
                      dropCommand(),
                      removeComponentCommand,
                      removeColumnCommand(),
                      currentLayoutTemplateSupplier,
                      getHeight(layoutColumn.getHeight()));

        for (LayoutColumn column : row.getLayoutColumns()) {
            ComponentColumn newComponentColumn = getComponentColumn(column);
            newComponentColumn.setColumnHeight(getHeight(column.getHeight()));
            columnWithComponents.withComponents(newComponentColumn);
        }

        this.columns.add(columnWithComponents);
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:25,代码来源:Row.java

示例3: hasNavigationComponents

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
public boolean hasNavigationComponents(LayoutRow row) {
    for (LayoutColumn column : row.getLayoutColumns()) {

        for (LayoutComponent component : column.getLayoutComponents()) {
            NavDragComponentType dragType = NavDragComponentType.getByClassName(component.getDragTypeName());
            if (dragType != null && ALL_NAV_GROUP_COMPONENTS.contains(dragType)) {
                return true;
            }
        }

        for (LayoutRow childRow : column.getRows()) {
            boolean hasNavComps = hasNavigationComponents(childRow);
            if (hasNavComps) {
                return true;
            }
        }
    }
    return false;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:20,代码来源:LayoutTemplateAnalyzer.java

示例4: addFieldsToTemplate

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
protected void addFieldsToTemplate(LayoutTemplate template,
                                   List<FieldDefinition> fields,
                                   String formId) {
    fields.forEach(field -> {
        LayoutComponent layoutComponent = new LayoutComponent(getDraggableType());
        layoutComponent.addProperty(FormLayoutComponent.FORM_ID,
                                    formId);
        layoutComponent.addProperty(FormLayoutComponent.FIELD_ID,
                                    field.getId());

        LayoutColumn column = new LayoutColumn("12");
        column.add(layoutComponent);

        LayoutRow row = new LayoutRow();
        row.add(column);

        template.addRow(row);
    });
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:20,代码来源:AbstractFormLayoutTemplateGenerator.java

示例5: build

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
@Override
public LayoutInstance build(LayoutTemplate layoutTemplate) {
    HTMLElement container = createContainer(layoutTemplate);
    container.getClassList().add("uf-perspective-container");
    container.getClassList().add("uf-perspective-rendered-container");

    LayoutInstance layoutInstance = new LayoutInstance(container);
    List<LayoutRow> rows = layoutTemplate.getRows();
    generateRows(layoutTemplate, layoutInstance, rows, container);
    return layoutInstance;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:12,代码来源:AbstractLayoutGenerator.java

示例6: generateRows

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
private void generateRows(LayoutTemplate layoutTemplate,
                          LayoutInstance layoutInstance,
                          List<LayoutRow> rows,
                          HTMLElement parentWidget) {
    for (LayoutRow layoutRow : rows) {
        HTMLElement row = createRow(layoutRow);

        if (layoutTemplate.isPageStyle()) {
            row.getClassList().add(RowSizeBuilder.buildRowSize(layoutRow.getHeight()));
            row.getClassList().add("uf-le-overflow");
        }
        for (LayoutColumn layoutColumn : layoutRow.getLayoutColumns()) {
            HTMLElement column = createColumn(layoutColumn);

            if (layoutTemplate.isPageStyle() && layoutColumn.getHeight().isEmpty()) {
                column.getClassList().add("uf-perspective-col");
            }
            if (columnHasNestedRows(layoutColumn)) {
                if (layoutTemplate.isPageStyle() && layoutColumn.getHeight().isEmpty()) {
                    column.getClassList().add("uf-perspective-col");
                } else if (!layoutColumn.getHeight().isEmpty()) {
                    column.getClassList().add("uf-perspective-row-" + layoutColumn.getHeight());
                }
                generateRows(layoutTemplate,
                             layoutInstance,
                             layoutColumn.getRows(),
                             column);
            } else {
                generateComponents(layoutTemplate,
                                   layoutInstance,
                                   layoutColumn,
                                   column);
            }
            column.getClassList().add("uf-perspective-rendered-col");
            row.appendChild(column);
        }
        row.getClassList().add("uf-perspective-rendered-row");
        parentWidget.appendChild(row);
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:41,代码来源:AbstractLayoutGenerator.java

示例7: extractRows

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
private static void extractRows(List<Row> rows,
                                LayoutTemplate layoutTemplate) {
    for (Row row : rows) {
        LayoutRow layoutRow = new LayoutRow(row.getHeight().toString());
        extractColumns(row.getColumns(),
                       layoutRow);
        layoutTemplate.addRow(layoutRow);
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:10,代码来源:LayoutTemplateAdapter.java

示例8: extractColumns

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
private static void extractColumns(List<Column> columns,
                                   LayoutRow layoutRow) {
    for (Column col : columns) {
        LayoutColumn layoutColumn = new LayoutColumn(col.getColumnWidth().toString(),
                                                     col.getColumnHeight().toString());
        if (col.hasInnerRows()) {
            extractColumnWithComponents(col,
                                        layoutColumn);
        } else {
            extractComponents(col,
                              layoutColumn);
        }
        layoutRow.add(layoutColumn);
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:16,代码来源:LayoutTemplateAdapter.java

示例9: extractColumnWithComponents

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
private static void extractColumnWithComponents(Column col,
                                                LayoutColumn layoutColumn) {
    if (col instanceof ColumnWithComponents) {
        ColumnWithComponents columnWithComponents = (ColumnWithComponents) col;
        LayoutRow layoutRow = new LayoutRow(Row.ROW_DEFAULT_HEIGHT.toString());
        extractColumns(columnWithComponents.getRow().getColumns(),
                       layoutRow);
        layoutColumn.addRow(layoutRow);
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:11,代码来源:LayoutTemplateAdapter.java

示例10: load

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
public void load(ParameterizedCommand<RowDrop> dropOnRowCommand,
                 LayoutRow layoutRow,
                 ParameterizedCommand<Row> removeCommand,
                 ParameterizedCommand<ColumnDrop> removeComponentCommand,
                 Supplier<LayoutTemplate> currentLayoutTemplateSupplier) {
    this.dropOnRowCommand = dropOnRowCommand;
    this.removeRowCommand = removeCommand;
    this.removeComponentCommand = removeComponentCommand;
    this.currentLayoutTemplateSupplier = currentLayoutTemplateSupplier;
    this.height = getHeight(layoutRow.getHeight());
    setupPageLayout(height);
    extractColumns(layoutRow);
    setupColumnResizeActions();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:15,代码来源:Row.java

示例11: extractColumns

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
private void extractColumns(LayoutRow layoutRow) {
    for (LayoutColumn layoutColumn : layoutRow.getLayoutColumns()) {
        if (isColumnWithComponents(layoutColumn)) {
            extractColumnWithComponents(layoutColumn);
        } else {
            extractComponentColumn(layoutColumn);
        }
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:10,代码来源:Row.java

示例12: list

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
public static List<String> list(LayoutTemplate layout) {
    List<String> ids = new ArrayList<>();
    List<LayoutRow> rows = layout.getRows();
    searchForComponents(rows,
                        ids);
    return ids;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:8,代码来源:TargetDivList.java

示例13: searchForComponents

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
private static void searchForComponents(List<LayoutRow> rows,
                                        List<String> ids) {
    for (LayoutRow layoutRow : rows) {
        for (LayoutColumn layoutColumn : layoutRow.getLayoutColumns()) {
            if (columnHasNestedRows(layoutColumn)) {
                searchForComponents(layoutColumn.getRows(),
                                    ids);
            } else {
                extractTargetDiv(layoutColumn.getLayoutComponents(),
                                 ids);
            }
        }
    }
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:15,代码来源:TargetDivList.java

示例14: analyzeRecursion

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
public boolean analyzeRecursion(LayoutTemplate layoutTemplate, LayoutRecursionIssue issue, LayoutTemplateContext layoutCtx) {
    for (LayoutRow row : layoutTemplate.getRows()) {
        boolean hasIssue = analyzeRecursion(row, issue, layoutCtx);
        if (hasIssue) {
            return true;
        }
    }
    return false;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:10,代码来源:LayoutTemplateAnalyzer.java

示例15: build

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入依赖的package包/类
public LayoutTemplate build() {
    LayoutTemplate template = new LayoutTemplate();

    rows.stream()
            .filter(row -> !row.cells.isEmpty())
            .forEach(row -> {
                LayoutRow layoutRow = new LayoutRow();

                template.addRow(layoutRow);

                row.cells.forEach(cell -> {
                    LayoutColumn layoutColumn = new LayoutColumn(String.valueOf(cell.horizontalSpan));
                    layoutRow.add(layoutColumn);

                    if (cell.getComponentsCount() == 0) {
                        return;
                    } else if (cell.getComponentsCount() == 1) {
                        layoutColumn.add(cell.components.get(0));
                    } else {
                        cell.components.forEach(component -> {
                            LayoutRow nestedRow = new LayoutRow();
                            layoutColumn.addRow(nestedRow);
                            LayoutColumn nestedColumn = new LayoutColumn(String.valueOf(MAX_SPAN));
                            nestedRow.add(nestedColumn);
                            nestedColumn.add(component);
                        });
                    }
                });
            });

    return template;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:33,代码来源:LayoutGenerator.java


注:本文中的org.uberfire.ext.layout.editor.api.editor.LayoutRow类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。