/** * @return a preset line dashing scheme to stroke the shape outline */ @SuppressWarnings("WeakerAccess") public LineDash getLineDash() { PropertyFetcher<LineDash> fetcher = new PropertyFetcher<LineDash>() { @Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln == null || !ln.isSetPrstDash()) { return false; } setValue(LineDash.fromOoxmlId(ln.getPrstDash().getVal().intValue())); return true; } }; fetchShapeProperty(fetcher); LineDash dash = fetcher.getValue(); if (dash == null) { CTLineProperties defaultLn = getDefaultLineProperties(); if (defaultLn != null && defaultLn.isSetPrstDash()) { dash = LineDash.fromOoxmlId(defaultLn.getPrstDash().getVal().intValue()); } } return dash; }
public static LineDash fromNativeId(int nativeId) { for (LineDash ld : values()) { if (ld.nativeId == nativeId) return ld; } return null; }
/** * Gets line dashing. * * @return dashing of the line. */ public LineDash getLineDash(){ AbstractEscherOptRecord opt = getEscherOptRecord(); EscherSimpleProperty prop = getEscherProperty(opt, EscherProperties.LINESTYLE__LINEDASHING); return (prop == null) ? LineDash.SOLID : LineDash.fromNativeId(prop.getPropertyValue()); }
@SuppressWarnings("WeakerAccess") public LineDash getBorderDash(BorderEdge edge) { CTLineProperties ln = getCTLine(edge, false); if (ln == null || ln.isSetNoFill() || !ln.isSetSolidFill() || !ln.isSetPrstDash()) { return null; } return LineDash.fromOoxmlId(ln.getPrstDash().getVal().intValue()); }
public static LineDash fromOoxmlId(int ooxmlId) { for (LineDash ld : values()) { if (ld.ooxmlId == ooxmlId) return ld; } return null; } }
@Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln == null || !ln.isSetPrstDash()) { return false; } setValue(LineDash.fromOoxmlId(ln.getPrstDash().getVal().intValue())); return true; } };
/** * @return a preset line dashing scheme to stroke the shape outline */ @SuppressWarnings("WeakerAccess") public LineDash getLineDash() { PropertyFetcher<LineDash> fetcher = new PropertyFetcher<LineDash>() { @Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln == null || !ln.isSetPrstDash()) { return false; } setValue(LineDash.fromOoxmlId(ln.getPrstDash().getVal().intValue())); return true; } }; fetchShapeProperty(fetcher); LineDash dash = fetcher.getValue(); if (dash == null) { CTLineProperties defaultLn = getDefaultLineProperties(); if (defaultLn != null && defaultLn.isSetPrstDash()) { dash = LineDash.fromOoxmlId(defaultLn.getPrstDash().getVal().intValue()); } } return dash; }
@Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln == null || !ln.isSetPrstDash()) { return false; } setValue(LineDash.fromOoxmlId(ln.getPrstDash().getVal().intValue())); return true; } };
@SuppressWarnings("WeakerAccess") public LineDash getBorderDash(BorderEdge edge) { CTLineProperties ln = getCTLine(edge, false); if (ln == null || ln.isSetNoFill() || !ln.isSetSolidFill() || !ln.isSetPrstDash()) { return null; } return LineDash.fromOoxmlId(ln.getPrstDash().getVal().intValue()); }
public static LineDash fromOoxmlId(int ooxmlId) { for (LineDash ld : values()) { if (ld.ooxmlId == ooxmlId) return ld; } return null; } }
public static LineDash fromNativeId(int nativeId) { for (LineDash ld : values()) { if (ld.nativeId == nativeId) return ld; } return null; }