当前位置: 首页>>代码示例>>Java>>正文


Java PPr.setPBdr方法代码示例

本文整理汇总了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);
}
 
开发者ID:vindell,项目名称:docx4j-template,代码行数:22,代码来源:Docx4j_工具类_S3_Test.java

示例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;
	}
 
开发者ID:ShapeChange,项目名称:ShapeChange,代码行数:23,代码来源:DocxUtil.java

示例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);
}
 
开发者ID:vindell,项目名称:docx4j-template,代码行数:12,代码来源:Docx4J_例子2.java

示例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;
}
 
开发者ID:mizitch,项目名称:story-inspector,代码行数:15,代码来源:DocXReportSummaryWriter.java


注:本文中的org.docx4j.wml.PPr.setPBdr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。