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

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


    /**
     *
     * @return type of autofit
     */
    public TextAutofit getTextAutofit(){
        CTTextBodyProperties bodyPr = getTextBodyPr();
        if (bodyPr != null) {
            if(bodyPr.isSetNoAutofit()) return TextAutofit.NONE;
            else if (bodyPr.isSetNormAutofit()) return TextAutofit.NORMAL;
            else if (bodyPr.isSetSpAutoFit()) return TextAutofit.SHAPE;
        }
        return TextAutofit.NORMAL;
    }
View Full Code Here


            CTPresetGeometry2D geom = sp.addNewPrstGeom();
            geom.setPrst(STShapeType.RECT);
            geom.addNewAvLst();

            CTTextBody body = shape.addNewTxBody();
            CTTextBodyProperties bodypr = body.addNewBodyPr();
            bodypr.setAnchor(STTextAnchoringType.T);
            bodypr.setRtlCol(false);
            CTTextParagraph p = body.addNewP();
            p.addNewPPr().setAlgn(STTextAlignType.L);
            CTTextCharacterProperties endPr = p.addNewEndParaRPr();
            endPr.setLang("en-US");
            endPr.setSz(1100);  
View Full Code Here

     *
     * @param overflow - the type of horizontal overflow.
     * A <code>null</code> values unsets this property.
     */
    public void setTextHorizontalOverflow(TextHorizontalOverflow overflow){
        CTTextBodyProperties bodyPr = ctShape.getTxBody().getBodyPr();
        if (bodyPr != null) {
             if(anchor == null) {
                if(bodyPr.isSetHorzOverflow()) bodyPr.unsetHorzOverflow();
            } else {
                bodyPr.setHorzOverflow(STTextHorzOverflowType.Enum.forInt(overflow.ordinal() + 1));
            }
        }
    }
View Full Code Here

     * Returns the type of horizontal overflow for the text.
     *
     * @return the type of horizontal overflow
     */
    public TextHorizontalOverflow getTextHorizontalOverflow(){
      CTTextBodyProperties bodyPr = ctShape.getTxBody().getBodyPr();
      if(bodyPr != null) {
        if(bodyPr.isSetHorzOverflow()){
          return TextHorizontalOverflow.values()[bodyPr.getVertOverflow().intValue() - 1];
        }         
      }
      return TextHorizontalOverflow.OVERFLOW;
    }   
View Full Code Here

     *
     * @param overflow - the type of vertical overflow.
     * A <code>null</code> values unsets this property.
     */
    public void setTextVerticalOverflow(TextVerticalOverflow overflow){
        CTTextBodyProperties bodyPr = ctShape.getTxBody().getBodyPr();
        if (bodyPr != null) {
             if(anchor == null) {
                if(bodyPr.isSetVertOverflow()) bodyPr.unsetVertOverflow();
            } else {
                bodyPr.setVertOverflow(STTextVertOverflowType.Enum.forInt(overflow.ordinal() + 1));
            }
        }
    }
View Full Code Here

     * Returns the type of vertical overflow for the text.
     *
     * @return the type of vertical overflow
     */
    public TextVerticalOverflow getTextVerticalOverflow(){
      CTTextBodyProperties bodyPr = ctShape.getTxBody().getBodyPr();
      if(bodyPr != null) {
        if(bodyPr.isSetVertOverflow()){
          return TextVerticalOverflow.values()[bodyPr.getVertOverflow().intValue() - 1];
        }         
      }
      return TextVerticalOverflow.OVERFLOW;
    }  
View Full Code Here

     *
     * @param anchor - the type of alignment.
     * A <code>null</code> values unsets this property.
     */
    public void setVerticalAlignment(VerticalAlignment anchor){
        CTTextBodyProperties bodyPr = ctShape.getTxBody().getBodyPr();
        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 within the shape.
     *
     * @return the type of vertical alignment
     */
    public VerticalAlignment getVerticalAlignment(){
      CTTextBodyProperties bodyPr = ctShape.getTxBody().getBodyPr();
      if(bodyPr != null) {
        if(bodyPr.isSetAnchor()){
          return VerticalAlignment.values()[bodyPr.getAnchor().intValue() - 1];
        }         
      }
      return VerticalAlignment.TOP;
    }
View Full Code Here

     *
     * @param orientation vertical orientation of the text
     * A <code>null</code> values unsets this property.
     */
    public void setTextDirection(TextDirection orientation){
        CTTextBodyProperties bodyPr = ctShape.getTxBody().getBodyPr();
        if (bodyPr != null) {
            if(orientation == null) {
                if(bodyPr.isSetVert()) bodyPr.unsetVert();
            } else {
                bodyPr.setVert(STTextVerticalType.Enum.forInt(orientation.ordinal() + 1));
            }
        }
    }
View Full Code Here

     * Gets the vertical orientation of the text
     *
     * @return vertical orientation of the text
     */
    public TextDirection getTextDirection(){
        CTTextBodyProperties bodyPr = ctShape.getTxBody().getBodyPr();
        if (bodyPr != null) {
            STTextVerticalType.Enum val = bodyPr.getVert();
            if(val != null){
                return TextDirection.values()[val.intValue() - 1];
            }
        }
        return TextDirection.HORIZONTAL;
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.