Search in sources :

Example 6 with CTLineEndProperties

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

the class XSLFSimpleShape method setLineHeadWidth.

/**
     * specifies decoration width of the head of a line.
     * 
     * @param style the decoration width 
     */
public void setLineHeadWidth(DecorationSize style) {
    CTLineProperties ln = getLn(this, true);
    if (ln == null) {
        return;
    }
    CTLineEndProperties lnEnd = ln.isSetHeadEnd() ? ln.getHeadEnd() : ln.addNewHeadEnd();
    if (style == null) {
        if (lnEnd.isSetW()) {
            lnEnd.unsetW();
        }
    } else {
        lnEnd.setW(STLineEndWidth.Enum.forInt(style.ooxmlId));
    }
}
Also used : CTLineEndProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTLineEndProperties) CTLineProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTLineProperties)

Example 7 with CTLineEndProperties

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

the class XSLFSimpleShape method setLineTailLength.

/**
     * Specifies the line end width in relation to the line width.
     */
public void setLineTailLength(DecorationSize style) {
    CTLineProperties ln = getLn(this, true);
    if (ln == null) {
        return;
    }
    CTLineEndProperties lnEnd = ln.isSetTailEnd() ? ln.getTailEnd() : ln.addNewTailEnd();
    if (style == null) {
        if (lnEnd.isSetLen()) {
            lnEnd.unsetLen();
        }
    } else {
        lnEnd.setLen(STLineEndLength.Enum.forInt(style.ooxmlId));
    }
}
Also used : CTLineEndProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTLineEndProperties) CTLineProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTLineProperties)

Aggregations

CTLineEndProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTLineEndProperties)7 CTLineProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTLineProperties)7