com.alphasystem.docx4j.builder.wml.CTColumnsBuilder 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.math.BigInteger;
import java.util.List;
import com.alphasystem.docx4j.builder.OpenXmlBuilder;
import org.docx4j.wml.CTColumn;
import org.docx4j.wml.CTColumns;
/**
* Fluent API builder for org.docx4j.wml.CTColumns
.
*
*/
public class CTColumnsBuilder
extends OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public CTColumnsBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public CTColumnsBuilder(CTColumns 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 CTColumnsBuilder(CTColumns src, CTColumns target) {
this(target);
if (src!= null) {
List col = src.getCol();
for (CTColumn o: col) {
addCol(new CTColumnBuilder(o, null).getObject());
}
withEqualWidth(WmlBuilderFactory.cloneBoolean(src, "equalWidth")).withSpace(WmlBuilderFactory.cloneBigInteger(src.getSpace())).withNum(WmlBuilderFactory.cloneBigInteger(src.getNum())).withSep(WmlBuilderFactory.cloneBoolean(src, "sep"));
}
}
protected CTColumns createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createCTColumns();
}
public CTColumnsBuilder addCol(CTColumn... value) {
addContent(object.getCol(), value);
return this;
}
public CTColumnsBuilder withEqualWidth(Boolean value) {
if (value!= null) {
object.setEqualWidth(value);
}
return this;
}
public CTColumnsBuilder withSpace(BigInteger value) {
if (value!= null) {
object.setSpace(value);
}
return this;
}
/**
* Calls setSpace
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTColumnsBuilder withSpace(String value) {
if (value!= null) {
object.setSpace(new BigInteger(value));
}
return this;
}
/**
* Calls setSpace
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTColumnsBuilder withSpace(Long value) {
if (value!= null) {
object.setSpace(BigInteger.valueOf(value));
}
return this;
}
public CTColumnsBuilder withNum(BigInteger value) {
if (value!= null) {
object.setNum(value);
}
return this;
}
/**
* Calls setNum
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTColumnsBuilder withNum(String value) {
if (value!= null) {
object.setNum(new BigInteger(value));
}
return this;
}
/**
* Calls setNum
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTColumnsBuilder withNum(Long value) {
if (value!= null) {
object.setNum(BigInteger.valueOf(value));
}
return this;
}
public CTColumnsBuilder withSep(Boolean value) {
if (value!= null) {
object.setSep(value);
}
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy