Search in sources :

Example 1 with CTTableCellProperties

use of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties in project poi by apache.

the class XSLFTableCell method setRightInset.

@Override
public void setRightInset(double margin) {
    CTTableCellProperties pr = getCellProperties(true);
    pr.setMarR(Units.toEMU(margin));
}
Also used : CTTableCellProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties)

Example 2 with CTTableCellProperties

use of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties in project poi by apache.

the class XSLFTableCell method setTopInset.

@Override
public void setTopInset(double margin) {
    CTTableCellProperties pr = getCellProperties(true);
    pr.setMarT(Units.toEMU(margin));
}
Also used : CTTableCellProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties)

Example 3 with CTTableCellProperties

use of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties in project poi by apache.

the class XSLFTableCell method setFillColor.

/**
     * Specifies a solid color fill. The shape is filled entirely with the specified color.
     *
     * @param color the solid color fill.
     * The value of <code>null</code> unsets the solidFIll attribute from the underlying xml
     */
@Override
public void setFillColor(Color color) {
    CTTableCellProperties spPr = getCellProperties(true);
    if (color == null) {
        if (spPr.isSetSolidFill()) {
            spPr.unsetSolidFill();
        }
    } else {
        CTSolidColorFillProperties fill = spPr.isSetSolidFill() ? spPr.getSolidFill() : spPr.addNewSolidFill();
        XSLFColor c = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr());
        c.setColor(color);
    }
}
Also used : CTSolidColorFillProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTSolidColorFillProperties) CTTableCellProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties)

Example 4 with CTTableCellProperties

use of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties in project poi by apache.

the class XSLFTableCell method prototype.

static CTTableCell prototype() {
    CTTableCell cell = CTTableCell.Factory.newInstance();
    CTTableCellProperties pr = cell.addNewTcPr();
    pr.addNewLnL().addNewNoFill();
    pr.addNewLnR().addNewNoFill();
    pr.addNewLnT().addNewNoFill();
    pr.addNewLnB().addNewNoFill();
    return cell;
}
Also used : CTTableCell(org.openxmlformats.schemas.drawingml.x2006.main.CTTableCell) CTTableCellProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties)

Example 5 with CTTableCellProperties

use of org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties in project poi by apache.

the class XSLFTableCell method setTextDirection.

/**
     * @since POI 3.15-beta2
     */
@Override
public void setTextDirection(TextDirection orientation) {
    CTTableCellProperties cellProps = getCellProperties(true);
    if (orientation == null) {
        if (cellProps.isSetVert()) {
            cellProps.unsetVert();
        }
    } else {
        STTextVerticalType.Enum vt;
        switch(orientation) {
            default:
            case HORIZONTAL:
                vt = STTextVerticalType.HORZ;
                break;
            case VERTICAL:
                vt = STTextVerticalType.VERT;
                break;
            case VERTICAL_270:
                vt = STTextVerticalType.VERT_270;
                break;
            case STACKED:
                vt = STTextVerticalType.WORD_ART_VERT;
                break;
        }
        cellProps.setVert(vt);
    }
}
Also used : STTextVerticalType(org.openxmlformats.schemas.drawingml.x2006.main.STTextVerticalType) CTTableCellProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties)

Aggregations

CTTableCellProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTTableCellProperties)10 CTSolidColorFillProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTSolidColorFillProperties)2 CTTableCell (org.openxmlformats.schemas.drawingml.x2006.main.CTTableCell)2 STTextVerticalType (org.openxmlformats.schemas.drawingml.x2006.main.STTextVerticalType)2 DrawPaint (org.apache.poi.sl.draw.DrawPaint)1 SolidPaint (org.apache.poi.sl.usermodel.PaintStyle.SolidPaint)1 VerticalAlignment (org.apache.poi.sl.usermodel.VerticalAlignment)1 XmlObject (org.apache.xmlbeans.XmlObject)1 CTBlipFillProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTBlipFillProperties)1 CTFillProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTFillProperties)1 CTGradientFillProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTGradientFillProperties)1 CTGroupFillProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTGroupFillProperties)1 CTLineProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTLineProperties)1 CTNoFillProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTNoFillProperties)1 CTPatternFillProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTPatternFillProperties)1 CTShapeProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties)1 CTStyleMatrixReference (org.openxmlformats.schemas.drawingml.x2006.main.CTStyleMatrixReference)1 CTTextCharacterProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTTextCharacterProperties)1 CTBackgroundProperties (org.openxmlformats.schemas.presentationml.x2006.main.CTBackgroundProperties)1