Example usage for org.apache.poi.xwpf.usermodel Borders valueOf

List of usage examples for org.apache.poi.xwpf.usermodel Borders valueOf

Introduction

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

Prototype

public static Borders valueOf(int type) 

Source Link

Usage

From source file:apachepoitest.XWPFParagraphClone.java

License:Apache License

/**
 * Specifies the border which shall be displayed above a set of paragraphs
 * which have the same set of paragraph border settings.
 *
 * @return paragraphBorder - the top border for the paragraph
 * @see #setBorderTop(Borders)//from w w w.j a va2s.  c  om
 * @see Borders a list of all types of borders
 */
public Borders getBorderTop() {
    CTPBdr border = getCTPBrd(false);
    CTBorder ct = null;
    if (border != null) {
        ct = border.getTop();
    }
    STBorder.Enum ptrn = (ct != null) ? ct.getVal() : STBorder.NONE;
    return Borders.valueOf(ptrn.intValue());
}

From source file:apachepoitest.XWPFParagraphClone.java

License:Apache License

/**
 * Specifies the border which shall be displayed below a set of
 * paragraphs which have the same set of paragraph border settings.
 *
 * @return paragraphBorder - the bottom border for the paragraph
 * @see #setBorderBottom(Borders)/* www.  j  a  va  2  s  .com*/
 * @see Borders a list of all types of borders
 */
public Borders getBorderBottom() {
    CTPBdr border = getCTPBrd(false);
    CTBorder ct = null;
    if (border != null) {
        ct = border.getBottom();
    }
    STBorder.Enum ptrn = ct != null ? ct.getVal() : STBorder.NONE;
    return Borders.valueOf(ptrn.intValue());
}

From source file:apachepoitest.XWPFParagraphClone.java

License:Apache License

/**
 * Specifies the border which shall be displayed on the left side of the
 * page around the specified paragraph./*  w  w w .j a v a  2  s. c o  m*/
 *
 * @return ParagraphBorder - the left border for the paragraph
 * @see #setBorderLeft(Borders)
 * @see Borders for a list of all possible borders
 */
public Borders getBorderLeft() {
    CTPBdr border = getCTPBrd(false);
    CTBorder ct = null;
    if (border != null) {
        ct = border.getLeft();
    }
    STBorder.Enum ptrn = ct != null ? ct.getVal() : STBorder.NONE;
    return Borders.valueOf(ptrn.intValue());
}

From source file:apachepoitest.XWPFParagraphClone.java

License:Apache License

/**
 * Specifies the border which shall be displayed on the right side of the
 * page around the specified paragraph.//from w  w w  . ja  v  a  2 s.c  o  m
 *
 * @return ParagraphBorder - the right border for the paragraph
 * @see #setBorderRight(Borders)
 * @see Borders for a list of all possible borders
 */
public Borders getBorderRight() {
    CTPBdr border = getCTPBrd(false);
    CTBorder ct = null;
    if (border != null) {
        ct = border.getRight();
    }
    STBorder.Enum ptrn = ct != null ? ct.getVal() : STBorder.NONE;
    return Borders.valueOf(ptrn.intValue());
}

From source file:apachepoitest.XWPFParagraphClone.java

License:Apache License

/**
 * Specifies the border which shall be displayed between each paragraph in a
 * set of paragraphs which have the same set of paragraph border settings.
 *
 * @return ParagraphBorder - the between border for the paragraph
 * @see #setBorderBetween(Borders)//from  w  w  w.  ja  v a  2s .c  om
 * @see Borders for a list of all possible borders
 */
public Borders getBorderBetween() {
    CTPBdr border = getCTPBrd(false);
    CTBorder ct = null;
    if (border != null) {
        ct = border.getBetween();
    }
    STBorder.Enum ptrn = ct != null ? ct.getVal() : STBorder.NONE;
    return Borders.valueOf(ptrn.intValue());
}