use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders in project poi by apache.
the class XWPFTable method getInsideVBorderSize.
public int getInsideVBorderSize() {
int size = -1;
CTTblPr tblPr = getTrPr();
if (tblPr.isSetTblBorders()) {
CTTblBorders ctb = tblPr.getTblBorders();
if (ctb.isSetInsideV()) {
CTBorder border = ctb.getInsideV();
size = border.getSz().intValue();
}
}
return size;
}
use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders 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.CTTblBorders 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.CTTblBorders 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;
}
use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders in project poi by apache.
the class XWPFTable method getInsideHBorderSize.
public int getInsideHBorderSize() {
int size = -1;
CTTblPr tblPr = getTrPr();
if (tblPr.isSetTblBorders()) {
CTTblBorders ctb = tblPr.getTblBorders();
if (ctb.isSetInsideH()) {
CTBorder border = ctb.getInsideH();
size = border.getSz().intValue();
}
}
return size;
}
Aggregations