Search in sources :

Example 1 with CTShapeNonVisual

use of org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual in project poi by apache.

the class XSLFAutoShape method prototype.

/**
     * @param shapeId 1-based shapeId
     */
static CTShape prototype(int shapeId) {
    CTShape ct = CTShape.Factory.newInstance();
    CTShapeNonVisual nvSpPr = ct.addNewNvSpPr();
    CTNonVisualDrawingProps cnv = nvSpPr.addNewCNvPr();
    cnv.setName("AutoShape " + shapeId);
    cnv.setId(shapeId + 1);
    nvSpPr.addNewCNvSpPr();
    nvSpPr.addNewNvPr();
    CTShapeProperties spPr = ct.addNewSpPr();
    CTPresetGeometry2D prst = spPr.addNewPrstGeom();
    prst.setPrst(STShapeType.RECT);
    prst.addNewAvLst();
    return ct;
}
Also used : CTShapeNonVisual(org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual) CTShapeProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties) CTPresetGeometry2D(org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D) CTNonVisualDrawingProps(org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps) CTShape(org.openxmlformats.schemas.presentationml.x2006.main.CTShape)

Example 2 with CTShapeNonVisual

use of org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual in project poi by apache.

the class XSLFTextBox method prototype.

/**
     *
     * @param shapeId   1-based shapeId
     */
static CTShape prototype(int shapeId) {
    CTShape ct = CTShape.Factory.newInstance();
    CTShapeNonVisual nvSpPr = ct.addNewNvSpPr();
    CTNonVisualDrawingProps cnv = nvSpPr.addNewCNvPr();
    cnv.setName("TextBox " + shapeId);
    cnv.setId(shapeId + 1);
    nvSpPr.addNewCNvSpPr().setTxBox(true);
    nvSpPr.addNewNvPr();
    CTShapeProperties spPr = ct.addNewSpPr();
    CTPresetGeometry2D prst = spPr.addNewPrstGeom();
    prst.setPrst(STShapeType.RECT);
    prst.addNewAvLst();
    CTTextBody txBody = ct.addNewTxBody();
    XSLFAutoShape.initTextBody(txBody);
    return ct;
}
Also used : CTShapeNonVisual(org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual) CTShape(org.openxmlformats.schemas.presentationml.x2006.main.CTShape)

Example 3 with CTShapeNonVisual

use of org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual in project poi by apache.

the class XSLFFreeformShape method prototype.

/**
     * @param shapeId 1-based shapeId
     */
static CTShape prototype(int shapeId) {
    CTShape ct = CTShape.Factory.newInstance();
    CTShapeNonVisual nvSpPr = ct.addNewNvSpPr();
    CTNonVisualDrawingProps cnv = nvSpPr.addNewCNvPr();
    cnv.setName("Freeform " + shapeId);
    cnv.setId(shapeId + 1);
    nvSpPr.addNewCNvSpPr();
    nvSpPr.addNewNvPr();
    CTShapeProperties spPr = ct.addNewSpPr();
    CTCustomGeometry2D geom = spPr.addNewCustGeom();
    geom.addNewAvLst();
    geom.addNewGdLst();
    geom.addNewAhLst();
    geom.addNewCxnLst();
    CTGeomRect rect = geom.addNewRect();
    rect.setR("r");
    rect.setB("b");
    rect.setT("t");
    rect.setL("l");
    geom.addNewPathLst();
    return ct;
}
Also used : CTShapeNonVisual(org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual) CTShapeProperties(org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties) CTCustomGeometry2D(org.openxmlformats.schemas.drawingml.x2006.main.CTCustomGeometry2D) CTNonVisualDrawingProps(org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps) CTGeomRect(org.openxmlformats.schemas.drawingml.x2006.main.CTGeomRect) CTShape(org.openxmlformats.schemas.presentationml.x2006.main.CTShape)

Aggregations

CTShape (org.openxmlformats.schemas.presentationml.x2006.main.CTShape)3 CTShapeNonVisual (org.openxmlformats.schemas.presentationml.x2006.main.CTShapeNonVisual)3 CTNonVisualDrawingProps (org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps)2 CTShapeProperties (org.openxmlformats.schemas.drawingml.x2006.main.CTShapeProperties)2 CTCustomGeometry2D (org.openxmlformats.schemas.drawingml.x2006.main.CTCustomGeometry2D)1 CTGeomRect (org.openxmlformats.schemas.drawingml.x2006.main.CTGeomRect)1 CTPresetGeometry2D (org.openxmlformats.schemas.drawingml.x2006.main.CTPresetGeometry2D)1