use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr in project poi by apache.
the class XWPFTable method setRowBandSize.
public void setRowBandSize(int size) {
CTTblPr tblPr = getTrPr();
CTDecimalNumber rowSize = tblPr.isSetTblStyleRowBandSize() ? tblPr.getTblStyleRowBandSize() : tblPr.addNewTblStyleRowBandSize();
rowSize.setVal(BigInteger.valueOf(size));
}
use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr in project poi by apache.
the class XWPFTable method getInsideVBorderSpace.
public int getInsideVBorderSpace() {
int space = -1;
CTTblPr tblPr = getTrPr();
if (tblPr.isSetTblBorders()) {
CTTblBorders ctb = tblPr.getTblBorders();
if (ctb.isSetInsideV()) {
CTBorder border = ctb.getInsideV();
space = border.getSpace().intValue();
}
}
return space;
}
use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr in project poi by apache.
the class XWPFTable method getCellMarginRight.
public int getCellMarginRight() {
int margin = 0;
CTTblPr tblPr = getTrPr();
CTTblCellMar tcm = tblPr.getTblCellMar();
if (tcm != null) {
CTTblWidth tw = tcm.getRight();
if (tw != null) {
margin = tw.getW().intValue();
}
}
return margin;
}
use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr in project poi by apache.
the class XWPFTable method createEmptyTable.
private void createEmptyTable(CTTbl table) {
// MINIMUM ELEMENTS FOR A TABLE
table.addNewTr().addNewTc().addNewP();
CTTblPr tblpro = table.addNewTblPr();
tblpro.addNewTblW().setW(new BigInteger("0"));
tblpro.getTblW().setType(STTblWidth.AUTO);
// layout
// tblpro.addNewTblLayout().setType(STTblLayoutType.AUTOFIT);
// borders
CTTblBorders borders = tblpro.addNewTblBorders();
borders.addNewBottom().setVal(STBorder.SINGLE);
borders.addNewInsideH().setVal(STBorder.SINGLE);
borders.addNewInsideV().setVal(STBorder.SINGLE);
borders.addNewLeft().setVal(STBorder.SINGLE);
borders.addNewRight().setVal(STBorder.SINGLE);
borders.addNewTop().setVal(STBorder.SINGLE);
/*
* CTTblGrid tblgrid=table.addNewTblGrid();
* tblgrid.addNewGridCol().setW(new BigInteger("2000"));
*/
getRows();
}
use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblPr in project poi by apache.
the class XWPFTable method getInsideVBorderColor.
public String getInsideVBorderColor() {
String color = null;
CTTblPr tblPr = getTrPr();
if (tblPr.isSetTblBorders()) {
CTTblBorders ctb = tblPr.getTblBorders();
if (ctb.isSetInsideV()) {
CTBorder border = ctb.getInsideV();
color = border.xgetColor().getStringValue();
}
}
return color;
}
Aggregations