@Override public boolean isSetCustGeom() { return props.isSetCustGeom(); }
public XDDFCustomGeometry2D getCustomGeometry2D() { if (props.isSetCustGeom()) { return new XDDFCustomGeometry2D(props.getCustGeom()); } else { return null; } }
public void setCustomGeometry2D(XDDFCustomGeometry2D geometry) { if (geometry == null) { if (props.isSetCustGeom()) { props.unsetCustGeom(); } } else { props.setCustGeom(geometry.getXmlObject()); } }
static XSLFAutoShape create(CTShape shape, XSLFSheet sheet) { if (shape.getSpPr().isSetCustGeom()) { return new XSLFFreeformShape(shape, sheet); } else if (shape.getNvSpPr().getCNvSpPr().isSetTxBox()) { return new XSLFTextBox(shape, sheet); } else { return new XSLFAutoShape(shape, sheet); } }
@Override public boolean isSetCustGeom() { return props.isSetCustGeom(); }
public XDDFCustomGeometry2D getCustomGeometry2D() { if (props.isSetCustGeom()) { return new XDDFCustomGeometry2D(props.getCustGeom()); } else { return null; } }
public void setCustomGeometry2D(XDDFCustomGeometry2D geometry) { if (geometry == null) { if (props.isSetCustGeom()) { props.unsetCustGeom(); } } else { props.setCustGeom(geometry.getXmlObject()); } }
static XSLFAutoShape create(CTShape shape, XSLFSheet sheet) { if (shape.getSpPr().isSetCustGeom()) { return new XSLFFreeformShape(shape, sheet); } else if (shape.getNvSpPr().getCNvSpPr().isSetTxBox()) { return new XSLFTextBox(shape, sheet); } else { return new XSLFAutoShape(shape, sheet); } }
static XSLFAutoShape create(CTShape shape, XSLFSheet sheet) { if (shape.getSpPr().isSetCustGeom()) { return new XSLFFreeformShape(shape, sheet); } else if (shape.getNvSpPr().getCNvSpPr().isSetTxBox()) { return new XSLFTextBox(shape, sheet); } else { return new XSLFAutoShape(shape, sheet); } }
/** * * @return definition of the shape geometry */ CustomGeometry getGeometry(){ CTShapeProperties spPr = getSpPr(); CustomGeometry geom; PresetGeometries dict = PresetGeometries.getInstance(); if(spPr.isSetPrstGeom()){ String name = spPr.getPrstGeom().getPrst().toString(); geom = dict.get(name); if(geom == null) { throw new IllegalStateException("Unknown shape geometry: " + name); } } else if (spPr.isSetCustGeom()){ geom = new CustomGeometry(spPr.getCustGeom()); } else { geom = dict.get("rect"); } return geom; }