Package org.openxmlformats.schemas.drawingml.x2006.main

Examples of org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody


    /**
     * unset text from this shape
     */
    public void clearText(){
        _paragraphs.clear();
        CTTextBody txBody = getTextBody(true);
        txBody.setPArray(null); // remove any existing paragraphs
    }
View Full Code Here


     * add a new paragraph run to this shape
     *
     * @return created paragraph run
     */
    public XSLFTextParagraph addNewTextParagraph() {
        CTTextBody txBody = getTextBody(true);
        CTTextParagraph p = txBody.addNewP();
        XSLFTextParagraph paragraph = new XSLFTextParagraph(p, this);
        _paragraphs.add(paragraph);
        return paragraph;
    }
View Full Code Here

        }
        return TextAutofit.NORMAL;
    }

    protected CTTextBodyProperties getTextBodyPr(){
        CTTextBody textBody = getTextBody(false);
        return textBody == null ? null : textBody.getBodyPr();
    }
View Full Code Here

        return ct;
    }

    protected CTTextBody getTextBody(boolean create){
        CTShape shape = (CTShape) getXmlObject();
        CTTextBody txBody = shape.getTxBody();
        if (txBody == null && create) {
            txBody = shape.addNewTxBody();
            txBody.addNewBodyPr();
            txBody.addNewLstStyle();
        }
        return txBody;
    }
View Full Code Here

    }

    @Override
    protected CTTextBody getTextBody(boolean create){
        CTTableCell cell = getXmlObject();
        CTTextBody txBody = cell.getTxBody();
        if (txBody == null && create) {
            txBody = cell.addNewTxBody();
            txBody.addNewBodyPr();
            txBody.addNewLstStyle();
        }
        return txBody;
    }
View Full Code Here

    }

    private void processShape(CTGroupShape gs, List<DrawingTextBody> out) {
        List<CTShape> shapes = gs.getSpList();
        for (CTShape shape : shapes) {
            CTTextBody ctTextBody = shape.getTxBody();
            if (ctTextBody==null) {
                continue;
            }
           
            DrawingTextBody textBody;
View Full Code Here

    }

    @SuppressWarnings("deprecation")
    private void processShape(CTGroupShape gs, List<DrawingTextBody> out) {
        for (CTShape shape : gs.getSpArray()) {
            CTTextBody ctTextBody = shape.getTxBody();
            if (ctTextBody==null) {
                continue;
            }
           
            DrawingTextBody textBody;
View Full Code Here

    @SuppressWarnings("deprecation")
    /*package*/ XSLFTextShape(XmlObject shape, XSLFSheet sheet) {
        super(shape, sheet);

        _paragraphs = new ArrayList<XSLFTextParagraph>();
        CTTextBody txBody = getTextBody(false);
        if (txBody != null) {
            for (CTTextParagraph p : txBody.getPArray()) {
                _paragraphs.add(new XSLFTextParagraph(p, this));
            }
        }
    }
View Full Code Here

    /**
     * unset text from this shape
     */
    public void clearText(){
        _paragraphs.clear();
        CTTextBody txBody = getTextBody(true);
        txBody.setPArray(null); // remove any existing paragraphs
    }
View Full Code Here

     * add a new paragraph run to this shape
     *
     * @return created paragraph run
     */
    public XSLFTextParagraph addNewTextParagraph() {
        CTTextBody txBody = getTextBody(true);
        CTTextParagraph p = txBody.addNewP();
        XSLFTextParagraph paragraph = new XSLFTextParagraph(p, this);
        _paragraphs.add(paragraph);
        return paragraph;
    }
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody

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.