All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alphasystem.docx4j.builder.wml.RPrBuilder Maven / Gradle / Ivy


package com.alphasystem.docx4j.builder.wml;

import com.alphasystem.docx4j.builder.OpenXmlBuilder;
import org.docx4j.w14.CTFillTextEffect;
import org.docx4j.w14.CTGlow;
import org.docx4j.w14.CTLigatures;
import org.docx4j.w14.CTNumForm;
import org.docx4j.w14.CTNumSpacing;
import org.docx4j.w14.CTOnOff;
import org.docx4j.w14.CTProps3D;
import org.docx4j.w14.CTReflection;
import org.docx4j.w14.CTScene3D;
import org.docx4j.w14.CTShadow;
import org.docx4j.w14.CTStylisticSets;
import org.docx4j.w14.CTTextOutlineEffect;
import org.docx4j.wml.BooleanDefaultTrue;
import org.docx4j.wml.CTBorder;
import org.docx4j.wml.CTEastAsianLayout;
import org.docx4j.wml.CTEm;
import org.docx4j.wml.CTFitText;
import org.docx4j.wml.CTLanguage;
import org.docx4j.wml.CTRPrChange;
import org.docx4j.wml.CTShd;
import org.docx4j.wml.CTSignedHpsMeasure;
import org.docx4j.wml.CTSignedTwipsMeasure;
import org.docx4j.wml.CTTextEffect;
import org.docx4j.wml.CTTextScale;
import org.docx4j.wml.CTVerticalAlignRun;
import org.docx4j.wml.Color;
import org.docx4j.wml.Highlight;
import org.docx4j.wml.HpsMeasure;
import org.docx4j.wml.RFonts;
import org.docx4j.wml.RPr;
import org.docx4j.wml.RStyle;
import org.docx4j.wml.STEm;
import org.docx4j.wml.STTextEffect;
import org.docx4j.wml.STVerticalAlignRun;
import org.docx4j.wml.U;


/**
 * Fluent API builder for org.docx4j.wml.RPr.
 * 
 */
