Package org.openxmlformats.schemas.wordprocessingml.x2006.main

Examples of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders


        // layout
        // tblpro.addNewTblLayout().setType(STTblLayoutType.AUTOFIT);

        // borders
        CTTblBorders borders = tblpro.addNewTblBorders();
        borders.addNewBottom().setVal(STBorder.SINGLE);
        borders.addNewInsideH().setVal(STBorder.SINGLE);
        borders.addNewInsideV().setVal(STBorder.SINGLE);
        borders.addNewLeft().setVal(STBorder.SINGLE);
        borders.addNewRight().setVal(STBorder.SINGLE);
        borders.addNewTop().setVal(STBorder.SINGLE);

        /*
       * CTTblGrid tblgrid=table.addNewTblGrid();
       * tblgrid.addNewGridCol().setW(new BigInteger("2000"));
       */
 
View Full Code Here


    public XWPFBorderType getInsideHBorderType() {
      XWPFBorderType bt = null;

      CTTblPr tblPr = getTrPr();
      if (tblPr.isSetTblBorders()) {
        CTTblBorders ctb = tblPr.getTblBorders();
        if (ctb.isSetInsideH()) {
          CTBorder border = ctb.getInsideH();
          bt = stBorderTypeMap.get(border.getVal().intValue());
        }
      }
      return bt;
    }
View Full Code Here

    public int getInsideHBorderSize() {
      int size = -1;

      CTTblPr tblPr = getTrPr();
      if (tblPr.isSetTblBorders()) {
        CTTblBorders ctb = tblPr.getTblBorders();
        if (ctb.isSetInsideH()) {
          CTBorder border = ctb.getInsideH();
          size = border.getSz().intValue();
        }
      }
      return size;
    }
View Full Code Here

    public int getInsideHBorderSpace() {
      int space = -1;

      CTTblPr tblPr = getTrPr();
      if (tblPr.isSetTblBorders()) {
        CTTblBorders ctb = tblPr.getTblBorders();
        if (ctb.isSetInsideH()) {
          CTBorder border = ctb.getInsideH();
          space = border.getSpace().intValue();
        }
      }
      return space;
    }
View Full Code Here

    public String getInsideHBorderColor() {
      String color = null;

      CTTblPr tblPr = getTrPr();
      if (tblPr.isSetTblBorders()) {
        CTTblBorders ctb = tblPr.getTblBorders();
        if (ctb.isSetInsideH()) {
          CTBorder border = ctb.getInsideH();
            color = border.xgetColor().getStringValue();
        }
      }
      return color;
    }
View Full Code Here

    public XWPFBorderType getInsideVBorderType() {
      XWPFBorderType bt = null;

      CTTblPr tblPr = getTrPr();
      if (tblPr.isSetTblBorders()) {
        CTTblBorders ctb = tblPr.getTblBorders();
        if (ctb.isSetInsideV()) {
          CTBorder border = ctb.getInsideV();
          bt = stBorderTypeMap.get(border.getVal().intValue());
        }
      }
      return bt;
    }
View Full Code Here

    public int getInsideVBorderSize() {
      int size = -1;

      CTTblPr tblPr = getTrPr();
      if (tblPr.isSetTblBorders()) {
        CTTblBorders ctb = tblPr.getTblBorders();
        if (ctb.isSetInsideV()) {
          CTBorder border = ctb.getInsideV();
          size = border.getSz().intValue();
        }
      }
      return size;
    }
View Full Code Here

    public int getInsideVBorderSpace() {
      int space = -1;

      CTTblPr tblPr = getTrPr();
      if (tblPr.isSetTblBorders()) {
        CTTblBorders ctb = tblPr.getTblBorders();
        if (ctb.isSetInsideV()) {
          CTBorder border = ctb.getInsideV();
          space = border.getSpace().intValue();
        }
      }
      return space;
    }
View Full Code Here

    public String getInsideVBorderColor() {
      String color = null;

      CTTblPr tblPr = getTrPr();
      if (tblPr.isSetTblBorders()) {
        CTTblBorders ctb = tblPr.getTblBorders();
        if (ctb.isSetInsideV()) {
          CTBorder border = ctb.getInsideV();
            color = border.xgetColor().getStringValue();
        }
      }
      return color;
    }
View Full Code Here

        colSize.setVal(BigInteger.valueOf(size));
    }

    public void setInsideHBorder(XWPFBorderType type, int size, int space, String rgbColor) {
        CTTblPr tblPr = getTrPr();
        CTTblBorders ctb = tblPr.isSetTblBorders() ? tblPr.getTblBorders() : tblPr.addNewTblBorders();
        CTBorder b = ctb.isSetInsideH() ? ctb.getInsideH() : ctb.addNewInsideH();
        b.setVal(xwpfBorderTypeMap.get(type));
        b.setSz(BigInteger.valueOf(size));
        b.setSpace(BigInteger.valueOf(space));
        b.setColor(rgbColor);
    }
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblBorders

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.