本文整理汇总了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);
}
}
示例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;
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
}
}
}
示例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));
}
}
}
}