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


Java LayoutRow.getLayoutColumns方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: testGeneratedLayout

import org.uberfire.ext.layout.editor.api.editor.LayoutRow; //导入方法依赖的package包/类
protected void testGeneratedLayout() {
    LayoutTemplate layout = form.getLayoutTemplate();

    assertNotNull(layout);

    assertNotNull(layout.getRows());

    assertEquals(form.getFields().size(),
                 layout.getRows().size());

    for (LayoutRow row : layout.getRows()) {
        assertEquals(1,
                     row.getLayoutColumns().size());

        for (LayoutColumn col : row.getLayoutColumns()) {
            assertEquals("12",
                         col.getSpan());

            assertEquals(0,
                         col.getRows().size());

            assertEquals(1,
                         col.getLayoutComponents().size());

            for (LayoutComponent component : col.getLayoutComponents()) {
                assertEquals(templateGenerator.getDraggableType(),
                             component.getDragTypeName());

                assertEquals(form.getId(),
                             component.getProperties().get(FormLayoutComponent.FORM_ID));

                String fieldId = component.getProperties().get(FormLayoutComponent.FIELD_ID);

                assertNotNull(fieldId);

                assertNotNull(form.getFieldById(fieldId));
            }
        }
    }
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:41,代码来源:FormLayoutTemplateGeneratorTest.java


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