本文整理汇总了Java中org.docx4j.wml.PPr.setPBdr方法的典型用法代码示例。如果您正苦于以下问题:Java PPr.setPBdr方法的具体用法?Java PPr.setPBdr怎么用?Java PPr.setPBdr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.docx4j.wml.PPr
的用法示例。
在下文中一共展示了PPr.setPBdr方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setParagraghBorders
import org.docx4j.wml.PPr; //导入方法依赖的package包/类
/**
* @Description: 设置段落边框样式
*/
public void setParagraghBorders(P p, CTBorder topBorder,
CTBorder bottomBorder, CTBorder leftBorder, CTBorder rightBorder) {
PPr ppr = getPPr(p);
PBdr pBdr = new PBdr();
if (topBorder != null) {
pBdr.setTop(topBorder);
}
if (bottomBorder != null) {
pBdr.setBottom(bottomBorder);
}
if (leftBorder != null) {
pBdr.setLeft(leftBorder);
}
if (rightBorder != null) {
pBdr.setRight(rightBorder);
}
ppr.setPBdr(pBdr);
}
示例2: createHorizontalLine
import org.docx4j.wml.PPr; //导入方法依赖的package包/类
public static P createHorizontalLine() {
org.docx4j.wml.ObjectFactory wmlObjectFactory = new org.docx4j.wml.ObjectFactory();
// Create object for p
P p = wmlObjectFactory.createP();
// Create object for pPr
PPr ppr = wmlObjectFactory.createPPr();
p.setPPr(ppr);
// Create object for pBdr
PPrBase.PBdr pprbasepbdr = wmlObjectFactory.createPPrBasePBdr();
ppr.setPBdr(pprbasepbdr);
// Create object for bottom
CTBorder border = wmlObjectFactory.createCTBorder();
pprbasepbdr.setBottom(border);
border.setVal(org.docx4j.wml.STBorder.SINGLE);
border.setSz(BigInteger.valueOf(6));
border.setColor("auto");
border.setSpace(BigInteger.valueOf(1));
return p;
}
示例3: createParagraghLine
import org.docx4j.wml.PPr; //导入方法依赖的package包/类
public void createParagraghLine(WordprocessingMLPackage wordMLPackage,
MainDocumentPart t, ObjectFactory factory,P p,CTBorder topBorder,CTBorder bottomBorder,CTBorder leftBorder,CTBorder rightBorder){
PPr ppr=new PPr();
PBdr pBdr=new PBdr();
pBdr.setTop(topBorder);
pBdr.setBottom(bottomBorder);
pBdr.setLeft(leftBorder);
pBdr.setRight(rightBorder);
ppr.setPBdr(pBdr);
p.setPPr(ppr);
}
示例4: paragraphProperties
import org.docx4j.wml.PPr; //导入方法依赖的package包/类
private PPr paragraphProperties(final Spacing spacing, final PBdr border, final Jc alignment, final boolean keepNext) {
final PPr ppr = this.wmlObjectFactory.createPPr();
ppr.setPBdr(border);
ppr.setSpacing(spacing);
ppr.setJc(alignment);
final BooleanDefaultTrue trueElement = this.wmlObjectFactory.createBooleanDefaultTrue();
trueElement.setVal(keepNext);
ppr.setKeepNext(trueElement);
ppr.setContextualSpacing(trueElement);
return ppr;
}