use of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties in project poi by apache.
the class XSLFTableCell method getVerticalAlignment.
@Override
public VerticalAlignment getVerticalAlignment() {
CTTableCellProperties cellProps = getCellProperties(false);
VerticalAlignment align = VerticalAlignment.TOP;
if (cellProps != null && cellProps.isSetAnchor()) {
int ival = cellProps.getAnchor().intValue();
align = VerticalAlignment.values()[ival - 1];
}
return align;
}
use of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties in project poi by apache.
the class XSLFTableCell method getTextDirection.
/**
* @since POI 3.15-beta2
*/
@Override
public TextDirection getTextDirection() {
CTTableCellProperties cellProps = getCellProperties(false);
STTextVerticalType.Enum orientation;
if (cellProps != null && cellProps.isSetVert()) {
orientation = cellProps.getVert();
} else {
orientation = STTextVerticalType.HORZ;
}
switch(orientation.intValue()) {
default:
case STTextVerticalType.INT_HORZ:
return TextDirection.HORIZONTAL;
case STTextVerticalType.INT_VERT:
case STTextVerticalType.INT_EA_VERT:
case STTextVerticalType.INT_MONGOLIAN_VERT:
return TextDirection.VERTICAL;
case STTextVerticalType.INT_VERT_270:
return TextDirection.VERTICAL_270;
case STTextVerticalType.INT_WORD_ART_VERT:
case STTextVerticalType.INT_WORD_ART_VERT_RTL:
return TextDirection.STACKED;
}
}
use of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties in project poi by apache.
the class XSLFTableCell method setBottomInset.
@Override
public void setBottomInset(double margin) {
CTTableCellProperties pr = getCellProperties(true);
pr.setMarB(Units.toEMU(margin));
}
use of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties in project poi by apache.
the class XSLFTableCell method getCellProperties.
protected CTTableCellProperties getCellProperties(boolean create) {
if (_tcPr == null) {
CTTableCell cell = getCell();
_tcPr = cell.getTcPr();
if (_tcPr == null && create) {
_tcPr = cell.addNewTcPr();
}
}
return _tcPr;
}
use of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties in project poi by apache.
the class XSLFTableCell method setLeftInset.
@Override
public void setLeftInset(double margin) {
CTTableCellProperties pr = getCellProperties(true);
pr.setMarL(Units.toEMU(margin));
}
Aggregations