Package org.apache.poi.xslf.model.geom

Examples of org.apache.poi.xslf.model.geom.PresetGeometries


     * @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;
    }
View Full Code Here


     * @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;
    }
View Full Code Here

     * @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;
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.xslf.model.geom.PresetGeometries

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.