com.alphasystem.docx4j.builder.wml.TblGridBaseBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of open-xml-builder Show documentation
Show all versions of open-xml-builder Show documentation
Alpha system commons library
package com.alphasystem.docx4j.builder.wml;
import java.util.List;
import com.alphasystem.docx4j.builder.OpenXmlBuilder;
import org.docx4j.wml.TblGridBase;
import org.docx4j.wml.TblGridCol;
/**
* Fluent API builder for org.docx4j.wml.TblGridBase
.
*
*/
public class TblGridBaseBuilder
extends OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public TblGridBaseBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public TblGridBaseBuilder(TblGridBase object) {
super(object);
}
/**
* Copies values fom src
into target
. Values of target
will be overridden by the values from src
.
*
* @param src
* source object
* @param target
* target object
*/
public TblGridBaseBuilder(TblGridBase src, TblGridBase target) {
this(target);
if (src!= null) {
List gridCol = src.getGridCol();
for (TblGridCol o: gridCol) {
addGridCol(new com.alphasystem.docx4j.builder.wml.TblGridColBuilder(o, null).getObject());
}
}
}
protected TblGridBase createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createTblGridBase();
}
public TblGridBaseBuilder addGridCol(TblGridCol... value) {
addContent(object.getGridCol(), value);
return this;
}
public TblGridBaseBuilder addGridCol(Long... w) {
if (hasContent(w)) {
for (Long o: w) {
addGridCol(new com.alphasystem.docx4j.builder.wml.TblGridColBuilder().withW(o).getObject());
}
}
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy