@Override public boolean isSetNoFill() { return props.isSetNoFill(); }
@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()); }
@SuppressWarnings("WeakerAccess") public LineCompound getBorderCompound(BorderEdge edge) { CTLineProperties ln = getCTLine(edge, false); if (ln == null || ln.isSetNoFill() || !ln.isSetSolidFill() || !ln.isSetCmpd()) { return null; } return LineCompound.fromOoxmlId(ln.getCmpd().intValue()); }
@Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln != null) { if (ln.isSetNoFill()) { setValue(0.); return true; } if (ln.isSetW()) { setValue(Units.toPoints(ln.getW())); return true; } } return false; } };
@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()); }
@SuppressWarnings("WeakerAccess") public Color getBorderColor(BorderEdge edge) { CTLineProperties ln = getCTLine(edge, false); if (ln == null || ln.isSetNoFill() || !ln.isSetSolidFill()) { return null; } CTSolidColorFillProperties fill = ln.getSolidFill(); XSLFColor c = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr()); return c.getColor(); }
lnPr.unsetW(); if (!lnPr.isSetNoFill()) { lnPr.addNewNoFill(); if (lnPr.isSetNoFill()) { lnPr.unsetNoFill();
public XDDFFillProperties getFillProperties() { if (props.isSetGradFill()) { return new XDDFGradientFillProperties(props.getGradFill()); } else if (props.isSetNoFill()) { return new XDDFNoFillProperties(props.getNoFill()); } else if (props.isSetPattFill()) { return new XDDFPatternFillProperties(props.getPattFill()); } else if (props.isSetSolidFill()) { return new XDDFSolidFillProperties(props.getSolidFill()); } else { return null; } }
public void setFillProperties(XDDFFillProperties properties) { if (props.isSetGradFill()) { props.unsetGradFill(); } if (props.isSetNoFill()) { props.unsetNoFill(); } if (props.isSetPattFill()) { props.unsetPattFill(); } if (props.isSetSolidFill()) { props.unsetSolidFill(); } if (properties == null) { return; } if (properties instanceof XDDFGradientFillProperties) { props.setGradFill(((XDDFGradientFillProperties) properties).getXmlObject()); } else if (properties instanceof XDDFNoFillProperties) { props.setNoFill(((XDDFNoFillProperties) properties).getXmlObject()); } else if (properties instanceof XDDFPatternFillProperties) { props.setPattFill(((XDDFPatternFillProperties) properties).getXmlObject()); } else if (properties instanceof XDDFSolidFillProperties) { props.setSolidFill(((XDDFSolidFillProperties) properties).getXmlObject()); } }
/** * @param color the color to paint the shape outline. * A <code>null</code> value turns off the shape outline. */ public void setLineColor(Color color) { CTLineProperties ln = getLn(this, true); if (ln == null) { return; } if (ln.isSetSolidFill()) { ln.unsetSolidFill(); } if (ln.isSetGradFill()) { ln.unsetGradFill(); } if (ln.isSetPattFill()) { ln.unsetPattFill(); } if (ln.isSetNoFill()) { ln.unsetNoFill(); } if (color == null) { ln.addNewNoFill(); } else { CTSolidColorFillProperties fill = ln.addNewSolidFill(); XSLFColor col = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr()); col.setColor(color); } }
if (ln.isSetNoFill()) { ln.unsetNoFill();
@Override public boolean isSetNoFill() { return props.isSetNoFill(); }
private Color getLineColor(CTLineProperties ln){ if(ln == null || ln.isSetNoFill() || !ln.isSetSolidFill()) return null; CTSolidColorFillProperties fill = ln.getSolidFill(); if(!fill.isSetSrgbClr()) { // TODO for now return null for all colors except explicit RGB return null; } byte[] val = fill.getSrgbClr().getVal(); return new Color(0xFF & val[0], 0xFF & val[1], 0xFF & val[2]); } /**
@Override public boolean fetch(XSLFShape shape) { CTLineProperties ln = getLn(shape, false); if (ln != null) { if (ln.isSetNoFill()) { setValue(0.); return true; } if (ln.isSetW()) { setValue(Units.toPoints(ln.getW())); 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()); }
@SuppressWarnings("WeakerAccess") public LineCompound getBorderCompound(BorderEdge edge) { CTLineProperties ln = getCTLine(edge, false); if (ln == null || ln.isSetNoFill() || !ln.isSetSolidFill() || !ln.isSetCmpd()) { return null; } return LineCompound.fromOoxmlId(ln.getCmpd().intValue()); }
@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()); }
@SuppressWarnings("WeakerAccess") public Color getBorderColor(BorderEdge edge) { CTLineProperties ln = getCTLine(edge, false); if (ln == null || ln.isSetNoFill() || !ln.isSetSolidFill()) { return null; } CTSolidColorFillProperties fill = ln.getSolidFill(); XSLFColor c = new XSLFColor(fill, getSheet().getTheme(), fill.getSchemeClr()); return c.getColor(); }
public boolean fetch(XSLFSimpleShape shape) { CTShapeProperties spPr = shape.getSpPr(); CTLineProperties ln = spPr.getLn(); if (ln != null) { if (ln.isSetNoFill()) { setValue(0.); return true; } if (ln.isSetW()) { setValue(Units.toPoints(ln.getW())); return true; } } return false; } };
public XDDFFillProperties getFillProperties() { if (props.isSetGradFill()) { return new XDDFGradientFillProperties(props.getGradFill()); } else if (props.isSetNoFill()) { return new XDDFNoFillProperties(props.getNoFill()); } else if (props.isSetPattFill()) { return new XDDFPatternFillProperties(props.getPattFill()); } else if (props.isSetSolidFill()) { return new XDDFSolidFillProperties(props.getSolidFill()); } else { return null; } }