com.alphasystem.docx4j.builder.wml.CTDocGridBuilder 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 com.alphasystem.docx4j.builder.OpenXmlBuilder;
import org.docx4j.wml.CTDocGrid;
import org.docx4j.wml.STDocGrid;
/**
* Fluent API builder for org.docx4j.wml.CTDocGrid
.
*
*/
public class CTDocGridBuilder
extends OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public CTDocGridBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public CTDocGridBuilder(CTDocGrid 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 CTDocGridBuilder(CTDocGrid src, CTDocGrid target) {
this(target);
if (src!= null) {
withType(src.getType()).withLinePitch(WmlBuilderFactory.cloneBigInteger(src.getLinePitch())).withCharSpace(WmlBuilderFactory.cloneBigInteger(src.getCharSpace()));
}
}
protected CTDocGrid createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createCTDocGrid();
}
public CTDocGridBuilder withType(STDocGrid value) {
if (value!= null) {
object.setType(value);
}
return this;
}
public CTDocGridBuilder withLinePitch(BigInteger value) {
if (value!= null) {
object.setLinePitch(value);
}
return this;
}
/**
* Calls setLinePitch
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTDocGridBuilder withLinePitch(String value) {
if (value!= null) {
object.setLinePitch(new BigInteger(value));
}
return this;
}
/**
* Calls setLinePitch
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTDocGridBuilder withLinePitch(Long value) {
if (value!= null) {
object.setLinePitch(BigInteger.valueOf(value));
}
return this;
}
public CTDocGridBuilder withCharSpace(BigInteger value) {
if (value!= null) {
object.setCharSpace(value);
}
return this;
}
/**
* Calls setCharSpace
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTDocGridBuilder withCharSpace(String value) {
if (value!= null) {
object.setCharSpace(new BigInteger(value));
}
return this;
}
/**
* Calls setCharSpace
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTDocGridBuilder withCharSpace(Long value) {
if (value!= null) {
object.setCharSpace(BigInteger.valueOf(value));
}
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy