Add withSectionOfFields

This commit is contained in:
2022-10-24 08:40:04 -05:00
parent f5f6446069
commit 22b2e01cca

View File

@ -802,4 +802,24 @@ public class QTableMetaData implements QAppChildMetaData, Serializable
return (this);
}
/*******************************************************************************
** Fluently add a section and fields in that section.
*******************************************************************************/
public QTableMetaData withSectionOfFields(QFieldSection fieldSection, QFieldMetaData... fields)
{
withSection(fieldSection);
List<String> fieldNames = new ArrayList<>();
for(QFieldMetaData field : fields)
{
withField(field);
fieldNames.add(field.getName());
}
fieldSection.setFieldNames(fieldNames);
return (this);
}
}