Example usage for org.apache.poi.xwpf.usermodel TextAlignment AUTO

List of usage examples for org.apache.poi.xwpf.usermodel TextAlignment AUTO

Introduction

In this page you can find the example usage for org.apache.poi.xwpf.usermodel TextAlignment AUTO.

Prototype

TextAlignment AUTO

To view the source code for org.apache.poi.xwpf.usermodel TextAlignment AUTO.

Click Source Link

Document

Specifies that all text in the parent object shall be aligned automatically when displayed.

Usage

From source file:apachepoitest.XWPFParagraphClone.java

License:Apache License

/**
 * Returns the text vertical alignment which shall be applied to text in
 * this paragraph./*from w  w  w.  ja v  a 2 s  .c om*/
 * <p/>
 * If the line height (before any added spacing) is larger than one or more
 * characters on the line, all characters will be aligned to each other as
 * specified by this element.
 * </p>
 * <p/>
 * If this element is omitted on a given paragraph, its value is determined
 * by the setting previously set at any level of the style hierarchy (i.e.
 * that previous setting remains unchanged). If this setting is never
 * specified in the style hierarchy, then the vertical alignment of all
 * characters on the line shall be automatically determined by the consumer.
 * </p>
 *
 * @return the vertical alignment of this paragraph.
 */
public TextAlignment getVerticalAlignment() {
    CTPPr pr = getCTPPr();
    return (pr == null || !pr.isSetTextAlignment()) ? TextAlignment.AUTO
            : TextAlignment.valueOf(pr.getTextAlignment().getVal().intValue());
}