com.alphasystem.docx4j.builder.wml.CTTblPrBaseBuilder 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 org.docx4j.wml.BooleanDefaultTrue;
import org.docx4j.wml.CTShd;
import org.docx4j.wml.CTString;
import org.docx4j.wml.CTTblCellMar;
import org.docx4j.wml.CTTblLayoutType;
import org.docx4j.wml.CTTblLook;
import org.docx4j.wml.CTTblOverlap;
import org.docx4j.wml.CTTblPPr;
import org.docx4j.wml.CTTblPrBase;
import org.docx4j.wml.Jc;
import org.docx4j.wml.JcEnumeration;
import org.docx4j.wml.STTblLayoutType;
import org.docx4j.wml.STTblOverlap;
import org.docx4j.wml.TblBorders;
import org.docx4j.wml.TblWidth;
/**
* Fluent API builder for org.docx4j.wml.CTTblPrBase
.
*
*/
public class CTTblPrBaseBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
private CTTblPrBaseBuilder.TblStyleBuilder tblStyleBuilder;
private CTTblPrBaseBuilder.TblStyleRowBandSizeBuilder tblStyleRowBandSizeBuilder;
private CTTblPrBaseBuilder.TblStyleColBandSizeBuilder tblStyleColBandSizeBuilder;
/**
* Initialize the underlying object.
*
*/
public CTTblPrBaseBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public CTTblPrBaseBuilder(CTTblPrBase object) {
super(object);
tblStyleBuilder = new CTTblPrBaseBuilder.TblStyleBuilder(this.object.getTblStyle());
tblStyleRowBandSizeBuilder = new CTTblPrBaseBuilder.TblStyleRowBandSizeBuilder(this.object.getTblStyleRowBandSize());
tblStyleColBandSizeBuilder = new CTTblPrBaseBuilder.TblStyleColBandSizeBuilder(this.object.getTblStyleColBandSize());
}
/**
* 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 CTTblPrBaseBuilder(CTTblPrBase src, CTTblPrBase target) {
this(target);
if (src!= null) {
CTTblPrBase.TblStyle tblStyle = src.getTblStyle();
if (tblStyle!= null) {
tblStyle = new CTTblPrBaseBuilder.TblStyleBuilder(tblStyle, object.getTblStyle()).getObject();
}
CTTblPPr tblpPr = src.getTblpPr();
if (tblpPr!= null) {
tblpPr = new CTTblPPrBuilder(tblpPr, object.getTblpPr()).getObject();
}
CTTblOverlap tblOverlap = src.getTblOverlap();
if (tblOverlap!= null) {
tblOverlap = new com.alphasystem.docx4j.builder.wml.CTTblOverlapBuilder(tblOverlap, object.getTblOverlap()).getObject();
}
CTTblPrBase.TblStyleRowBandSize tblStyleRowBandSize = src.getTblStyleRowBandSize();
if (tblStyleRowBandSize!= null) {
tblStyleRowBandSize = new CTTblPrBaseBuilder.TblStyleRowBandSizeBuilder(tblStyleRowBandSize, object.getTblStyleRowBandSize()).getObject();
}
CTTblPrBase.TblStyleColBandSize tblStyleColBandSize = src.getTblStyleColBandSize();
if (tblStyleColBandSize!= null) {
tblStyleColBandSize = new CTTblPrBaseBuilder.TblStyleColBandSizeBuilder(tblStyleColBandSize, object.getTblStyleColBandSize()).getObject();
}
TblWidth tblW = src.getTblW();
if (tblW!= null) {
tblW = new com.alphasystem.docx4j.builder.wml.TblWidthBuilder(tblW, object.getTblW()).getObject();
}
Jc jc = src.getJc();
if (jc!= null) {
jc = new com.alphasystem.docx4j.builder.wml.JcBuilder(jc, object.getJc()).getObject();
}
TblWidth tblCellSpacing = src.getTblCellSpacing();
if (tblCellSpacing!= null) {
tblCellSpacing = new com.alphasystem.docx4j.builder.wml.TblWidthBuilder(tblCellSpacing, object.getTblCellSpacing()).getObject();
}
TblWidth tblInd = src.getTblInd();
if (tblInd!= null) {
tblInd = new com.alphasystem.docx4j.builder.wml.TblWidthBuilder(tblInd, object.getTblInd()).getObject();
}
TblBorders tblBorders = src.getTblBorders();
if (tblBorders!= null) {
tblBorders = new TblBordersBuilder(tblBorders, object.getTblBorders()).getObject();
}
CTShd shd = src.getShd();
if (shd!= null) {
shd = new CTShdBuilder(shd, object.getShd()).getObject();
}
CTTblLayoutType tblLayout = src.getTblLayout();
if (tblLayout!= null) {
tblLayout = new com.alphasystem.docx4j.builder.wml.CTTblLayoutTypeBuilder(tblLayout, object.getTblLayout()).getObject();
}
CTTblCellMar tblCellMar = src.getTblCellMar();
if (tblCellMar!= null) {
tblCellMar = new CTTblCellMarBuilder(tblCellMar, object.getTblCellMar()).getObject();
}
CTTblLook tblLook = src.getTblLook();
if (tblLook!= null) {
tblLook = new CTTblLookBuilder(tblLook, object.getTblLook()).getObject();
}
CTString tblCaption = src.getTblCaption();
if (tblCaption!= null) {
tblCaption = new com.alphasystem.docx4j.builder.wml.CTStringBuilder(tblCaption, object.getTblCaption()).getObject();
}
withTblStyle(tblStyle).withTblpPr(tblpPr).withTblOverlap(tblOverlap).withBidiVisual(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getBidiVisual())).withTblStyleRowBandSize(tblStyleRowBandSize).withTblStyleColBandSize(tblStyleColBandSize).withTblW(tblW).withJc(jc).withTblCellSpacing(tblCellSpacing).withTblInd(tblInd).withTblBorders(tblBorders).withShd(shd).withTblLayout(tblLayout).withTblCellMar(tblCellMar).withTblLook(tblLook).withTblCaption(tblCaption);
}
}
protected CTTblPrBase createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createCTTblPrBase();
}
public CTTblPrBaseBuilder withTblStyle(CTTblPrBase.TblStyle value) {
if (value!= null) {
object.setTblStyle(value);
}
return this;
}
public CTTblPrBaseBuilder withTblStyle(String val) {
boolean initialized = (val!= null);
if (initialized) {
withTblStyle(tblStyleBuilder.withVal(val).getObject());
}
return this;
}
public CTTblPrBaseBuilder.TblStyleBuilder getTblStyleBuilder() {
return tblStyleBuilder;
}
public CTTblPrBaseBuilder withTblpPr(CTTblPPr value) {
if (value!= null) {
object.setTblpPr(value);
}
return this;
}
public CTTblPrBaseBuilder withTblOverlap(CTTblOverlap value) {
if (value!= null) {
object.setTblOverlap(value);
}
return this;
}
public CTTblPrBaseBuilder withTblOverlap(STTblOverlap val) {
if (val!= null) {
object.setTblOverlap(new com.alphasystem.docx4j.builder.wml.CTTblOverlapBuilder().withVal(val).getObject());
}
return this;
}
public CTTblPrBaseBuilder withBidiVisual(BooleanDefaultTrue value) {
if (value!= null) {
object.setBidiVisual(value);
}
return this;
}
public CTTblPrBaseBuilder withBidiVisual(Boolean val) {
if (val!= null) {
object.setBidiVisual(new BooleanDefaultTrueBuilder().withVal(val).getObject());
}
return this;
}
public CTTblPrBaseBuilder withTblStyleRowBandSize(CTTblPrBase.TblStyleRowBandSize value) {
if (value!= null) {
object.setTblStyleRowBandSize(value);
}
return this;
}
public CTTblPrBaseBuilder withTblStyleRowBandSize(Long val) {
boolean initialized = (val!= null);
if (initialized) {
withTblStyleRowBandSize(tblStyleRowBandSizeBuilder.withVal(val).getObject());
}
return this;
}
public CTTblPrBaseBuilder.TblStyleRowBandSizeBuilder getTblStyleRowBandSizeBuilder() {
return tblStyleRowBandSizeBuilder;
}
public CTTblPrBaseBuilder withTblStyleColBandSize(CTTblPrBase.TblStyleColBandSize value) {
if (value!= null) {
object.setTblStyleColBandSize(value);
}
return this;
}
public CTTblPrBaseBuilder withTblStyleColBandSize(Long val) {
boolean initialized = (val!= null);
if (initialized) {
withTblStyleColBandSize(tblStyleColBandSizeBuilder.withVal(val).getObject());
}
return this;
}
public CTTblPrBaseBuilder.TblStyleColBandSizeBuilder getTblStyleColBandSizeBuilder() {
return tblStyleColBandSizeBuilder;
}
public CTTblPrBaseBuilder withTblW(TblWidth value) {
if (value!= null) {
object.setTblW(value);
}
return this;
}
public CTTblPrBaseBuilder withJc(Jc value) {
if (value!= null) {
object.setJc(value);
}
return this;
}
public CTTblPrBaseBuilder withJc(JcEnumeration val) {
if (val!= null) {
object.setJc(new com.alphasystem.docx4j.builder.wml.JcBuilder().withVal(val).getObject());
}
return this;
}
public CTTblPrBaseBuilder withTblCellSpacing(TblWidth value) {
if (value!= null) {
object.setTblCellSpacing(value);
}
return this;
}
public CTTblPrBaseBuilder withTblInd(TblWidth value) {
if (value!= null) {
object.setTblInd(value);
}
return this;
}
public CTTblPrBaseBuilder withTblBorders(TblBorders value) {
if (value!= null) {
object.setTblBorders(value);
}
return this;
}
public CTTblPrBaseBuilder withShd(CTShd value) {
if (value!= null) {
object.setShd(value);
}
return this;
}
public CTTblPrBaseBuilder withTblLayout(CTTblLayoutType value) {
if (value!= null) {
object.setTblLayout(value);
}
return this;
}
public CTTblPrBaseBuilder withTblLayout(STTblLayoutType type) {
if (type!= null) {
object.setTblLayout(new com.alphasystem.docx4j.builder.wml.CTTblLayoutTypeBuilder().withType(type).getObject());
}
return this;
}
public CTTblPrBaseBuilder withTblCellMar(CTTblCellMar value) {
if (value!= null) {
object.setTblCellMar(value);
}
return this;
}
public CTTblPrBaseBuilder withTblLook(CTTblLook value) {
if (value!= null) {
object.setTblLook(value);
}
return this;
}
public CTTblPrBaseBuilder withTblCaption(CTString value) {
if (value!= null) {
object.setTblCaption(value);
}
return this;
}
public CTTblPrBaseBuilder withTblCaption(String val) {
if (val!= null) {
object.setTblCaption(new com.alphasystem.docx4j.builder.wml.CTStringBuilder().withVal(val).getObject());
}
return this;
}
/**
* Fluent API builder for org.docx4j.wml.CTTblPrBase$TblStyle
.
*
*/
public static class TblStyleBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public TblStyleBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public TblStyleBuilder(CTTblPrBase.TblStyle 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 TblStyleBuilder(CTTblPrBase.TblStyle src, CTTblPrBase.TblStyle target) {
this(target);
if (src!= null) {
withVal(src.getVal());
}
}
protected CTTblPrBase.TblStyle createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createCTTblPrBaseTblStyle();
}
public CTTblPrBaseBuilder.TblStyleBuilder withVal(String value) {
if (value!= null) {
object.setVal(value);
}
return this;
}
}
/**
* Fluent API builder for org.docx4j.wml.CTTblPrBase$TblStyleColBandSize
.
*
*/
public static class TblStyleColBandSizeBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public TblStyleColBandSizeBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public TblStyleColBandSizeBuilder(CTTblPrBase.TblStyleColBandSize 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 TblStyleColBandSizeBuilder(CTTblPrBase.TblStyleColBandSize src, CTTblPrBase.TblStyleColBandSize target) {
this(target);
if (src!= null) {
withVal(WmlBuilderFactory.cloneBigInteger(src.getVal()));
}
}
protected CTTblPrBase.TblStyleColBandSize createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createCTTblPrBaseTblStyleColBandSize();
}
public CTTblPrBaseBuilder.TblStyleColBandSizeBuilder withVal(BigInteger value) {
if (value!= null) {
object.setVal(value);
}
return this;
}
/**
* Calls setVal
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTTblPrBaseBuilder.TblStyleColBandSizeBuilder withVal(String value) {
if (value!= null) {
object.setVal(new BigInteger(value));
}
return this;
}
/**
* Calls setVal
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTTblPrBaseBuilder.TblStyleColBandSizeBuilder withVal(Long value) {
if (value!= null) {
object.setVal(BigInteger.valueOf(value));
}
return this;
}
}
/**
* Fluent API builder for org.docx4j.wml.CTTblPrBase$TblStyleRowBandSize
.
*
*/
public static class TblStyleRowBandSizeBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public TblStyleRowBandSizeBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public TblStyleRowBandSizeBuilder(CTTblPrBase.TblStyleRowBandSize 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 TblStyleRowBandSizeBuilder(CTTblPrBase.TblStyleRowBandSize src, CTTblPrBase.TblStyleRowBandSize target) {
this(target);
if (src!= null) {
withVal(WmlBuilderFactory.cloneBigInteger(src.getVal()));
}
}
protected CTTblPrBase.TblStyleRowBandSize createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createCTTblPrBaseTblStyleRowBandSize();
}
public CTTblPrBaseBuilder.TblStyleRowBandSizeBuilder withVal(BigInteger value) {
if (value!= null) {
object.setVal(value);
}
return this;
}
/**
* Calls setVal
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTTblPrBaseBuilder.TblStyleRowBandSizeBuilder withVal(String value) {
if (value!= null) {
object.setVal(new BigInteger(value));
}
return this;
}
/**
* Calls setVal
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public CTTblPrBaseBuilder.TblStyleRowBandSizeBuilder withVal(Long value) {
if (value!= null) {
object.setVal(BigInteger.valueOf(value));
}
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy