本文整理汇总了Java中org.docx4j.wml.CTBorder.setSpace方法的典型用法代码示例。如果您正苦于以下问题:Java CTBorder.setSpace方法的具体用法?Java CTBorder.setSpace怎么用?Java CTBorder.setSpace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.docx4j.wml.CTBorder
的用法示例。
在下文中一共展示了CTBorder.setSpace方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addBorders
import org.docx4j.wml.CTBorder; //导入方法依赖的package包/类
/**
* 本方法给表格添加边框
*/
public void addBorders(Tbl table) {
table.setTblPr(new TblPr());
CTBorder border = new CTBorder();
border.setColor("auto");
border.setSz(new BigInteger("4"));
border.setSpace(new BigInteger("0"));
border.setVal(STBorder.SINGLE);
TblBorders borders = new TblBorders();
borders.setBottom(border);
borders.setLeft(border);
borders.setRight(border);
borders.setTop(border);
borders.setInsideH(border);
borders.setInsideV(border);
table.getTblPr().setTblBorders(borders);
}
示例2: addRPrBorderStyle
import org.docx4j.wml.CTBorder; //导入方法依赖的package包/类
/**
* @Description: 设置字符边框
*/
public void addRPrBorderStyle(RPr runProperties, String size,
STBorder bordType, String space, String color) {
CTBorder value = new CTBorder();
if (StringUtils.isNotBlank(color)) {
value.setColor(color);
}
if (StringUtils.isNotBlank(size)) {
value.setSz(new BigInteger(size));
}
if (StringUtils.isNotBlank(space)) {
value.setSpace(new BigInteger(space));
}
if (bordType != null) {
value.setVal(bordType);
}
runProperties.setBdr(value);
}
示例3: addBorders
import org.docx4j.wml.CTBorder; //导入方法依赖的package包/类
/**
* 本方法为表格添加边框
*/
private static void addBorders(Tbl table) {
table.setTblPr(new TblPr());
CTBorder border = new CTBorder();
border.setColor("auto");
border.setSz(new BigInteger("4"));
border.setSpace(new BigInteger("0"));
border.setVal(STBorder.SINGLE);
TblBorders borders = new TblBorders();
borders.setBottom(border);
borders.setLeft(border);
borders.setRight(border);
borders.setTop(border);
borders.setInsideH(border);
borders.setInsideV(border);
table.getTblPr().setTblBorders(borders);
}
示例4: addBorders
import org.docx4j.wml.CTBorder; //导入方法依赖的package包/类
public void addBorders(Tbl table, String borderSize) {
table.setTblPr(new TblPr());
CTBorder border = new CTBorder();
border.setColor("auto");
border.setSz(new BigInteger(borderSize));
border.setSpace(new BigInteger("0"));
border.setVal(STBorder.SINGLE);
TblBorders borders = new TblBorders();
borders.setBottom(border);
borders.setLeft(border);
borders.setRight(border);
borders.setTop(border);
borders.setInsideH(border);
borders.setInsideV(border);
table.getTblPr().setTblBorders(borders);
}
示例5: addBorders
import org.docx4j.wml.CTBorder; //导入方法依赖的package包/类
public void addBorders(Tbl table, String borderSize) {
table.setTblPr(new TblPr());
CTBorder border = new CTBorder();
border.setColor("auto");
border.setSz(new BigInteger(borderSize));
border.setSpace(new BigInteger("0"));
border.setVal(STBorder.SINGLE);
TblBorders borders = new TblBorders();
borders.setBottom(border);
borders.setLeft(border);
borders.setRight(border);
borders.setTop(border);
borders.setInsideH(border);
borders.setInsideV(border);
table.getTblPr().setTblBorders(borders);
}
示例6: addBorders
import org.docx4j.wml.CTBorder; //导入方法依赖的package包/类
/**
* 本方法给表格添加边框
*/
private static void addBorders(Tbl table) {
table.setTblPr(new TblPr());
CTBorder border = new CTBorder();
border.setColor("auto");
border.setSz(new BigInteger("4"));
border.setSpace(new BigInteger("0"));
border.setVal(STBorder.SINGLE);
TblBorders borders = new TblBorders();
borders.setBottom(border);
borders.setLeft(border);
borders.setRight(border);
borders.setTop(border);
borders.setInsideH(border);
borders.setInsideV(border);
table.getTblPr().setTblBorders(borders);
}
示例7: addBorders
import org.docx4j.wml.CTBorder; //导入方法依赖的package包/类
private static void addBorders(Tbl table) {
table.setTblPr(new TblPr());
CTBorder border = new CTBorder();
border.setColor("auto");
border.setSz(new BigInteger("4"));
border.setSpace(new BigInteger("0"));
border.setVal(STBorder.SINGLE);
TblBorders borders = new TblBorders();
borders.setBottom(border);
borders.setLeft(border);
borders.setRight(border);
borders.setTop(border);
borders.setInsideH(border);
borders.setInsideV(border);
table.getTblPr().setTblBorders(borders);
}
示例8: createHorizontalLine
import org.docx4j.wml.CTBorder; //导入方法依赖的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;
}
示例9: addBorders
import org.docx4j.wml.CTBorder; //导入方法依赖的package包/类
/**
* Add border to table
* @param table
*/
private static void addBorders(Tbl table) {
table.setTblPr(new TblPr());
CTBorder border = new CTBorder();
border.setColor("auto");
border.setSz(new BigInteger("4"));
border.setSpace(new BigInteger("0"));
border.setVal(STBorder.SINGLE);
TblBorders borders = new TblBorders();
borders.setBottom(border);
borders.setLeft(border);
borders.setRight(border);
borders.setTop(border);
borders.setInsideH(border);
borders.setInsideV(border);
table.getTblPr().setTblBorders(borders);
}
示例10: ctBorder
import org.docx4j.wml.CTBorder; //导入方法依赖的package包/类
public static CTBorder ctBorder(String color,BigInteger border_width,BigInteger border_space) {
CTBorder border = new CTBorder();
border.setColor(color);
border.setSz(border_width);
border.setSpace(border_space);
border.setVal(STBorder.SINGLE);
return border;
}
示例11: main
import org.docx4j.wml.CTBorder; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
Docx4J_例子2 t = new Docx4J_例子2();
WordprocessingMLPackage wordMLPackage = t
.createWordprocessingMLPackage();
MainDocumentPart mp = wordMLPackage.getMainDocumentPart();
ObjectFactory factory = Context.getWmlObjectFactory();
Relationship relationship = t.createHeaderPart(wordMLPackage, mp,
factory, false, "3");
relationship = t.createTextHeaderPart(wordMLPackage, mp, factory,
"我是页眉,独乐乐不如众乐乐", true, "3", JcEnumeration.CENTER);
t.addParagraphTest(wordMLPackage, mp, factory);
t.addPageBreak(wordMLPackage, factory, STBrType.PAGE);
t.createHeaderReference(wordMLPackage, mp, factory, relationship);
t.createNormalTableTest(wordMLPackage, mp, factory);
t.addPageBreak(wordMLPackage, factory, STBrType.TEXT_WRAPPING);
t.createTableTest(wordMLPackage, mp, factory);
t.addPageBreak(wordMLPackage, factory, STBrType.TEXT_WRAPPING);
P paragraph=factory.createP();
CTBorder topBorder=new CTBorder() ;
topBorder.setSpace(new BigInteger("1"));
topBorder.setSz(new BigInteger("2"));
topBorder.setVal(STBorder.WAVE);
t.createParagraghLine(wordMLPackage, mp, factory, paragraph, topBorder, topBorder, topBorder, topBorder);
mp.addObject(paragraph);
t.createHyperlink(wordMLPackage, mp, factory,paragraph,
"mailto:[email protected]?subject=docx4j测试", "联系我","微软雅黑","24",JcEnumeration.CENTER);
// 页脚
// relationship = t.createFooterPart(wordMLPackage, mp, factory,
// false,"3");
// relationship = t.createTextFooterPart(wordMLPackage, mp,
// factory,"我是页脚", true, "3", JcEnumeration.CENTER);
relationship = t.createFooterPageNumPart(wordMLPackage, mp, factory,
false, "3", JcEnumeration.CENTER);
t.createFooterReference(wordMLPackage, mp, factory, relationship);
t.saveWordPackage(wordMLPackage, new File(
"f:/saveFile/temp/s7_simple.docx"));
}
示例12: lowerBorder
import org.docx4j.wml.CTBorder; //导入方法依赖的package包/类
private PBdr lowerBorder() {
final PBdr pbdr = this.wmlObjectFactory.createPPrBasePBdr();
final CTBorder border = this.wmlObjectFactory.createCTBorder();
border.setColor("000000");
border.setSz(BigInteger.valueOf(2));
border.setSpace(BigInteger.valueOf(6));
border.setVal(STBorder.SINGLE);
pbdr.setBottom(border);
return pbdr;
}