com.alphasystem.docx4j.builder.wml.TcPrBuilder Maven / Gradle / Ivy
package com.alphasystem.docx4j.builder.wml;
import java.math.BigInteger;
import org.docx4j.wml.BooleanDefaultTrue;
import org.docx4j.wml.CTBorder;
import org.docx4j.wml.CTCellMergeTrackChange;
import org.docx4j.wml.CTCnf;
import org.docx4j.wml.CTShd;
import org.docx4j.wml.CTTcPrChange;
import org.docx4j.wml.CTTrackChange;
import org.docx4j.wml.CTVerticalJc;
import org.docx4j.wml.STVerticalJc;
import org.docx4j.wml.TblWidth;
import org.docx4j.wml.TcMar;
import org.docx4j.wml.TcPr;
import org.docx4j.wml.TextDirection;
/**
* Fluent API builder for org.docx4j.wml.TcPr
.
*
*/
public class TcPrBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
private TcPrBuilder.GridSpanBuilder gridSpanBuilder;
private TcPrBuilder.HMergeBuilder hMergeBuilder;
private TcPrBuilder.VMergeBuilder vMergeBuilder;
private TcPrBuilder.TcBordersBuilder tcBordersBuilder;
/**
* Initialize the underlying object.
*
*/
public TcPrBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public TcPrBuilder(TcPr object) {
super(object);
gridSpanBuilder = new TcPrBuilder.GridSpanBuilder(this.object.getGridSpan());
hMergeBuilder = new TcPrBuilder.HMergeBuilder(this.object.getHMerge());
vMergeBuilder = new TcPrBuilder.VMergeBuilder(this.object.getVMerge());
tcBordersBuilder = new TcPrBuilder.TcBordersBuilder(this.object.getTcBorders());
}
/**
* 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 TcPrBuilder(TcPr src, TcPr target) {
this(target);
if (src!= null) {
CTTcPrChange tcPrChange = src.getTcPrChange();
if (tcPrChange!= null) {
tcPrChange = new CTTcPrChangeBuilder(tcPrChange, object.getTcPrChange()).getObject();
}
CTCnf cnfStyle = src.getCnfStyle();
if (cnfStyle!= null) {
cnfStyle = new com.alphasystem.docx4j.builder.wml.CTCnfBuilder(cnfStyle, object.getCnfStyle()).getObject();
}
TblWidth tcW = src.getTcW();
if (tcW!= null) {
tcW = new TblWidthBuilder(tcW, object.getTcW()).getObject();
}
org.docx4j.wml.TcPrInner.GridSpan gridSpan = src.getGridSpan();
if (gridSpan!= null) {
gridSpan = new TcPrBuilder.GridSpanBuilder(gridSpan, object.getGridSpan()).getObject();
}
org.docx4j.wml.TcPrInner.HMerge hMerge = src.getHMerge();
if (hMerge!= null) {
hMerge = new TcPrBuilder.HMergeBuilder(hMerge, object.getHMerge()).getObject();
}
org.docx4j.wml.TcPrInner.VMerge vMerge = src.getVMerge();
if (vMerge!= null) {
vMerge = new TcPrBuilder.VMergeBuilder(vMerge, object.getVMerge()).getObject();
}
org.docx4j.wml.TcPrInner.TcBorders tcBorders = src.getTcBorders();
if (tcBorders!= null) {
tcBorders = new TcPrBuilder.TcBordersBuilder(tcBorders, object.getTcBorders()).getObject();
}
CTShd shd = src.getShd();
if (shd!= null) {
shd = new CTShdBuilder(shd, object.getShd()).getObject();
}
TcMar tcMar = src.getTcMar();
if (tcMar!= null) {
tcMar = new TcMarBuilder(tcMar, object.getTcMar()).getObject();
}
TextDirection textDirection = src.getTextDirection();
if (textDirection!= null) {
textDirection = new com.alphasystem.docx4j.builder.wml.TextDirectionBuilder(textDirection, object.getTextDirection()).getObject();
}
CTVerticalJc vAlign = src.getVAlign();
if (vAlign!= null) {
vAlign = new com.alphasystem.docx4j.builder.wml.CTVerticalJcBuilder(vAlign, object.getVAlign()).getObject();
}
CTTrackChange cellIns = src.getCellIns();
if (cellIns!= null) {
cellIns = new com.alphasystem.docx4j.builder.wml.CTTrackChangeBuilder(cellIns, object.getCellIns()).getObject();
}
CTTrackChange cellDel = src.getCellDel();
if (cellDel!= null) {
cellDel = new com.alphasystem.docx4j.builder.wml.CTTrackChangeBuilder(cellDel, object.getCellDel()).getObject();
}
CTCellMergeTrackChange cellMerge = src.getCellMerge();
if (cellMerge!= null) {
cellMerge = new CTCellMergeTrackChangeBuilder(cellMerge, object.getCellMerge()).getObject();
}
withTcPrChange(tcPrChange).withCnfStyle(cnfStyle).withTcW(tcW).withGridSpan(gridSpan).withHMerge(hMerge).withVMerge(vMerge).withTcBorders(tcBorders).withShd(shd).withNoWrap(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getNoWrap())).withTcMar(tcMar).withTextDirection(textDirection).withTcFitText(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getTcFitText())).withVAlign(vAlign).withHideMark(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getHideMark())).withCellIns(cellIns).withCellDel(cellDel).withCellMerge(cellMerge);
}
}
protected TcPr createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createTcPr();
}
public TcPrBuilder withTcPrChange(CTTcPrChange value) {
if (value!= null) {
object.setTcPrChange(value);
}
return this;
}
public TcPrBuilder withCnfStyle(CTCnf value) {
if (value!= null) {
object.setCnfStyle(value);
}
return this;
}
public TcPrBuilder withCnfStyle(String val) {
if (val!= null) {
object.setCnfStyle(new com.alphasystem.docx4j.builder.wml.CTCnfBuilder().withVal(val).getObject());
}
return this;
}
public TcPrBuilder withTcW(TblWidth value) {
if (value!= null) {
object.setTcW(value);
}
return this;
}
public TcPrBuilder withGridSpan(org.docx4j.wml.TcPrInner.GridSpan value) {
if (value!= null) {
object.setGridSpan(value);
}
return this;
}
public TcPrBuilder withGridSpan(Long val) {
boolean initialized = (val!= null);
if (initialized) {
withGridSpan(gridSpanBuilder.withVal(val).getObject());
}
return this;
}
public TcPrBuilder.GridSpanBuilder getGridSpanBuilder() {
return gridSpanBuilder;
}
public TcPrBuilder withHMerge(org.docx4j.wml.TcPrInner.HMerge value) {
if (value!= null) {
object.setHMerge(value);
}
return this;
}
public TcPrBuilder withHMerge(String val) {
boolean initialized = (val!= null);
if (initialized) {
withHMerge(hMergeBuilder.withVal(val).getObject());
}
return this;
}
public TcPrBuilder.HMergeBuilder getHMergeBuilder() {
return hMergeBuilder;
}
public TcPrBuilder withVMerge(org.docx4j.wml.TcPrInner.VMerge value) {
if (value!= null) {
object.setVMerge(value);
}
return this;
}
public TcPrBuilder withVMerge(String val) {
boolean initialized = (val!= null);
if (initialized) {
withVMerge(vMergeBuilder.withVal(val).getObject());
}
return this;
}
public TcPrBuilder.VMergeBuilder getVMergeBuilder() {
return vMergeBuilder;
}
public TcPrBuilder withTcBorders(org.docx4j.wml.TcPrInner.TcBorders value) {
if (value!= null) {
object.setTcBorders(value);
}
return this;
}
public TcPrBuilder.TcBordersBuilder getTcBordersBuilder() {
return tcBordersBuilder;
}
public TcPrBuilder withShd(CTShd value) {
if (value!= null) {
object.setShd(value);
}
return this;
}
public TcPrBuilder withNoWrap(BooleanDefaultTrue value) {
if (value!= null) {
object.setNoWrap(value);
}
return this;
}
public TcPrBuilder withNoWrap(Boolean val) {
if (val!= null) {
object.setNoWrap(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
}
return this;
}
public TcPrBuilder withTcMar(TcMar value) {
if (value!= null) {
object.setTcMar(value);
}
return this;
}
public TcPrBuilder withTextDirection(TextDirection value) {
if (value!= null) {
object.setTextDirection(value);
}
return this;
}
public TcPrBuilder withTextDirection(String val) {
if (val!= null) {
object.setTextDirection(new com.alphasystem.docx4j.builder.wml.TextDirectionBuilder().withVal(val).getObject());
}
return this;
}
public TcPrBuilder withTcFitText(BooleanDefaultTrue value) {
if (value!= null) {
object.setTcFitText(value);
}
return this;
}
public TcPrBuilder withTcFitText(Boolean val) {
if (val!= null) {
object.setTcFitText(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
}
return this;
}
public TcPrBuilder withVAlign(CTVerticalJc value) {
if (value!= null) {
object.setVAlign(value);
}
return this;
}
public TcPrBuilder withVAlign(STVerticalJc val) {
if (val!= null) {
object.setVAlign(new com.alphasystem.docx4j.builder.wml.CTVerticalJcBuilder().withVal(val).getObject());
}
return this;
}
public TcPrBuilder withHideMark(BooleanDefaultTrue value) {
if (value!= null) {
object.setHideMark(value);
}
return this;
}
public TcPrBuilder withHideMark(Boolean val) {
if (val!= null) {
object.setHideMark(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
}
return this;
}
public TcPrBuilder withCellIns(CTTrackChange value) {
if (value!= null) {
object.setCellIns(value);
}
return this;
}
public TcPrBuilder withCellDel(CTTrackChange value) {
if (value!= null) {
object.setCellDel(value);
}
return this;
}
public TcPrBuilder withCellMerge(CTCellMergeTrackChange value) {
if (value!= null) {
object.setCellMerge(value);
}
return this;
}
/**
* Fluent API builder for org.docx4j.wml.TcPrInner$GridSpan
.
*
*/
public static class GridSpanBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public GridSpanBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public GridSpanBuilder(org.docx4j.wml.TcPrInner.GridSpan 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 GridSpanBuilder(org.docx4j.wml.TcPrInner.GridSpan src, org.docx4j.wml.TcPrInner.GridSpan target) {
this(target);
if (src!= null) {
withVal(WmlBuilderFactory.cloneBigInteger(src.getVal()));
}
}
protected org.docx4j.wml.TcPrInner.GridSpan createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createTcPrInnerGridSpan();
}
public TcPrBuilder.GridSpanBuilder withVal(BigInteger value) {
if (value!= null) {
object.setVal(value);
}
return this;
}
/**
* Calls setVal
method.
*
* @param value
* Value to set
* @return
* reference to this
*/
public TcPrBuilder.GridSpanBuilder 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 TcPrBuilder.GridSpanBuilder withVal(Long value) {
if (value!= null) {
object.setVal(BigInteger.valueOf(value));
}
return this;
}
}
/**
* Fluent API builder for org.docx4j.wml.TcPrInner$HMerge
.
*
*/
public static class HMergeBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public HMergeBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public HMergeBuilder(org.docx4j.wml.TcPrInner.HMerge 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 HMergeBuilder(org.docx4j.wml.TcPrInner.HMerge src, org.docx4j.wml.TcPrInner.HMerge target) {
this(target);
if (src!= null) {
withVal(src.getVal());
}
}
protected org.docx4j.wml.TcPrInner.HMerge createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createTcPrInnerHMerge();
}
public TcPrBuilder.HMergeBuilder withVal(String value) {
if (value!= null) {
object.setVal(value);
}
return this;
}
}
/**
* Fluent API builder for org.docx4j.wml.TcPrInner$TcBorders
.
*
*/
public static class TcBordersBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public TcBordersBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public TcBordersBuilder(org.docx4j.wml.TcPrInner.TcBorders 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 TcBordersBuilder(org.docx4j.wml.TcPrInner.TcBorders src, org.docx4j.wml.TcPrInner.TcBorders target) {
this(target);
if (src!= null) {
CTBorder top = src.getTop();
if (top!= null) {
top = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(top, object.getTop()).getObject();
}
CTBorder left = src.getLeft();
if (left!= null) {
left = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(left, object.getLeft()).getObject();
}
CTBorder bottom = src.getBottom();
if (bottom!= null) {
bottom = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(bottom, object.getBottom()).getObject();
}
CTBorder right = src.getRight();
if (right!= null) {
right = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(right, object.getRight()).getObject();
}
CTBorder insideH = src.getInsideH();
if (insideH!= null) {
insideH = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(insideH, object.getInsideH()).getObject();
}
CTBorder insideV = src.getInsideV();
if (insideV!= null) {
insideV = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(insideV, object.getInsideV()).getObject();
}
CTBorder tl2Br = src.getTl2Br();
if (tl2Br!= null) {
tl2Br = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(tl2Br, object.getTl2Br()).getObject();
}
CTBorder tr2Bl = src.getTr2Bl();
if (tr2Bl!= null) {
tr2Bl = new com.alphasystem.docx4j.builder.wml.CTBorderBuilder(tr2Bl, object.getTr2Bl()).getObject();
}
withTop(top).withLeft(left).withBottom(bottom).withRight(right).withInsideH(insideH).withInsideV(insideV).withTl2Br(tl2Br).withTr2Bl(tr2Bl);
}
}
protected org.docx4j.wml.TcPrInner.TcBorders createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createTcPrInnerTcBorders();
}
public TcPrBuilder.TcBordersBuilder withTop(CTBorder value) {
if (value!= null) {
object.setTop(value);
}
return this;
}
public TcPrBuilder.TcBordersBuilder withLeft(CTBorder value) {
if (value!= null) {
object.setLeft(value);
}
return this;
}
public TcPrBuilder.TcBordersBuilder withBottom(CTBorder value) {
if (value!= null) {
object.setBottom(value);
}
return this;
}
public TcPrBuilder.TcBordersBuilder withRight(CTBorder value) {
if (value!= null) {
object.setRight(value);
}
return this;
}
public TcPrBuilder.TcBordersBuilder withInsideH(CTBorder value) {
if (value!= null) {
object.setInsideH(value);
}
return this;
}
public TcPrBuilder.TcBordersBuilder withInsideV(CTBorder value) {
if (value!= null) {
object.setInsideV(value);
}
return this;
}
public TcPrBuilder.TcBordersBuilder withTl2Br(CTBorder value) {
if (value!= null) {
object.setTl2Br(value);
}
return this;
}
public TcPrBuilder.TcBordersBuilder withTr2Bl(CTBorder value) {
if (value!= null) {
object.setTr2Bl(value);
}
return this;
}
}
/**
* Fluent API builder for org.docx4j.wml.TcPrInner$VMerge
.
*
*/
public static class VMergeBuilder
extends com.alphasystem.docx4j.builder.OpenXmlBuilder
{
/**
* Initialize the underlying object.
*
*/
public VMergeBuilder() {
this(null);
}
/**
* Initialize the builder with given object.
*
* @param object
* the given object
*/
public VMergeBuilder(org.docx4j.wml.TcPrInner.VMerge 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 VMergeBuilder(org.docx4j.wml.TcPrInner.VMerge src, org.docx4j.wml.TcPrInner.VMerge target) {
this(target);
if (src!= null) {
withVal(src.getVal());
}
}
protected org.docx4j.wml.TcPrInner.VMerge createObject() {
return WmlBuilderFactory.OBJECT_FACTORY.createTcPrInnerVMerge();
}
public TcPrBuilder.VMergeBuilder withVal(String value) {
if (value!= null) {
object.setVal(value);
}
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy