/** * * @return the line end cap style */ @SuppressWarnings("WeakerAccess") public LineCap getLineCap() { PropertyFetcher<LineCap> fetcher = new PropertyFetcher<LineCap>() { @Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln != null && ln.isSetCap()) { setValue(LineCap.fromOoxmlId(ln.getCap().intValue())); return true; } return false; } }; fetchShapeProperty(fetcher); LineCap cap = fetcher.getValue(); if (cap == null) { CTLineProperties defaultLn = getDefaultLineProperties(); if (defaultLn != null && defaultLn.isSetCap()) { cap = LineCap.fromOoxmlId(defaultLn.getCap().intValue()); } } return cap; }
public static LineCap fromNativeId(int nativeId) { for (LineCap ld : values()) { if (ld.nativeId == nativeId) return ld; } return null; }
/** * Gets line cap. * * @return cap of the line. */ public LineCap getLineCap(){ AbstractEscherOptRecord opt = getEscherOptRecord(); EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.LINESTYLE__LINEENDCAPSTYLE); return (prop == null) ? LineCap.FLAT : LineCap.fromNativeId(prop.getPropertyValue()); }
public static LineCap fromOoxmlId(int ooxmlId) { for (LineCap lc : values()) { if (lc.ooxmlId == ooxmlId) return lc; } return null; } }
@Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln != null && ln.isSetCap()) { setValue(LineCap.fromOoxmlId(ln.getCap().intValue())); return true; } return false; } };
@SuppressWarnings("WeakerAccess") public LineCap getBorderCap(BorderEdge edge) { CTLineProperties ln = getCTLine(edge, false); if (ln == null || ln.isSetNoFill() || !ln.isSetSolidFill() || !ln.isSetCap()) { return null; } return LineCap.fromOoxmlId(ln.getCap().intValue()); }
/** * * @return the line end cap style */ @SuppressWarnings("WeakerAccess") public LineCap getLineCap() { PropertyFetcher<LineCap> fetcher = new PropertyFetcher<LineCap>() { @Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln != null && ln.isSetCap()) { setValue(LineCap.fromOoxmlId(ln.getCap().intValue())); return true; } return false; } }; fetchShapeProperty(fetcher); LineCap cap = fetcher.getValue(); if (cap == null) { CTLineProperties defaultLn = getDefaultLineProperties(); if (defaultLn != null && defaultLn.isSetCap()) { cap = LineCap.fromOoxmlId(defaultLn.getCap().intValue()); } } return cap; }
@Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln != null && ln.isSetCap()) { setValue(LineCap.fromOoxmlId(ln.getCap().intValue())); return true; } return false; } };
@SuppressWarnings("WeakerAccess") public LineCap getBorderCap(BorderEdge edge) { CTLineProperties ln = getCTLine(edge, false); if (ln == null || ln.isSetNoFill() || !ln.isSetSolidFill() || !ln.isSetCap()) { return null; } return LineCap.fromOoxmlId(ln.getCap().intValue()); }
public static LineCap fromOoxmlId(int ooxmlId) { for (LineCap lc : values()) { if (lc.ooxmlId == ooxmlId) return lc; } return null; } }
public static LineCap fromNativeId(int nativeId) { for (LineCap ld : values()) { if (ld.nativeId == nativeId) return ld; } return null; }