/** * Specifies the line end decoration, such as a triangle or arrowhead. */ @SuppressWarnings("WeakerAccess") public void setLineTailDecoration(DecorationShape style) { CTLineProperties ln = getLn(this, true); if (ln == null) { return; } CTLineEndProperties lnEnd = ln.isSetTailEnd() ? ln.getTailEnd() : ln.addNewTailEnd(); if (style == null) { if (lnEnd.isSetType()) { lnEnd.unsetType(); } } else { lnEnd.setType(STLineEndType.Enum.forInt(style.ooxmlId)); } }
/** * specifies decorations which can be added to the tail of a line. */ @SuppressWarnings("WeakerAccess") public void setLineTailWidth(DecorationSize style) { CTLineProperties ln = getLn(this, true); if (ln == null) { return; } CTLineEndProperties lnEnd = ln.isSetTailEnd() ? ln.getTailEnd() : ln.addNewTailEnd(); if (style == null) { if (lnEnd.isSetW()) { lnEnd.unsetW(); } } else { lnEnd.setW(STLineEndWidth.Enum.forInt(style.ooxmlId)); } }
/** * Specifies the line end width in relation to the line width. */ @SuppressWarnings("WeakerAccess") 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)); } }
CTLineEndProperties tl = ln.addNewTailEnd(); tl.setType(STLineEndType.NONE); tl.setW(STLineEndWidth.MED);
/** * Specifies the line end decoration, such as a triangle or arrowhead. */ @SuppressWarnings("WeakerAccess") public void setLineTailDecoration(DecorationShape style) { CTLineProperties ln = getLn(this, true); if (ln == null) { return; } CTLineEndProperties lnEnd = ln.isSetTailEnd() ? ln.getTailEnd() : ln.addNewTailEnd(); if (style == null) { if (lnEnd.isSetType()) { lnEnd.unsetType(); } } else { lnEnd.setType(STLineEndType.Enum.forInt(style.ooxmlId)); } }
/** * Specifies the line end width in relation to the line width. */ @SuppressWarnings("WeakerAccess") 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)); } }
/** * specifies decorations which can be added to the tail of a line. */ @SuppressWarnings("WeakerAccess") public void setLineTailWidth(DecorationSize style) { CTLineProperties ln = getLn(this, true); if (ln == null) { return; } CTLineEndProperties lnEnd = ln.isSetTailEnd() ? ln.getTailEnd() : ln.addNewTailEnd(); if (style == null) { if (lnEnd.isSetW()) { lnEnd.unsetW(); } } else { lnEnd.setW(STLineEndWidth.Enum.forInt(style.ooxmlId)); } }
/** * Specifies the line end decoration, such as a triangle or arrowhead. */ public void setLineTailDecoration(LineDecoration style) { CTLineProperties ln = getSpPr().getLn(); CTLineEndProperties lnEnd = ln.isSetTailEnd() ? ln.getTailEnd() : ln.addNewTailEnd(); if (style == null) { if (lnEnd.isSetType()) lnEnd.unsetType(); } else { lnEnd.setType(STLineEndType.Enum.forInt(style.ordinal() + 1)); } }
/** * Specifies the line end width in relation to the line width. */ public void setLineTailLength(LineEndLength style) { CTLineProperties ln = getSpPr().getLn(); CTLineEndProperties lnEnd = ln.isSetTailEnd() ? ln.getTailEnd() : ln.addNewTailEnd(); if (style == null) { if (lnEnd.isSetLen()) lnEnd.unsetLen(); } else { lnEnd.setLen(STLineEndLength.Enum.forInt(style.ordinal() + 1)); } }
/** * specifies decorations which can be added to the tail of a line. */ public void setLineTailWidth(LineEndWidth style) { CTLineProperties ln = getSpPr().getLn(); CTLineEndProperties lnEnd = ln.isSetTailEnd() ? ln.getTailEnd() : ln.addNewTailEnd(); if (style == null) { if (lnEnd.isSetW()) lnEnd.unsetW(); } else { lnEnd.setW(STLineEndWidth.Enum.forInt(style.ordinal() + 1)); } }
private void setLineColor(CTLineProperties ln, Color color){ if(color == null){ ln.addNewNoFill(); if(ln.isSetSolidFill()) ln.unsetSolidFill(); } else { if(ln.isSetNoFill()) ln.unsetNoFill(); if(!ln.isSetPrstDash()) ln.addNewPrstDash().setVal(STPresetLineDashVal.SOLID); ln.setCmpd(STCompoundLine.SNG); ln.setAlgn(STPenAlignment.CTR); ln.setCap(STLineCap.FLAT); ln.addNewRound(); CTLineEndProperties hd = ln.addNewHeadEnd(); hd.setType(STLineEndType.NONE); hd.setW(STLineEndWidth.MED); hd.setLen(STLineEndLength.MED); CTLineEndProperties tl = ln.addNewTailEnd(); tl.setType(STLineEndType.NONE); tl.setW(STLineEndWidth.MED); tl.setLen(STLineEndLength.MED); CTSRgbColor rgb = CTSRgbColor.Factory.newInstance(); rgb.setVal(new byte[]{(byte)color.getRed(), (byte)color.getGreen(), (byte)color.getBlue()}); ln.addNewSolidFill().setSrgbClr(rgb); } }
CTLineEndProperties tl = ln.addNewTailEnd(); tl.setType(STLineEndType.NONE); tl.setW(STLineEndWidth.MED);