Search in sources :

Example 1 with CTHeight

use of org.docx4j.wml.CTHeight in project docx4j-template by vindell.

the class Docx4J_例子2 method setTableTrHeight.

// 设置tr高度
public void setTableTrHeight(ObjectFactory factory, Tr tr, String heigth) {
    TrPr trPr = tr.getTrPr();
    if (trPr == null) {
        trPr = factory.createTrPr();
    }
    CTHeight ctHeight = new CTHeight();
    ctHeight.setVal(new BigInteger(heigth));
    TrHeight trHeight = new TrHeight(ctHeight);
    trHeight.set(trPr);
    tr.setTrPr(trPr);
}
Also used : TrHeight(org.docx4j.model.properties.table.tr.TrHeight) TrPr(org.docx4j.wml.TrPr) BigInteger(java.math.BigInteger) CTHeight(org.docx4j.wml.CTHeight)

Example 2 with CTHeight

use of org.docx4j.wml.CTHeight in project docx4j-template by vindell.

the class Docx4J_简单例子2 method setTableTrHeight.

// 设置tr高度
public void setTableTrHeight(ObjectFactory factory, Tr tr, String heigth) {
    TrPr trPr = tr.getTrPr();
    if (trPr == null) {
        trPr = factory.createTrPr();
    }
    CTHeight ctHeight = new CTHeight();
    ctHeight.setVal(new BigInteger(heigth));
    TrHeight trHeight = new TrHeight(ctHeight);
    trHeight.set(trPr);
    tr.setTrPr(trPr);
}
Also used : TrHeight(org.docx4j.model.properties.table.tr.TrHeight) TrPr(org.docx4j.wml.TrPr) BigInteger(java.math.BigInteger) CTHeight(org.docx4j.wml.CTHeight)

Example 3 with CTHeight

use of org.docx4j.wml.CTHeight in project docx4j-template by vindell.

the class Docx4j_工具类_S3_Test method setTrHeight.

/**
 * @Description:设置tr高度
 */
public void setTrHeight(Tr tr, String heigth) {
    TrPr trPr = getTrPr(tr);
    CTHeight ctHeight = new CTHeight();
    ctHeight.setVal(new BigInteger(heigth));
    TrHeight trHeight = new TrHeight(ctHeight);
    trHeight.set(trPr);
}
Also used : TrHeight(org.docx4j.model.properties.table.tr.TrHeight) TrPr(org.docx4j.wml.TrPr) BigInteger(java.math.BigInteger) CTHeight(org.docx4j.wml.CTHeight)

Aggregations

BigInteger (java.math.BigInteger)3 TrHeight (org.docx4j.model.properties.table.tr.TrHeight)3 CTHeight (org.docx4j.wml.CTHeight)3 TrPr (org.docx4j.wml.TrPr)3