Package org.docx4j.wml

Examples of org.docx4j.wml.CTVerticalJc


 
  /**
   * @since 3.0.0
   */ 
  public TextAlignmentVertical() { //Default-Alignment Top
  CTVerticalJc textAlignment = Context.getWmlObjectFactory().createCTVerticalJc();
    textAlignment.setVal(STVerticalJc.TOP);
    this.setObject(textAlignment);
  }
View Full Code Here


 
  public TextAlignmentVertical(CSSValue value) { 
   
    debug(CSS_NAME, value);
   
    CTVerticalJc textAlignment = Context.getWmlObjectFactory().createCTVerticalJc();
   
    if (value.getCssText().toLowerCase().equals("top")) {
      textAlignment.setVal(STVerticalJc.TOP);
    } else if (value.getCssText().toLowerCase().equals("middle")) {
      textAlignment.setVal(STVerticalJc.CENTER);
    } else if (value.getCssText().toLowerCase().equals("bottom")) {
      textAlignment.setVal(STVerticalJc.BOTTOM);
    } else {
      log.warn("How to handle vertical-align: " + value.getCssText()); // eg baseline
      // Default to top or center..
      textAlignment.setVal(STVerticalJc.CENTER);     
    }   

    this.setObject( textAlignment  );
  }
View Full Code Here

TOP

Related Classes of org.docx4j.wml.CTVerticalJc

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.