public class RPrBuilder
    extends OpenXmlBuilder
{


    /**
     * Initialize the underlying object.
     * 
     */
    public RPrBuilder() {
        this(null);
    }

    /**
     * Initialize the builder with given object.
     * 
     * @param object
     *     the given object
     */
    public RPrBuilder(RPr 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 RPrBuilder(RPr src, RPr target) {
        this(target);
        if (src!= null) {
            RStyle rStyle = src.getRStyle();
            if (rStyle!= null) {
                rStyle = new com.alphasystem.docx4j.builder.wml.RStyleBuilder(rStyle, object.getRStyle()).getObject();
            }
            RFonts rFonts = src.getRFonts();
            if (rFonts!= null) {
                rFonts = new RFontsBuilder(rFonts, object.getRFonts()).getObject();
            }
            Color color = src.getColor();
            if (color!= null) {
                color = new ColorBuilder(color, object.getColor()).getObject();
            }
            CTSignedTwipsMeasure spacing = src.getSpacing();
            if (spacing!= null) {
                spacing = new com.alphasystem.docx4j.builder.wml.CTSignedTwipsMeasureBuilder(spacing, object.getSpacing()).getObject();
            }
            CTTextScale w = src.getW();
            if (w!= null) {
                w = new com.alphasystem.docx4j.builder.wml.CTTextScaleBuilder(w, object.getW()).getObject();
            }
            HpsMeasure kern = src.getKern();
            if (kern!= null) {
                kern = new com.alphasystem.docx4j.builder.wml.HpsMeasureBuilder(kern, object.getKern()).getObject();
            }
            CTSignedHpsMeasure position = src.getPosition();
            if (position!= null) {
                position = new com.alphasystem.docx4j.builder.wml.CTSignedHpsMeasureBuilder(position, object.getPosition()).getObject();
            }
            HpsMeasure sz = src.getSz();
            if (sz!= null) {
                sz = new com.alphasystem.docx4j.builder.wml.HpsMeasureBuilder(sz, object.getSz()).getObject();
            }
            HpsMeasure szCs = src.getSzCs();
            if (szCs!= null) {
                szCs = new com.alphasystem.docx4j.builder.wml.HpsMeasureBuilder(szCs, object.getSzCs()).getObject();
            }
            Highlight highlight = src.getHighlight();
            if (highlight!= null) {
                highlight = new com.alphasystem.docx4j.builder.wml.HighlightBuilder(highlight, object.getHighlight()).getObject();
            }
            U u = src.getU();
            if (u!= null) {
                u = new UBuilder(u, object.getU()).getObject();
            }
            CTTextEffect effect = src.getEffect();
            if (effect!= null) {
                effect = new com.alphasystem.docx4j.builder.wml.CTTextEffectBuilder(effect, object.getEffect()).getObject();
            }
            CTBorder bdr = src.getBdr();
            if (bdr!= null) {
                bdr = new CTBorderBuilder(bdr, object.getBdr()).getObject();
            }
            CTShd shd = src.getShd();
            if (shd!= null) {
                shd = new CTShdBuilder(shd, object.getShd()).getObject();
            }
            CTFitText fitText = src.getFitText();
            if (fitText!= null) {
                fitText = new CTFitTextBuilder(fitText, object.getFitText()).getObject();
            }
            CTVerticalAlignRun vertAlign = src.getVertAlign();
            if (vertAlign!= null) {
                vertAlign = new com.alphasystem.docx4j.builder.wml.CTVerticalAlignRunBuilder(vertAlign, object.getVertAlign()).getObject();
            }
            CTEm em = src.getEm();
            if (em!= null) {
                em = new com.alphasystem.docx4j.builder.wml.CTEmBuilder(em, object.getEm()).getObject();
            }
            CTLanguage lang = src.getLang();
            if (lang!= null) {
                lang = new CTLanguageBuilder(lang, object.getLang()).getObject();
            }
            CTEastAsianLayout eastAsianLayout = src.getEastAsianLayout();
            if (eastAsianLayout!= null) {
                eastAsianLayout = new CTEastAsianLayoutBuilder(eastAsianLayout, object.getEastAsianLayout()).getObject();
            }
            CTRPrChange rPrChange = src.getRPrChange();
            if (rPrChange!= null) {
                rPrChange = new CTRPrChangeBuilder(rPrChange, object.getRPrChange()).getObject();
            }
            withRStyle(rStyle).withRFonts(rFonts).withB(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getB())).withBCs(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getBCs())).withI(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getI())).withICs(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getICs())).withCaps(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getCaps())).withSmallCaps(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getSmallCaps())).withStrike(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getStrike())).withDstrike(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getDstrike())).withOutline(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getOutline())).withShadow(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getShadow())).withEmboss(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getEmboss())).withImprint(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getImprint())).withNoProof(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getNoProof())).withSnapToGrid(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getSnapToGrid())).withVanish(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getVanish())).withWebHidden(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getWebHidden())).withColor(color).withSpacing(spacing).withW(w).withKern(kern).withPosition(position).withSz(sz).withSzCs(szCs).withHighlight(highlight).withU(u).withEffect(effect).withBdr(bdr).withShd(shd).withFitText(fitText).withVertAlign(vertAlign).withRtl(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getRtl())).withCs(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getCs())).withEm(em).withLang(lang).withEastAsianLayout(eastAsianLayout).withSpecVanish(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getSpecVanish())).withOMath(WmlBuilderFactory.cloneBooleanDefaultTrue(src.getOMath())).withGlow(src.getGlow()).withShadow14(src.getShadow14()).withReflection(src.getReflection()).withTextOutline(src.getTextOutline()).withTextFill(src.getTextFill()).withScene3D(src.getScene3D()).withProps3D(src.getProps3D()).withLigatures(src.getLigatures()).withNumForm(src.getNumForm()).withNumSpacing(src.getNumSpacing()).withStylisticSets(src.getStylisticSets()).withCntxtAlts(src.getCntxtAlts()).withRPrChange(rPrChange);
        }
    }

    protected RPr createObject() {
        return WmlBuilderFactory.OBJECT_FACTORY.createRPr();
    }

    public RPrBuilder withRStyle(RStyle value) {
        if (value!= null) {
            object.setRStyle(value);
        }
        return this;
    }

    public RPrBuilder withRStyle(String val) {
        if (val!= null) {
            object.setRStyle(new com.alphasystem.docx4j.builder.wml.RStyleBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withRFonts(RFonts value) {
        if (value!= null) {
            object.setRFonts(value);
        }
        return this;
    }

    public RPrBuilder withB(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setB(value);
        }
        return this;
    }

    public RPrBuilder withB(Boolean val) {
        if (val!= null) {
            object.setB(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withBCs(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setBCs(value);
        }
        return this;
    }

    public RPrBuilder withBCs(Boolean val) {
        if (val!= null) {
            object.setBCs(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withI(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setI(value);
        }
        return this;
    }

    public RPrBuilder withI(Boolean val) {
        if (val!= null) {
            object.setI(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withICs(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setICs(value);
        }
        return this;
    }

    public RPrBuilder withICs(Boolean val) {
        if (val!= null) {
            object.setICs(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withCaps(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setCaps(value);
        }
        return this;
    }

    public RPrBuilder withCaps(Boolean val) {
        if (val!= null) {
            object.setCaps(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withSmallCaps(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setSmallCaps(value);
        }
        return this;
    }

    public RPrBuilder withSmallCaps(Boolean val) {
        if (val!= null) {
            object.setSmallCaps(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withStrike(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setStrike(value);
        }
        return this;
    }

    public RPrBuilder withStrike(Boolean val) {
        if (val!= null) {
            object.setStrike(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withDstrike(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setDstrike(value);
        }
        return this;
    }

    public RPrBuilder withDstrike(Boolean val) {
        if (val!= null) {
            object.setDstrike(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withOutline(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setOutline(value);
        }
        return this;
    }

    public RPrBuilder withOutline(Boolean val) {
        if (val!= null) {
            object.setOutline(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withShadow(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setShadow(value);
        }
        return this;
    }

    public RPrBuilder withShadow(Boolean val) {
        if (val!= null) {
            object.setShadow(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withEmboss(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setEmboss(value);
        }
        return this;
    }

    public RPrBuilder withEmboss(Boolean val) {
        if (val!= null) {
            object.setEmboss(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withImprint(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setImprint(value);
        }
        return this;
    }

    public RPrBuilder withImprint(Boolean val) {
        if (val!= null) {
            object.setImprint(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withNoProof(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setNoProof(value);
        }
        return this;
    }

    public RPrBuilder withNoProof(Boolean val) {
        if (val!= null) {
            object.setNoProof(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withSnapToGrid(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setSnapToGrid(value);
        }
        return this;
    }

    public RPrBuilder withSnapToGrid(Boolean val) {
        if (val!= null) {
            object.setSnapToGrid(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withVanish(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setVanish(value);
        }
        return this;
    }

    public RPrBuilder withVanish(Boolean val) {
        if (val!= null) {
            object.setVanish(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withWebHidden(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setWebHidden(value);
        }
        return this;
    }

    public RPrBuilder withWebHidden(Boolean val) {
        if (val!= null) {
            object.setWebHidden(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withColor(Color value) {
        if (value!= null) {
            object.setColor(value);
        }
        return this;
    }

    public RPrBuilder withSpacing(CTSignedTwipsMeasure value) {
        if (value!= null) {
            object.setSpacing(value);
        }
        return this;
    }

    public RPrBuilder withSpacing(Long val) {
        if (val!= null) {
            object.setSpacing(new com.alphasystem.docx4j.builder.wml.CTSignedTwipsMeasureBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withW(CTTextScale value) {
        if (value!= null) {
            object.setW(value);
        }
        return this;
    }

    public RPrBuilder withW(Integer val) {
        if (val!= null) {
            object.setW(new com.alphasystem.docx4j.builder.wml.CTTextScaleBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withKern(HpsMeasure value) {
        if (value!= null) {
            object.setKern(value);
        }
        return this;
    }

    public RPrBuilder withKern(Long val) {
        if (val!= null) {
            object.setKern(new com.alphasystem.docx4j.builder.wml.HpsMeasureBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withPosition(CTSignedHpsMeasure value) {
        if (value!= null) {
            object.setPosition(value);
        }
        return this;
    }

    public RPrBuilder withPosition(Long val) {
        if (val!= null) {
            object.setPosition(new com.alphasystem.docx4j.builder.wml.CTSignedHpsMeasureBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withSz(HpsMeasure value) {
        if (value!= null) {
            object.setSz(value);
        }
        return this;
    }

    public RPrBuilder withSz(Long val) {
        if (val!= null) {
            object.setSz(new com.alphasystem.docx4j.builder.wml.HpsMeasureBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withSzCs(HpsMeasure value) {
        if (value!= null) {
            object.setSzCs(value);
        }
        return this;
    }

    public RPrBuilder withSzCs(Long val) {
        if (val!= null) {
            object.setSzCs(new com.alphasystem.docx4j.builder.wml.HpsMeasureBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withHighlight(Highlight value) {
        if (value!= null) {
            object.setHighlight(value);
        }
        return this;
    }

    public RPrBuilder withHighlight(String val) {
        if (val!= null) {
            object.setHighlight(new com.alphasystem.docx4j.builder.wml.HighlightBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withU(U value) {
        if (value!= null) {
            object.setU(value);
        }
        return this;
    }

    public RPrBuilder withEffect(CTTextEffect value) {
        if (value!= null) {
            object.setEffect(value);
        }
        return this;
    }

    public RPrBuilder withEffect(STTextEffect val) {
        if (val!= null) {
            object.setEffect(new com.alphasystem.docx4j.builder.wml.CTTextEffectBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withBdr(CTBorder value) {
        if (value!= null) {
            object.setBdr(value);
        }
        return this;
    }

    public RPrBuilder withShd(CTShd value) {
        if (value!= null) {
            object.setShd(value);
        }
        return this;
    }

    public RPrBuilder withFitText(CTFitText value) {
        if (value!= null) {
            object.setFitText(value);
        }
        return this;
    }

    public RPrBuilder withVertAlign(CTVerticalAlignRun value) {
        if (value!= null) {
            object.setVertAlign(value);
        }
        return this;
    }

    public RPrBuilder withVertAlign(STVerticalAlignRun val) {
        if (val!= null) {
            object.setVertAlign(new com.alphasystem.docx4j.builder.wml.CTVerticalAlignRunBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withRtl(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setRtl(value);
        }
        return this;
    }

    public RPrBuilder withRtl(Boolean val) {
        if (val!= null) {
            object.setRtl(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withCs(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setCs(value);
        }
        return this;
    }

    public RPrBuilder withCs(Boolean val) {
        if (val!= null) {
            object.setCs(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withEm(CTEm value) {
        if (value!= null) {
            object.setEm(value);
        }
        return this;
    }

    public RPrBuilder withEm(STEm val) {
        if (val!= null) {
            object.setEm(new com.alphasystem.docx4j.builder.wml.CTEmBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withLang(CTLanguage value) {
        if (value!= null) {
            object.setLang(value);
        }
        return this;
    }

    public RPrBuilder withEastAsianLayout(CTEastAsianLayout value) {
        if (value!= null) {
            object.setEastAsianLayout(value);
        }
        return this;
    }

    public RPrBuilder withSpecVanish(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setSpecVanish(value);
        }
        return this;
    }

    public RPrBuilder withSpecVanish(Boolean val) {
        if (val!= null) {
            object.setSpecVanish(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withOMath(BooleanDefaultTrue value) {
        if (value!= null) {
            object.setOMath(value);
        }
        return this;
    }

    public RPrBuilder withOMath(Boolean val) {
        if (val!= null) {
            object.setOMath(new com.alphasystem.docx4j.builder.wml.BooleanDefaultTrueBuilder().withVal(val).getObject());
        }
        return this;
    }

    public RPrBuilder withGlow(CTGlow value) {
        if (value!= null) {
            object.setGlow(value);
        }
        return this;
    }

    public RPrBuilder withShadow14(CTShadow value) {
        if (value!= null) {
            object.setShadow14(value);
        }
        return this;
    }

    public RPrBuilder withReflection(CTReflection value) {
        if (value!= null) {
            object.setReflection(value);
        }
        return this;
    }

    public RPrBuilder withTextOutline(CTTextOutlineEffect value) {
        if (value!= null) {
            object.setTextOutline(value);
        }
        return this;
    }

    public RPrBuilder withTextFill(CTFillTextEffect value) {
        if (value!= null) {
            object.setTextFill(value);
        }
        return this;
    }

    public RPrBuilder withScene3D(CTScene3D value) {
        if (value!= null) {
            object.setScene3D(value);
        }
        return this;
    }

    public RPrBuilder withProps3D(CTProps3D value) {
        if (value!= null) {
            object.setProps3D(value);
        }
        return this;
    }

    public RPrBuilder withLigatures(CTLigatures value) {
        if (value!= null) {
            object.setLigatures(value);
        }
        return this;
    }

    public RPrBuilder withNumForm(CTNumForm value) {
        if (value!= null) {
            object.setNumForm(value);
        }
        return this;
    }

    public RPrBuilder withNumSpacing(CTNumSpacing value) {
        if (value!= null) {
            object.setNumSpacing(value);
        }
        return this;
    }

    public RPrBuilder withStylisticSets(CTStylisticSets value) {
        if (value!= null) {
            object.setStylisticSets(value);
        }
        return this;
    }

    public RPrBuilder withCntxtAlts(CTOnOff value) {
        if (value!= null) {
            object.setCntxtAlts(value);
        }
        return this;
    }

    public RPrBuilder withRPrChange(CTRPrChange value) {
        if (value!= null) {
            object.setRPrChange(value);
        }
        return this;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy