@SuppressWarnings("WeakerAccess") public void setBorderCap(BorderEdge edge, LineCap cap) { if (cap == null) { throw new IllegalArgumentException("LineCap need to be specified."); } CTLineProperties ln = setBorderDefaults(edge); ln.setCap(STLineCap.Enum.forInt(cap.ooxmlId)); }
public void setLineCap(LineCap cap) { if (cap == null) { if (props.isSetCap()) { props.unsetCap(); } } else { props.setCap(cap.underlying); } }
/** * * @param cap the line end cap style */ @SuppressWarnings("WeakerAccess") public void setLineCap(LineCap cap) { CTLineProperties ln = getLn(this, true); if (ln == null) { return; } if (cap == null) { if (ln.isSetCap()) { ln.unsetCap(); } } else { ln.setCap(STLineCap.Enum.forInt(cap.ooxmlId)); } }
ln.setCap(STLineCap.FLAT);
@SuppressWarnings("WeakerAccess") public void setBorderCap(BorderEdge edge, LineCap cap) { if (cap == null) { throw new IllegalArgumentException("LineCap need to be specified."); } CTLineProperties ln = setBorderDefaults(edge); ln.setCap(STLineCap.Enum.forInt(cap.ooxmlId)); }
public void setLineCap(LineCap cap) { if (cap == null) { if (props.isSetCap()) { props.unsetCap(); } } else { props.setCap(cap.underlying); } }
/** * * @param cap the line end cap style */ @SuppressWarnings("WeakerAccess") public void setLineCap(LineCap cap) { CTLineProperties ln = getLn(this, true); if (ln == null) { return; } if (cap == null) { if (ln.isSetCap()) { ln.unsetCap(); } } else { ln.setCap(STLineCap.Enum.forInt(cap.ooxmlId)); } }
/** * * @param cap the line end cap style */ public void setLineCap(LineCap cap) { CTShapeProperties spPr = getSpPr(); if (cap == null) { if (spPr.isSetLn()) spPr.getLn().unsetCap(); } else { CTLineProperties ln = spPr.isSetLn() ? spPr.getLn() : spPr .addNewLn(); ln.setCap(STLineCap.Enum.forInt(cap.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); } }
ln.setCap(STLineCap.FLAT);