Examples of CTTextBodyProperties


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

            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

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

     *
     * @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

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

     * 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

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

     *
     * @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

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

     * 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

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

     *
     * @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

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

     * 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

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

     *
     * @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

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

     * 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

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

     * and the bottom of the inscribed rectangle of the shape that contains the text.
     *
     * @return the bottom inset in points
     */
    public double getBottomInset(){
        CTTextBodyProperties bodyPr = ctShape.getTxBody().getBodyPr();
        if (bodyPr != null) {
          if(bodyPr.isSetBIns()){
            return Units.toPoints(bodyPr.getBIns());
          }
        }
        // If this attribute is omitted, then a value of 0.05 inches is implied
        return 3.6
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.