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

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


     * One of the <code>Anchor*</code> constants defined in this class.
     *
     * @param anchor - the type of alignment. Default is {@link org.apache.poi.xslf.usermodel.VerticalAlignment#TOP}
     */
    public void setVerticalAlignment(VerticalAlignment anchor){
        CTTextBodyProperties bodyPr = getTextBodyPr();
        if (bodyPr != null) {
             if(anchor == null) {
                if(bodyPr.isSetAnchor()) bodyPr.unsetAnchor();
            } else {
                bodyPr.setAnchor(STTextAnchoringType.Enum.forInt(anchor.ordinal() + 1));
            }
        }
    }
View Full Code Here


     * Returns the type of vertical alignment for the text.
     *
     * @return the type of alignment
     */
    public VerticalAlignment getVerticalAlignment(){
        CTTextBodyProperties bodyPr = getTextBodyPr();
        if (bodyPr != null) {
            STTextAnchoringType.Enum val = bodyPr.getAnchor();
            if(val != null){
                return VerticalAlignment.values()[val.intValue() - 1];
            }
        }
        return VerticalAlignment.TOP;
View Full Code Here

    /**
     *
     * @param orientation vertical orientation of the text
     */
    public void setTextDirection(TextDirection orientation){
        CTTextBodyProperties bodyPr = getTextBodyPr();
        if (bodyPr != null) {
            if(orientation == null) {
                if(bodyPr.isSetVert()) bodyPr.unsetVert();
            } else {
                bodyPr.setVert(STTextVerticalType.Enum.forInt(orientation.ordinal() + 1));
            }
        }
    }
View Full Code Here

    /**
     * @return vertical orientation of the text
     */
    public TextDirection getTextDirection(){
        CTTextBodyProperties bodyPr = getTextBodyPr();
        if (bodyPr != null) {
            STTextVerticalType.Enum val = bodyPr.getVert();
            if(val != null){
                return TextDirection.values()[val.intValue() - 1];
            }
        }
        return TextDirection.HORIZONTAL;
View Full Code Here

     * and the bottom of the inscribed rectangle of the shape that contains the text.
     *
     * @return the bottom margin or -1 if not set
     */
    public double getMarginBottom(){
        CTTextBodyProperties bodyPr = getTextBodyPr();
        if (bodyPr != null) {
            return bodyPr.isSetBIns() ? Units.toPoints(bodyPr.getBIns()) : -1;
        }
        return -1;
    }
View Full Code Here

     *  the text.
     *
     * @return the left margin
     */
    public double getMarginLeft(){
        CTTextBodyProperties bodyPr = getTextBodyPr();
        if (bodyPr != null) {
            return bodyPr.isSetLIns() ? Units.toPoints(bodyPr.getLIns()) : -1;
        }
        return -1;
    }
View Full Code Here

      
      
       // Look in detail at one
       r = p.getRuns().get(4);
       XWPFPicture pict = r.getEmbeddedPictures().get(0);
       CTPicture picture = pict.getCTPicture();
       assertEquals("rId8", picture.getBlipFill().getBlip().getEmbed());
      
       // Ensure that the ooxml compiler finds everything we need
       r.getCTR().getDrawingArray(0);
       r.getCTR().getDrawingArray(0).getInlineArray(0);
       r.getCTR().getDrawingArray(0).getInlineArray(0).getGraphic();
View Full Code Here

       // Ensure that the ooxml compiler finds everything we need
       r.getCTR().getDrawingArray(0);
       r.getCTR().getDrawingArray(0).getInlineArray(0);
       r.getCTR().getDrawingArray(0).getInlineArray(0).getGraphic();
       r.getCTR().getDrawingArray(0).getInlineArray(0).getGraphic().getGraphicData();
       PicDocument pd = new PicDocumentImpl(null);
    }
View Full Code Here

       // Ensure that the ooxml compiler finds everything we need
       r.getCTR().getDrawingArray(0);
       r.getCTR().getDrawingArray(0).getInlineArray(0);
       r.getCTR().getDrawingArray(0).getInlineArray(0).getGraphic();
       r.getCTR().getDrawingArray(0).getInlineArray(0).getGraphic().getGraphicData();
       PicDocument pd = new PicDocumentImpl(null);
    }
View Full Code Here

     * @return  the newly created shape.
     */
    public XSSFConnector createConnector(XSSFClientAnchor anchor)
    {
        CTTwoCellAnchor ctAnchor = createTwoCellAnchor(anchor);
        CTConnector ctShape = ctAnchor.addNewCxnSp();
        ctShape.set(XSSFConnector.prototype());

        XSSFConnector shape = new XSSFConnector(this, ctShape);
        shape.anchor = anchor;
        return shape;
    }
View Full Code Here

TOP

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

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.